From ced4e06b35b7945789460efed5af22c205fa0b98 Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Sun, 8 Nov 2026 09:36:35 +0100 Subject: [PATCH] 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. --- EU07.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EU07.cpp b/EU07.cpp index 790f6ffb9..0fbabba5b 100644 --- a/EU07.cpp +++ b/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);