Giter VIP home page Giter VIP logo

Comments (8)

YoshiRulz avatar YoshiRulz commented on May 20, 2024

Does this happen consistently?

Please copy the version from Help > About..., obviously you didn't mean to write 2.5.2.

from bizhawk.

jlefebure avatar jlefebure commented on May 20, 2024

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)

from bizhawk.

CasualPokePlayer avatar CasualPokePlayer commented on May 20, 2024

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).

from bizhawk.

jlefebure avatar jlefebure commented on May 20, 2024

Hi,
Yep, i'm on a separate thread. I'm actually calling the SaveState method every 10 minutes to make an autosave. I did not encounter any issue with NDS or GBA emulation, but I assume that it does not use OpenGL

Just to be sure, there is no workaround ?

from bizhawk.

CasualPokePlayer avatar CasualPokePlayer commented on May 20, 2024

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.

from bizhawk.

YoshiRulz avatar YoshiRulz commented on May 20, 2024

Can't we make the call on the correct thread regardless of where the API was called from?

from bizhawk.

CasualPokePlayer avatar CasualPokePlayer commented on May 20, 2024

The API user could do that with the WinForms BeginInvoke/Invoke API.

from bizhawk.

jlefebure avatar jlefebure commented on May 20, 2024

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

from bizhawk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.