Forums - C# Corner

Forum guidelines
Dr Spack

Dr Spack

  • 0
  • 0
  • 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
closes.

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
have.


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)

C# Corner Hyderabad Developer Conference

SPONSORED BY

Custom Software Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.