diff --git a/interface/src/Crashpad.cpp b/interface/src/Crashpad.cpp index 27da619af1..ae2f341337 100644 --- a/interface/src/Crashpad.cpp +++ b/interface/src/Crashpad.cpp @@ -40,27 +40,13 @@ extern QString qAppFileName(); #include LONG WINAPI vectoredExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo) { - static const DWORD EXTERNAL_EXCEPTION_CODE{ 0xe06d7363 }; - static const DWORD HEAP_CORRUPTION_CODE{ 0xc0000374 }; - - auto exceptionCode = pExceptionInfo->ExceptionRecord->ExceptionCode; - if (exceptionCode == EXTERNAL_EXCEPTION_CODE) { - return EXCEPTION_CONTINUE_SEARCH; - } - - if (exceptionCode == HEAP_CORRUPTION_CODE) { - qCritical() << "VectoredExceptionHandler: Heap corruption:" << QString::number(exceptionCode, 16); - + if (pExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_HEAP_CORRUPTION || + pExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_STACK_BUFFER_OVERRUN) { CrashpadClient client; if (gIPCPipe.length()) { - bool rc = client.SetHandlerIPCPipe(gIPCPipe); - qCritical() << "SetHandlerIPCPipe = " << rc; - } else { - qCritical() << "No IPC Pipe was previously defined for crash handler."; + client.SetHandlerIPCPipe(gIPCPipe); } - qCritical() << "Calling DumpAndCrash()"; client.DumpAndCrash(pExceptionInfo); - return EXCEPTION_CONTINUE_SEARCH; } return EXCEPTION_CONTINUE_SEARCH;