mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-18 02:26:00 +01:00
fix(simulation): no crash message box in test mode
The crash handler of WITHDUMPGEN builds (on by default) shows a message box before it writes the dump. It also gets the C++ exceptions nothing catches, since it replaces the CRT's unhandled exception filter. In test mode nobody is there to close the box, so a crashing test waited for it until whatever started it gave up (run.py after the case's timeout, 600 s by default). The dump is still written, the exit code is the exception's.
This commit is contained in:
4
EU07.cpp
4
EU07.cpp
@@ -73,7 +73,9 @@ LONG WINAPI CrashHandler(EXCEPTION_POINTERS *ExceptionInfo)
|
||||
MINIDUMP_TYPE dumpType = MINIDUMP_TYPE(MiniDumpWithFullMemory | MiniDumpWithHandleData | MiniDumpWithThreadInfo | MiniDumpWithUnloadedModules | MiniDumpWithIndirectlyReferencedMemory |
|
||||
MiniDumpWithFullMemoryInfo | MiniDumpWithTokenInformation);
|
||||
|
||||
MessageBoxA(nullptr, "Simulator crash occured :(\n", "Simulator crashed :(", MB_ICONERROR);
|
||||
// in test mode nobody is there to close the box, and the run would wait for it until killed
|
||||
if (false == Global.test.enabled)
|
||||
MessageBoxA(nullptr, "Simulator crash occured :(\n", "Simulator crashed :(", MB_ICONERROR);
|
||||
MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, dumpType, &dumpInfo, nullptr, nullptr);
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
Reference in New Issue
Block a user