473,386 Members | 1,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Stack overflow exception

We have a stack overflow happening. We are NOT doing any recusion. We do have an object being created in Global that is being handed the Context (which I assume is specific to the request thread). This object does in turn does create several other objects, but therer is no memberwise cloning or deep copies. So, we are at a loss why we are running out of stack so early.

Is there a way to monitor the stack size at runtime to see if we can catch the error?
Is it unwise to create objects in Global? Is this somehow creating many objects in the pipeline?
Out undstanding is a set of objects created in a request thread are bound to that request and are deleted at the end of the request thread?
Does the GC run while in debug?
Nov 18 '05 #1
5 2490
Hi,

In 99.9% of the cases stack overflow is because of an error in the code. But
without seeing any of your code I'm afraid it is not possinble to tell you
more.

Greetings
Martin
"jb**@newsgroups.nospam" <Mr. Bix> wrote in message
news:52**********************************@microsof t.com...
We have a stack overflow happening. We are NOT doing any recusion. We do have an object being created in Global that is being handed the Context
(which I assume is specific to the request thread). This object does in
turn does create several other objects, but therer is no memberwise cloning
or deep copies. So, we are at a loss why we are running out of stack so
early.
Is there a way to monitor the stack size at runtime to see if we can catch the error? Is it unwise to create objects in Global? Is this somehow creating many objects in the pipeline? Out undstanding is a set of objects created in a request thread are bound to that request and are deleted at the end of the request thread? Does the GC run while in debug?


Nov 18 '05 #2
Can you reproduce the error at will in a debugger environment? If yes, press
CTRL + ALT + E, set it to break into the debugger on all exceptions and let
the application run to reproduce the bug. The exception will stop at the
offending line of code. That's the easy part. Writing robust code is what is
difficult.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"jb**@newsgroups.nospam" <Mr. Bix> wrote in message
news:52**********************************@microsof t.com...
We have a stack overflow happening. We are NOT doing any recusion. We do
have an object being created in Global that is being handed the Context
(which I assume is specific to the request thread). This object does in
turn does create several other objects, but therer is no memberwise
cloning or deep copies. So, we are at a loss why we are running out of
stack so early.

Is there a way to monitor the stack size at runtime to see if we can catch
the error?
Is it unwise to create objects in Global? Is this somehow creating many
objects in the pipeline?
Out undstanding is a set of objects created in a request thread are bound
to that request and are deleted at the end of the request thread?
Does the GC run while in debug?

Nov 18 '05 #3
Ok...I understand your overall answer, but....

I am still curious about
Is there a way to monitor the stack size at runtime to see if we can catc
the error

Our undstanding is a set of objects created in a request thread are boun
to that request and are deleted at the end of the request thread

Does the GC run while in debug
----- Martin Dechev wrote: ----

Hi

In 99.9% of the cases stack overflow is because of an error in the code. Bu
without seeing any of your code I'm afraid it is not possinble to tell yo
more

Greeting
Marti
"jb**@newsgroups.nospam" <Mr. Bix> wrote in messag
news:52**********************************@microsof t.com..
We have a stack overflow happening. We are NOT doing any recusion. We d have an object being created in Global that is being handed the Contex
(which I assume is specific to the request thread). This object does i
turn does create several other objects, but therer is no memberwise clonin
or deep copies. So, we are at a loss why we are running out of stack s
early
Is there a way to monitor the stack size at runtime to see if we can catc

the error Is it unwise to create objects in Global? Is this somehow creating man objects in the pipeline Out undstanding is a set of objects created in a request thread are boun to that request and are deleted at the end of the request thread Does the GC run while in debug

Nov 18 '05 #4
Hi Mr Bix,

I may be able to be of a little more help here. Stack Overflows are almost
always caused by either infinte looping or infinite recursion. So, check
your loops, and if you have any recursive functions, check them too.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mr Bix" <an*******@discussions.microsoft.com> wrote in message
news:8B**********************************@microsof t.com...
Ok...I understand your overall answer, but....

I am still curious about:
Is there a way to monitor the stack size at runtime to see if we can catch
the error?

