0

I've been trying to avoid the Debug/Close dialog when I get a stack overflow exception in my application (I need my application to shut down without user interference). Using SetErrorMode(SEM_NOGPFAULTERRORBOX) works for several other kinds of exceptions (out of memory, for example), but not for stack overflow.

I'm looking for a solution that works only on my application, as I cannot disable this for all the other applications.

Thanks.

nozik
  • 307
  • 1
  • 12
  • I'm simulating the stack overflow myself (among several other crashes). This isn't an actual defect in my code. – nozik Feb 08 '15 at 13:30
  • possible duplicate of [Can the "Application Error" dialog box be disabled?](http://stackoverflow.com/questions/735170/can-the-application-error-dialog-box-be-disabled) – Joe Feb 08 '15 at 13:32
  • Thanks Joe, but the solutions presented in your link are the ones I referred to as not working (SetErrorMode) or irrelevant (disabling this dialog altogether) – nozik Feb 08 '15 at 13:37
  • 1
    Have you tried the possible solutions offered here? http://support.microsoft.com/kb/315937 – Joe Feb 08 '15 at 17:18
  • If Joe's links don't help, you might need to split the program into two processes, and have one debugging the other. – Harry Johnston Feb 08 '15 at 20:18
  • Joe - these solutions aren't relevant either since I cannot know which thread is about to throw the exception, so I cannot use _try / _except. Harry - what do you mean by debugging one process by the other? – nozik Feb 09 '15 at 09:28

0 Answers0