473,473 Members | 4,297 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2494
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: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.