Our undstanding is a set of objects created in a request thread are bound
to that request and are deleted at the end of the request thread?

Does the GC run while in debug?
----- Martin Dechev wrote: -----

Hi,

In 99.9% of the cases stack overflow is because of an error in the code. But without seeing any of your code I'm afraid it is not possinble to tell you more.

Greetings
Martin
"jb**@newsgroups.nospam" <Mr. Bix> wrote in message
news:52**********************************@microsof t.com...
> We have a stack overflow happening. We are NOT doing any recusion. We do
have an object being created in Global that is being handed the Context (which I assume is specific to the request thread). This object does in turn does create several other objects, but therer is no memberwise cloning or deep copies. So, we are at a loss why we are running out of stack so early. >> Is there a way to monitor the stack size at runtime to see if we
can catch the error?
> Is it unwise to create objects in Global? Is this somehow creating
many objects in the pipeline?
> Out undstanding is a set of objects created in a request thread are
bound to that request and are deleted at the end of the request thread?
> Does the GC run while in debug?


Nov 18 '05 #5
Is it possible that a property setter or getter in your object is
inadvertantly referring to itself (not that I've ever done this <g>).
i.e. -
Private _foo as object
Public Property Foo() as object
Get
Return Foo 'should be Return _foo
End Get
..
..
..

End Property

"jb**@newsgroups.nospam" <Mr. Bix> wrote in message
news:52**********************************@microsof t.com...
We have a stack overflow happening. We are NOT doing any recusion. We do have an object being created in Global that is being handed the Context
(which I assume is specific to the request thread). This object does in
turn does create several other objects, but therer is no memberwise cloning
or deep copies. So, we are at a loss why we are running out of stack so
early.
Is there a way to monitor the stack size at runtime to see if we can catch the error? Is it unwise to create objects in Global? Is this somehow creating many objects in the pipeline? Out undstanding is a set of objects created in a request thread are bound to that request and are deleted at the end of the request thread? Does the GC run while in debug?

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Aguilar, James | last post by:
Hello all, To begin, yes, this -is- a homework assignment. However, it is for my Algorithms class, and my instructor has given us explicit permission to use "expert" groups like newsgroups, so...
13
by: Will Pittenger | last post by:
I have a Control derived class. When the parent of the control changes the control's Location property, the stack overflows. I have not found a way to find out what was on the stack when it does...
7
by: Gorge Bush | last post by:
Hi there, all was going well with my first C# project until now as I am getting a Stack Overflow exception. I haven't seen one of those since DOS programming days and back then all you did was up...
2
by: David W. Walker | last post by:
I am attempting to port a C code that runs OK on a number of Linux and Unix machines to Windows XP using Visual Studio C++. I have set the program up as a console application, but when I try to run...
1
by: Lee Greco | last post by:
A third party vendor has provided me a C++ .Net DLL, a .lib and all necessary ..h files, as well as a sample C++ .NET app that uses the DLL. The sample app needs the Stack Reserve Size set to...
0
by: Howard Kaikow | last post by:
I recently discovered http://msdn.microsoft.com/library/en-us/vclib/html/vclrf_resetstkoflw.asp, which states: "The _resetstkoflw function recovers from a stack overflow condition, enabling a...
2
by: duncan.welch | last post by:
I have some code that's been running happily for nearly a year. In my last compile and upload, it's stopped working properly. I have a strongly-typed dataset that returns ~12 datatables, and an...
2
by: Ali | last post by:
Hi, I got stack overflow errors while using an unmanaged dll from managed c# application. When i use editbin.exe to increase stack size of app , it works. Is there a way to increase stack size of...
5
by: samuraign | last post by:
Hi, My C-code is working properly in Cygwin. But when I run the same code in VC++ or LCC, I use to get stack overflow exception during run time. It is not entring into my function from testbench....
4
by: =?Utf-8?B?cmFuZHkxMjAw?= | last post by:
Visual Studio 2005, C# WinForms application: Here’s the question: How can I increase the standard 1 MB stack size of the UI thread in a C# WinForms application? Here’s why I ask: I’ve...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.