VB.NET 2003 System.StackOverflow.Exception

Status
Not open for further replies.

dingdong-man

Baseband Member
Messages
66
I was doing my project when suddenly the error message popup during the execution. it says "An unhandled exception of type 'System.StackOverflow.Exception' occured in WindowsApplication1.exe

can somebody tell me why does this happen? what does this mean to the program that i was doing?
what is the option "Break" and "Continue" mean

thank you....
 
Stack overflows occur when you run out of memory on the call stack. Each function your program calls gets placed on the stack. If your program is using recursion, the recursing function gets put on the stack every time it calls itself until some condition is met. Once the condition is met, the stack unwinds and frees memory while doing so. So, a typical cause of a stack overflow is infinite recursion.

If the terms 'stack' and 'recursion' are foreign to you, Google them for a better understanding.

"Break" is a debugger command to stop the executing program at its current instruction.
 
so basically what he's saying is that your program has an infinite loop bug (most likely) - post your code - if your using proper error handling you should be able to pull the stack trace out of your exception
 
Also, use your try...catch statements to stop the exception from going too far up the stack.

word of note, you cannot catch a StackOverflowException, because it is a runtime. You will have to place your try...catch else where.

A good resource also is MSDN...lot of info there
 
Status
Not open for further replies.
Back
Top Bottom