mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
troubleshooter: properly fix deadlock (#395)
## Description of change Finally figured out where the deadlock was coming from - it's because the `dump_to_logger` was writing `SuperstepSound: Audio device is not available` to the logger which calls back into the log hook, and then emits another deferred message, trying to acquire the lock again on the same stack. ## Testing Tested the superstep sound failure case again.
This commit is contained in:
@@ -101,7 +101,7 @@ static LONG WINAPI TopLevelExceptionFilter(struct _EXCEPTION_POINTERS *Exception
|
||||
switch (ExceptionRecord->ExceptionCode) {
|
||||
case EXCEPTION_ILLEGAL_INSTRUCTION:
|
||||
deferredlogs::defer_error_messages({
|
||||
"Illegal instruction exception:",
|
||||
"illegal instruction exception:",
|
||||
" either your CPU is too old (e.g., does not support SSE4.2 or AVX2 ",
|
||||
" but perhaps the game requires it); or, a bad patch was applied."
|
||||
});
|
||||
@@ -124,7 +124,7 @@ static LONG WINAPI TopLevelExceptionFilter(struct _EXCEPTION_POINTERS *Exception
|
||||
|
||||
// dump deferred logs BEFORE stack trace since some errors cause stack trace logic to hang
|
||||
// (e.g., ACIO init hang due to RTSS)
|
||||
deferredlogs::dump_to_logger();
|
||||
deferredlogs::dump_to_logger(true);
|
||||
|
||||
// walk the exception chain
|
||||
struct _EXCEPTION_RECORD *record_cause = ExceptionRecord->ExceptionRecord;
|
||||
|
||||
Reference in New Issue
Block a user