Forums - C# Corner

Forum guidelines
Dr Spack

Dr Spack

  • 0
  • 99
  • 0

How can I get the call stack of a StackOverflowException?

Dec 6 2007 5:56 AM
Hello everyone,

I know this one is a little tricky, but I hope someone has a
hint or an idea.

In our application occurs a StackOverflowException (at least
I think that) and the result is, that the application just

The problem is that I am not really sure which Exception
occurs because it happens sporadically and only at one of our
customers in different parts of our application.

So I have checked our code what will happens, when I manually
force some unhandled exceptions to occur. For example
NullReference, DivisionByZero, OutOfMemeory. No problem at
all. They all where handled by the Application.ThreadException
event. With a call stack and everything else that is nice to

Then I tried StackOverflowException. The application crashes
and closes with a Dr. Watson hint. No stack trace and no clue
where to start searching.

Does anyone know how to log the call stack of an
StackOverflowException? (Of course without to install Visual
Studio on the customers workstations)

The application is developed in c# @ .Net Framework 2.0

Many thanks for every tip in advance...

Answers (4)

Unlimited Flat-Free License


File APIs for .NET
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!