Emulator Issues #8719
closedDolphin hard freezes while saving/loading savestates with the TAS input window open
0%
Description
Game Name?
Twilight Princess (GCN). Unable to test if other games are affected
Game ID?
GZ2E01
What's the problem? Describe what went wrong in few words.
Dolphin freezes when saving and/or loading savestates while the TAS input window is open. There is no exception message generated nor does Dolphin crash. It just hangs indefinitely until windows tells me Dolphin is not responding.
What did you expect to happen instead?
Dolphin to not freeze
What steps will reproduce the problem?
- Start the game
- Open the TAS input window
- Save and load savestates rapidly until Dolphin freezes. This can happen after a single savestate load/save, or after 20. It will always happen eventually and never happens if the TAS input window is closed
Note: A single controller connected in port 1. Using mouse and keyboard
Does using an older version of Dolphin solve your issue? If yes, which
versions of Dolphin used to work?
I tested Dolphin 4.0-6891 (latest as of today), Dolphin 4.0-6820, 4.0-5371, 4.0 stable. The freeze occurs on all of them.
What are your PC specifications? (including, but not limited to: Operating
System, CPU and GPU)
I tested this on 3 different configurations, all of which are affected:
- Windows 7 64 bit. Intel i5, 4 GB RAM, Radeon HD 7970 (PC)
- Windows 8 64 bit. Intel i7, 4 GB RAM, Intel HD Graphics 4000 (Laptop)
- Windows XP 32 bit (could only test 4.0 stable on this one). AMD Athlon II X3, 4 GB RAM, GeForce 8800GT
The following Dolphin settings were used:
Hyrule Field Speed Hack, No Dual Core, No Idle Skipping, No Cheats, LLE Audio, Direct3D Renderer (usual settings for TASing)
Is there any other relevant information? (e.g. logs, screenshots,
configuration files)
This issue has plaguing me for some time now across different PCs and Dolphin versions. I'm pretty sure most others aren't affected as my friends from the speedrunning community TAS just fine using these builds and, from my knowledge, never encounter these freezes, so I'm at a loss.
With my limited coding abilities I was able to deduce that it might be caused by a threading issue when you savestate while the function GetPadStatus() in SI_DeviceGCController.cpp is calling the TAS input window to update its status of the various virtual buttons/control sticks.
With a rather dirty hack that delays the savestate operation until the GetPadStatus() function is nearly finished DID fix the freeze completely, but introduced nasty side-effects such as the controller occasionally stopping to update/respond at all once you load/save a state making it impossible to control the game.
Fixing the source of the problem seems more helpful, but there my knowledge unfortunately ends. Hopefully this will help a bit to track the issue down.
Thanks in advance and I wish the awesome Dolphin team a wonderful weekend :)