Re: Prohibiting "Visual C++ Runtime Error" dialog box?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Bae,Hyun-jik (imays_at_NOSPAM.hitel.NOSPAM.net)
Date: 12/10/04


Date: Fri, 10 Dec 2004 12:44:49 +0900

Thanks! :)

"Oleg Starodumov" <com-dot-debuginfo-at-oleg> wrote in message
news:upw0KKf3EHA.2568@TK2MSFTNGP10.phx.gbl...
>
> > I added some code to my program to do MiniDumpWriteDump on exception.
Many
> > exception or corruption cases are caught by MiniDumpWriteDump. However,
some
> > errors cannot be caught, because instead of MiniDumpWriteDump, an error
> > dialog box comes out and my program just pauses. The captured image of
the
> > message box provided by Visual C++ runtime is
> > http://www.imays.pe.kr/exception_dialog.jpg.
> >
> > Please reply me how to prohibit this "kind but no thanks" dialog box and
go
> > to MiniDumpWriteDump. Thanks in advance.
> >
>
> This is a CRT library error. It can be caused by one of two reasons:
> * Unhandled C++ exception
> * A non-exception error detected by CRT library (the list of these errors
> can be found in CMSGS.H file)
>
> When one of these errors has been detected by CRT library, it shows
> this error message and then terminates the application (calls abort()).
>
> The first kind (unhandled C++ exception) is intercepted when you install
> your own filter using SetUnhandledExceptionFilter function. Then your
filter
> is always called in case of unhandled C++ exception (assuming that it was
not
> overridden by somebody else, e.g. msvcr*.dll loaded by the process after
you
> have already installed your filter).
>
> I don't know a way to intercept errors of the second kind in release
builds
> (in debug build it can be done using custom CRT reporting hook, but in
> release builds it will not work). In release build, patching the CRT
library
> is the only way that comes to mind.
>
> Regards,
> Oleg
>
>
>
>
>
>



Relevant Pages

  • Re: Function names for managed callstack under SOS debugging of .NET 2.0 app
    ... API to setup the default unhandled exception handler for all the unhandled ... and generating the mini-dump. ... MiniDumpWriteDump to write out the minidump, I tried to use windbg to ...
    (microsoft.public.vsnet.debugging)
  • Re: EXCEPTION_INVALID_HANDLE woes
    ... it's puzzling to me why we're getting this exception in the ... When the invalid handle exception occurs, ... we get a nice stack trace and dump of data memory. ... Got any why MiniDUmpWriteDump() doesn't work for the invalid handle ...
    (microsoft.public.win32.programmer.kernel)
  • Re: How to recover from a EXCEPTION_STACK_OVERFLOW?
    ... MiniDimp even if there has been an unhandled managed Exception. ... just-in-time debugging have been discussed in this newsgroup before, ... The registered custom Exception Filter calls MiniDumpWriteDump ... CreateProcess itself can fail because of corruption of the process' ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Mixing /EHs and /EHa (structured exceptions)
    ... The undetermined state of the program will be ... MiniDumpWriteDump may not produce a valid stack trace for the calling ... One way to do this is to force an exception inside ... new worker thread and filter this worker thread from the dump. ...
    (microsoft.public.vc.language)
  • Re: Prohibiting "Visual C++ Runtime Error" dialog box?
    ... > exception or corruption cases are caught by MiniDumpWriteDump. ... The first kind is intercepted when you install ... your own filter using SetUnhandledExceptionFilter function. ...
    (microsoft.public.vc.debugger)