Code Monkey home page Code Monkey logo

Comments (11)

KottV avatar KottV commented on May 29, 2024 1

Confirm that newly saved states are loaded well.
Thankk You!

from bespokesynth.

awwbees avatar awwbees commented on May 29, 2024

the stuff in the "layouts" directory is old and kinda legacy, I should remove those to reduce confusion. "load state" isn't intended for those .json files, but instead .bsk files that you save via the "save state" button.

that said, loading .bsk files may still be crashing on linux. it's currently crashing on windows, which I'm taking a look at. OSX is the primary platform I use/develop on, and load/save does work there.

from bespokesynth.

KottV avatar KottV commented on May 29, 2024

I'm able to load some old layouts by putting them into userprefs.json
Saving to bsk is not crashing, but files contains the garbage symbols, should i provide an example?
Loading of bsk (cleaned) is crashing, yes.

from bespokesynth.

awwbees avatar awwbees commented on May 29, 2024

.bsk files contain binary data (for example, they'll save wave data from a looper), so those aren't actually garbage symbols, they're expected to contain some non-text data. clearing out the non-text data will make the files corrupted.

I think the issue you're having in Linux is probably the same issue as I have when trying to load a .bsk on Windows, and hopefully will be a simple fix for me, just a matter of digging in

from bespokesynth.

KottV avatar KottV commented on May 29, 2024

test.bsk.gz

Sorry about garbage :)

Maybe it can help:

LoadState() ../Release/data/savestate/test.bsk
Unable to parse string
error: Couldn't load, error parsing json string
Bespoke: ../../Source/ModuleContainer.cpp:518: void ModuleContainer::LoadState(FileStreamIn&): Assertion `module' failed.

Thread 1 "Bespoke" received signal SIGABRT, Aborted.

#4 0x000000000094552e in ModuleContainer::LoadState(FileStreamIn&) (this=0x17ad470, in=...) at ../../Source/ModuleContainer.cpp:518
#5 0x00000000009325cd in ModularSynth::LoadState(std::__cxx11::basic_string<char, std::char_traits, std::allocator >) (this=0x17acf28, file=...) at ../../Source/ModularSynth.cpp:1629
#6 0x0000000000931e5b in ModularSynth::LoadStatePopupImp() (this=0x17acf28) at ../../Source/ModularSynth.cpp:1594
#7 0x000000000092a02c in ModularSynth::Poll() (this=0x17acf28) at ../../Source/ModularSynth.cpp:165
#8 0x00000000009240a9 in MainContentComponent::timerCallback() (this=0x17ac8d0) at ../../Source/MainComponent.cpp:69

from bespokesynth.

awwbees avatar awwbees commented on May 29, 2024

aha, it looks like this is happening for localization reasons, because your system's number format is set to use commas as the decimal separator. in the json you can see:
"position" : [ 438,0000000000000, 526,0000000000000 ],
when it is expecting to see
"position" : [ 438.0000000000000, 526.0000000000000 ],
so it's breaking the parser.

I will try to figure out a new way of serializing floating point numbers that does not get affected by system locale settings. a temporary workaround for you would be to change your system's number format to use a period instead of comma as the decimal separator, but this is obviously not ideal.

from bespokesynth.

awwbees avatar awwbees commented on May 29, 2024

I've just submitted a potential untested fix in d5629a8, where I force Bespoke to use the "classic" locale

from bespokesynth.

KottV avatar KottV commented on May 29, 2024

manually changing commas to periods did the trick
but fix doesn't resolve, sadly

from bespokesynth.

awwbees avatar awwbees commented on May 29, 2024

ah, thank you for testing. I will try to set my system up to reproduce the issue, so I can step through it and find a proper fix.

from bespokesynth.

KottV avatar KottV commented on May 29, 2024

thank you
glad to help!

from bespokesynth.

awwbees avatar awwbees commented on May 29, 2024

I tested and was able to reproduce the issue before my change (save state, try to load that state, crash), and observed that it was fixed after my change d5629a8 (save state, try to load that state, now it succeeds). However, if you tried to load an old save that you had created before the fix, it would still crash when trying to load it after the fix, which is expected. Marking as closed.

from bespokesynth.

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.