Re: How to recover from a EXCEPTION_STACK_OVERFLOW?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi Jochen!

By the way: There is *no* reliable way to catch unhandled exceptions
in-process!

I have plans to create a managed c++ assembly, which uses the
SetUnhandledExceptionFilter API to create a thread which uses
"MiniDumpWriteDump" to create a ("adplus" like) memory dump (and performs
additional things like compressing, upload to a server, ...).

According to your statement above, this is no good idea. Why? On MSDN I have
not read about calling in-process is not reliable. It just says, that it may
not produce a valid stack trace for the calling thread. This is no problem
for me, since the calling thread (which does nothing but calling
"MiniDumpWriteDump") will be filtered out by using the
MINIDUMP_CALLBACK_INFORMATION parameter.

Would this work?
Or can I forget about it?

The only reliable way is to let your ptogram run under a debugger...

ON of the first questions that I asked myself when thinking about this
project was: "Would it not be better to to this from within another
processes (a debugger)?". But AFAIK in WinNT (XP) Debuggers can only be
registered from within the Registry, and global for all applications. Or am
I wrong?

It would be really cool to have a function like "SetDebuggerOnCrash(PCTSTR
debuggerCommandLine)", which specifies the debugger that will be used (just
for this application) on crash.


GP


.