-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Freezing upon loading savestates #32
Comments
Actually, I just tested the above program using a different savestate and it worked just fine. I don't know why it works with one savestate but not the other. |
I found some potential clues to what causes these freezes. The savestate I mention here freezes on the second load when V-Sync is enabled, but it works fine again when V-Sync is disabled. I then found an easier fix which worked for all savestates I tested: setting the emulation speed limit to 10%. I don't know much about how Dolphin or this branch works, but I have some guesses for what's going on here. I think the problem isn't with loading a savestate twice; it's with loading a savestate in the middle of emulation. It appears that somehow, giving Dolphin more time to fully load a savestate before it advances to the next frame fixes this problem. Therefore, this freeze may be caused by Dolphin trying to step to the next frame while |
Also, as @VIPTankz found out, adding |
I use the Looking at dolphins |
@JimB16 what's an example of a program that loads savestates properly? |
Yeah, it's possible there's a bunch of issues wrt race conditions. I'll have to make a stresstest and see if more rigorous synchronization between python code and emulation will fix it. Thanks for bringing it up, I'll leave this issue open for now. |
I'm also experiencing the same issue, only none of the workarounds here seem to fix it, disabling VSync, making new save states, slowing emulator speed, using time.sleep() before or after loading. Throwing my own (much more convoluted) workaround in for anyone else with this issue:
This workaround requires that the highlighted window is Dolphin, and requires external packages. But it's working for me, so I'm throwing it out for anyone that might have the same issue. |
This should work even if the window isn't highlighted after checking Background Input in controller settings. I'll check if this works for me tomorrow. |
Thanks, I didn't know about that setting! I will try that when I get the chance later this week. |
I've noticed a few ways that savestate functions can cause Dolphin to freeze. The first is when you attempt to load a savestate with the scripting API that wasn't created using the API. (Edit: This actually works, but for some reason the game speed is much faster than normal upon loading.) Likewise, attempting to load a savestate with a hotkey will also cause a freeze if the savestate was created using the API. Finally, loading a savestate twice in the same program causes a freeze. This is a quick program that causes that:
I don't know why these freezes happen, and there might be some other bugs with the savestate module.
The text was updated successfully, but these errors were encountered: