diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-08-07 17:58:46 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2020-08-07 17:58:46 +0200 |
commit | dd34651f4d42ca598b2f1b2ed32e27b4742f4be7 (patch) | |
tree | 67180b7d7540825f97bce5d075aa2165966c1d30 /src/common | |
parent | c5e1b49e8c02386a0e9edf682692dc6d46cc862f (diff) |
Core/CrashHandler: Skip logging stack trace of the thread writing the crash log, it was launched by windows with same context as crashing thread
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/Debugging/WheatyExceptionReport.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp index cbfc1fd3beb..e3d6bd43f27 100644 --- a/src/common/Debugging/WheatyExceptionReport.cpp +++ b/src/common/Debugging/WheatyExceptionReport.cpp @@ -425,6 +425,7 @@ void WheatyExceptionReport::printTracesForAllThreads(bool bWriteVariables) THREADENTRY32 te32; DWORD dwOwnerPID = GetCurrentProcessId(); + DWORD dwCurrentTID = GetCurrentThreadId(); m_hProcess = GetCurrentProcess(); // Take a snapshot of all running threads HANDLE hThreadSnap = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0); @@ -448,7 +449,7 @@ void WheatyExceptionReport::printTracesForAllThreads(bool bWriteVariables) // associated with the specified process do { - if (te32.th32OwnerProcessID == dwOwnerPID) + if (te32.th32OwnerProcessID == dwOwnerPID && te32.th32ThreadID != dwCurrentTID) { CONTEXT context; context.ContextFlags = 0xffffffff; |