How can I solve this error? I need help!

  • Thread starter Thread starter Jet Leung
  • Start date Start date
J

Jet Leung

When I debug my program and it return me an error call " have not handle
¡°System.StackOverflowException¡± appear in system.windows.forms.dll "
How can I solve this problem??
 
Jet said:
When I debug my program and it return me an error call " have not handle
¡°System.StackOverflowException¡± appear in system.windows.forms.dll "
How can I solve this problem??

Enable in your VS2002/2002 under "Debug | Excaptions..."
"CLR-Exceptions: Halt on all error"

Then you see where the exception occur and you can walk the callstack to
find the source of the problem.

Maybe you are setting some property inside an even-handler for this
property (common mistake)
For example:

private void textBox1_OnTextChanged(object sender, EventArgs e)
{
textBox1.Text += "_";
}

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp

Do you need daily reports from your server?
http://sourceforge.net/projects/srvreport/
 
Jet,

One of the most common causes to stackoverflow exception is that you
en up in an never ending loop when methods call on eachother like this.

void A()
{
B();
}

void B()
{
A();
}

This will fill up your stack in a heartbeat and give you the stackoverflow
exception you are experiencing. This is what the code Jochen priovided
will do, but explained further.

HTH,

//Andreas
 
Back
Top