-
Notifications
You must be signed in to change notification settings - Fork 374
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
3DS Encore save state failed with Bizhawk API #3875
Comments
Does this happen consistently? Please copy the version from |
Yup, always. Save states made using the UI works. You're right, i'm on 2.9.2, last version from master branch (rev a803407) |
Is this savestate possibly occurring in a separate thread? The error seems to indicate you are in a separate thread and it's when the main thread has the Encore OpenGL context active (and therefore other threads cannot make it active). You should not be calling SaveState outside of the main thread (this is more an OpenGL limitation if anything; even then savestates APIs (along with any other API touching emulator state) should not be considered safe outside of the main thread). |
Hi, Just to be sure, there is no workaround ? |
Doing savestates with other cores have very high risks of causing crashes (especially any waterbox cores like NDS due to non-thread safe code in its handling) and whatever savestates produced would very likely be garbage / not load correctly. Your code is fundamentally wrong here. |
Can't we make the call on the correct thread regardless of where the API was called from? |
The API user could do that with the WinForms BeginInvoke/Invoke API. |
Good to know. Thanks a lot @CasualPokePlayer, @YoshiRulz ! If API methods are not threadsafe, I close the issue and will work with BeginInvoke and Invoke methods |
Summary
Exception when saving state via SaveState API with a c# external tool
Repro
Output
Host env.
The text was updated successfully, but these errors were encountered: