What actions do I need to take to get a crash dump in ALL error scenarios?

前端 未结 6 1035
孤独总比滥情好
孤独总比滥情好 2021-02-04 09:39

We\'re on Windows and we want to get a crash dump (possibly using MiniDumpWriteDump) for all scenarios where our application exit\'s unexpectedly.

6条回答
  •  后悔当初
    2021-02-04 10:10

    SetUnhandledExceptionFilter is emphatically not enough to capture all unexpected exits. If an application accidentally calls a pure virtual function then a dialog will pop up. The application will hang, but not crash. Since there is no exception neither SetUnhandledExceptionFilter nor WER can help. There are a few variations on this theme.

    Worse yet is the weirdness if you crash in a kernel callback such as a WindowProc. If this happens in a 32-bit application on 64-bit Windows then the exception is caught by the OS and execution continues. Yes, the crash is silently handed. I find that terrifying.

    http://randomascii.wordpress.com/2012/07/05/when-even-crashing-doesnt-work/ should detail all of the tricks needed to handle these unusual cases.

提交回复
热议问题