Skip to content

Commit 4b0a307

Browse files
committed
Filter WER crash dialogs to fail-fast exceptions only
CheckForWerCrash picks up any .dmp file in the private dumps folder and shows a "Security Exception" crash dialog on the next launch. The problem is it doesn't check what kind of exception the dump actually contains - so a C++ exception (like a CEGUI texture load failure, 0xE06D7363) that got dumped by WER would show up as a delayed crash dialog on the next MTA launch, even though the game kept running fine as it wasn't a fatal exception at the time it happened. Now it checks the exception code in the dump and skips anything that isn't a real fail-fast (0xC0000409 / 0xC0000374). This stops irrelevant crash dialogs from appearing on the next launch when no actual crash happened.
1 parent d78dfed commit 4b0a307

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Client/loader/CInstallManager.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,16 @@ SString CInstallManager::_CheckForWerCrash()
650650
{
651651
const auto regs = WerCrash::ExtractRegistersFromMinidump(fullPath);
652652
const DWORD exceptionCode = regs.valid ? regs.exceptionCode : EXCEPTION_STACK_BUFFER_OVERRUN;
653+
654+
// Skip non-fail-fast dumps (e.g. 0xE06D7363 C++ exceptions) -
655+
// those are handled by the normal crash handler, not the WER path.
656+
if (regs.valid && exceptionCode != EXCEPTION_STACK_BUFFER_OVERRUN && exceptionCode != EXCEPTION_HEAP_CORRUPTION)
657+
{
658+
OutputDebugStringA(SString("_CheckForWerCrash: Skipping dump %s with non-fail-fast exception code 0x%08X\n",
659+
dumpFile.c_str(), exceptionCode));
660+
continue;
661+
}
662+
653663
const char* exceptionName = (exceptionCode == EXCEPTION_STACK_BUFFER_OVERRUN) ? "Stack Buffer Overrun"
654664
: (exceptionCode == EXCEPTION_HEAP_CORRUPTION) ? "Heap Corruption"
655665
: "Security Exception";
@@ -792,6 +802,16 @@ SString CInstallManager::_CheckForWerCrash()
792802

793803
const auto regs = WerCrash::ExtractRegistersFromMinidump(fullPath);
794804
const DWORD exceptionCode = regs.valid ? regs.exceptionCode : EXCEPTION_STACK_BUFFER_OVERRUN;
805+
806+
// Skip non-fail-fast dumps (e.g. 0xE06D7363 C++ exceptions) -
807+
// those are handled by the normal crash handler, not the WER path.
808+
if (regs.valid && exceptionCode != EXCEPTION_STACK_BUFFER_OVERRUN && exceptionCode != EXCEPTION_HEAP_CORRUPTION)
809+
{
810+
OutputDebugStringA(SString("_CheckForWerCrash: Skipping WER dump %s with non-fail-fast exception code 0x%08X\n",
811+
dumpFile.c_str(), exceptionCode));
812+
continue;
813+
}
814+
795815
const char* exceptionName = (exceptionCode == EXCEPTION_STACK_BUFFER_OVERRUN) ? "Stack Buffer Overrun"
796816
: (exceptionCode == EXCEPTION_HEAP_CORRUPTION) ? "Heap Corruption"
797817
: "Security Exception";

0 commit comments

Comments
 (0)