Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » VB.NET 2003 System.StackOverflow.Exception
Closed Thread
Old 08-23-2006, 12:51 PM   #1 (permalink)
 
Junior Techie

Join Date: May 2005

Posts: 66

dingdong-man

Default VB.NET 2003 System.StackOverflow.Exception

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....
dingdong-man is offline  
Old 08-23-2006, 01:29 PM   #2 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default

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.
jaeusm is offline  
Old 08-24-2006, 02:13 PM   #3 (permalink)
 
Newb Techie

Join Date: Aug 2006

Posts: 13

non_profit

Default

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
non_profit is offline  
Old 08-25-2006, 11:11 AM   #4 (permalink)
 
Super Techie

Join Date: Sep 2005

Posts: 341

hillbillybob

Default

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
__________________
The greatest measure of a nation is not it\'s army or economy, but by how many people are trying to get in, and how many people are staying!!
Guns, Guts, and Alcohol made America free.
Born American, Die American
Ubuntu - it\'s all about the bun\'s baby!!!
hillbillybob is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On