Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Comments Needed] Core: Pause CPU and other systems only if initialized fully #8335
NOTE: I cannot fully guarantee this PR is free of side effects. Basing on my best intent and the current knowledge of Dolphin's codebase I expect it to work as intended and without unintended side effects, but I would really like other people to review and comment on the change.
Fixes a race condition where invoking RunAsCPUThread before Emulation thread has fully started, resulting in Dolphin attempting to pause yet uninitialized systems.
Cause of the issue
This issue occurs when
Reproducing the issue
This race is relatively rare, so my repro steps are somewhat convoluted and involve adding an extra sleep to the code to make it easier to reproduce:
a. "Slow down" emulation start routines by adding a sleep (100ms is enough) at the very top of
Game crashes at either
Game launches normally.