Workaround for crashes on "Close Content" #56
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Workaround that appears to fix most crashes on
Close Content
on Windows 10 and Xbox. I haven't tested this on Linux.This is, by no means, a proper fix, as it appears to leave behind a zombie process more frequently when closing Retroarch. A more robust solution is needed in the long run, but for now, I believe this is the lesser of two evils. Some testing results on my end:
In the most recent build before this PR, the Windows 10 build would frequently crash on
Close Content
or hang when running content after previously closing content, particularly when MTVU was on. The Xbox build would almost always crash or hang when closing content or when loading content after having previously closed content in pcsx2.With speedhacks enabled and set to the
Balanced
preset (as to enable MTVU), I tested 21 games on Xbox Series X. In sequence, I managed to boot 20/21 of them to menu, close content, and launch the next game without a single crash or hang. The only game in my testing that failed to close was Jak II, which hung onClose Content
. This does not appear to be a regression, since Jak II also hung onClose Content
with the previous build.Some notes:
Restart Content
still deadlocks. This workaround doesn't fix that