From 33c0c07972fd9a2edea9d16e9082e9ef5fcdce78 Mon Sep 17 00:00:00 2001 From: rfortier Date: Mon, 30 Sep 2024 14:25:11 -0400 Subject: [PATCH] Updated to latest /dev, restricted caught exceptions Rebased to current /dev Made the fix a bit safer by only catching EXCEPTION_ACCESS_VIOLATION, at the risk of not getting crahs dumps/logs for a few obscure and infrequest crash types. This is consistent with when crash dumps were triggered before this PR. --- Code/client/CrashHandler.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Code/client/CrashHandler.cpp b/Code/client/CrashHandler.cpp index a80ffc776..655a4a9be 100644 --- a/Code/client/CrashHandler.cpp +++ b/Code/client/CrashHandler.cpp @@ -30,9 +30,7 @@ LONG WINAPI VectoredExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo) const std::lock_guard lock{singleThreaded}; // Check for severe, not continuable and not software-originated exception - if (pExceptionInfo->ExceptionRecord->ExceptionCode >= 0x80000000 && - pExceptionInfo->ExceptionRecord->ExceptionCode != 0xE06D7363 && // Sigh. C++ exceptions forgot the SOFTWARE_ORIGINATE flag. - (pExceptionInfo->ExceptionRecord->ExceptionFlags & EXCEPTION_SOFTWARE_ORIGINATE) == 0 && + if (pExceptionInfo->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && alreadyCrashed++ == 0) { spdlog::critical (__FUNCTION__ ": crash occurred!");