kockie69 / SquinkyVCV-main

GNU General Public License v3.0
22 stars 12 forks source link

crash loading patches for booty shifter #13

Closed squinkylabs closed 2 years ago

squinkylabs commented 2 years ago

It looks like the json is (now) deserialized before the widget is created. Looks like bad code on my part. There is a widget called PopupMenuParamWidget that attempts to do this better, don't know if that would help.

I inserted a booty shifter. turned the knobs quit Rack ran rack again boom!

Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007fffc55e3d05 in BootyModule::dataFromJson (this=0x19cfcf326b0,
    rootJ=<optimized out>) at src/BootyModule.cpp:102
102                     WARN("existing text = %s", rangeChoice->text.c_str());
(gdb) bt
#0  0x00007fffc55e3d05 in BootyModule::dataFromJson (this=0x19cfcf326b0,
    rootJ=<optimized out>) at src/BootyModule.cpp:102
#1  0x00007ff80a967f9b in rack::engine::Engine::fromJson (this=0x19cfb05de00,
    rootJ=rootJ@entry=0x19cfcf1b070) at src/engine/Engine.cpp:1266
#2  0x00007ff80a92926c in rack::patch::Manager::fromJson (
    this=this@entry=0x19cfcded400, rootJ=rootJ@entry=0x19cfcf1b070)
    at src/patch.cpp:457
#3  0x00007ff80a9294a1 in rack::patch::Manager::loadAutosave (
    this=0x19cfcded400) at src/patch.cpp:319
kockie69 commented 2 years ago

This one can be tested as it is solved. Moved a shared variable to module

squinkylabs commented 2 years ago

yeah, seems fine now.