I have a huge code-base I am unfamiliar with, and the program terminates abnormally because a thread somewhere is calling __fastfail
. This is based on the message, which ends with
... Fatal program exit requested.
The call stack has no symbols because it's inside C++ 2015 runtime (ucrtbase.dll
). The call appears to be made on a thread other than my main thread. This mysterious thread only starts just before the issue happens so I can't catch the act of it starting in the debugger - I don't know what's starting it, and what causes the whole process in the first place.
I have SEH in my main()
using __try/__catch
, so any unhandled exceptions should be getting trapped there. Instead I am guessing something somewhere bubbles up to the runtime and results in __fastfail
.
I tried peppering all my threads with SEH just like main()
, tried hooking abort()
, exit()
and terminate()
, and can't find the problem. How do I debug this, any tips?
I would say this is a nice task for WinDbg. WinDbg is part of the Debugging Tools for Windows and it's free. Install both versions, x64 and x86 so that you can debug any kind of application.
File/Open executable
). It will stop at the initial breakpoint..symfix c:\debug\symbols
and .reload
. As mentioned by @James McNellis, the symbols are available and this will download them when needed.g
.dump /ma c:\debug\mydump.dmp
so you can analyze it later.exr -1
~#s
k
Learning WinDbg is a hard task, since most things are done via cryptic commands and not via UI, but it can do almost everything.
For more specific problems when you have some more clues, ask additional questions using the windbg tag.
Also Visual Studio can download symbols (PDB files; callstack information) from Microsoft Servers.
Tools | Options ...
in the main menuDebugging | Symbols
from the options menuHere it is how it looks like in Visual Studio 2015 Community Edition:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With