StackOverflowException

  • Thread starter Thread starter Peter Larsen [CPH]
  • Start date Start date
P

Peter Larsen [CPH]

Hi,

I have a problem where a console-application throw a StackOverflowException
witout allowing me to receive a stacktrace and write it to a file.
It seems like the app doesn't allow me to do anything after a
StackOverflowException.

Is there a way to get some informations after a StackOverflowException ??

BR
Peter
 
Thanks Pete for your reply!

Hi Peter,

The StackOverflowException is thrown when the execution stack overflows
because it contains too many nested method calls, typically in case of a
very deep or unbounded recursion.

An MSDN document says:

In prior versions of the .NET Framework, your application could catch a
StackOverflowException object (for example, to recover from unbounded
recursion). However, that practice is currently discouraged because
significant additional code is required to reliably catch a stack overflow
exception and continue program execution.

Starting with the .NET Framework version 2.0, a StackOverflowException
object cannot be caught by a try-catch block and the corresponding process
is terminated by default. Consequently, users are advised to write their
code to detect and prevent a stack overflow. For example, if your
application depends on recursion, use a counter or a state condition to
terminate the recursive loop.

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Linda and Peter,

Thanks for your comments.

I now know that it isn't possible to catch a StackOverflowException :-(

I agree that it must be a recursion problem.
The problem is that some of the code is "build" at runtime from some xml
files and no one seems to know whether its the code-builder or some entries
in the xml files, that fails. It would be nice to know where the exception
is thrown, right !

Anyway, thanks for your time.

/Peter
 
Hi Pete,

I think it is the xml files that describe a flow that failes somehow - just
like you say.
It happens very rarely - trying to debug after it, has not been a success
yet :-(

Anyway - thanks for you help.

/Peter
 
Thanks Pete for your help and excellent analysis!

Hi Peter,
It happens very rarely - trying to debug after it, has not been a success
yet :-(

Do you mean the problem only appears seldomly?

If possible, you may send a sample project that can demonstrate the
problem, as well as the XML files to me. I'm willing to help you debug it.

To get my actual email address, remove 'online' from my displayed email
address.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Peter,

How about the problem now?

If you need our further assistance, please feel free to let me know.

Thank you for using our MSDN Managed Newsgroup Support Service!

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Linda,

No, its the same.
I have just told the "boys" what you and Pete told me - that there is no
easy way here !!

It is not scheduled to be fixed in the nearest future - so just close down
this post.

Thanks for your help.
/Peter
 
Sorry Linda, i missed this post from you.
Thank you so much for offering your help with this, but i don't think it
would be necessary since it's way down on the list at the moment.


BR
Peter
 
Hi Peter,

Thank you for your prompt response!

Well, I will close this issue in the newsgroup now. If you need our further
assistance, please feel free to re-open it and we will continue to work
with you at that time.

Thank you for using our MSDN Managed Newsgroup Support Service!

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top