By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,082 Members | 2,108 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,082 IT Pros & Developers. It's quick & easy.

How can I solve this error? I need help!

P: n/a
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??
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jet Leung wrote:
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/
Nov 16 '05 #2

P: n/a
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

"Jochen Kalmbach" <no********************@holzma.de> skrev i meddelandet
news:Xn**********************************@207.46.2 48.16...
Jet Leung wrote:
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/

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.