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:
bicarus-dev
2025-10-04 13:50:04 -07:00
committed by GitHub
parent 8d3b15641f
commit 8e2985d8d0
3 changed files with 26 additions and 17 deletions
+1 -1
View File
@@ -10,5 +10,5 @@ namespace deferredlogs {
extern const std::initializer_list<std::string> SUPERSTEP_SOUND_ERROR_MESSAGE;
void defer_error_messages(std::initializer_list<std::string> messages);
void dump_to_logger();
void dump_to_logger(bool is_crash=false);
}