I posted an issue yesterday, that I quickly closed again as I though I had fixed my issue, as it loaded my rack with the module just fine. However today I realized, it can open my rack with the module already inserted, however if I try to open the browser to insert other modules it crashes (hence not fixed). Here are the last lines of the log, but it doesn’t help me much
[7.415 info src/app/Browser.cpp:201 createPreview] Creating module widget Infinite-Noise PatchBay
[7.759 fatal adapters/standalone.cpp:49 fatalSignalHandler] Fatal signal 11. Stack trace:
31: 0x0
30: 0x0
29: _C_specific_handler 0x7ffaf940b1b0
28: _chkstk 0x7ffaf9c34f20
27: RtlFindCharInUnicodeString 0x7ffaf9baddd0
26: KiUserExceptionDispatcher 0x7ffaf9c34010
25: ZN20PatchBayModuleWidgetC1EP14PatchBayModule 0x7ffa43606f70
24: ZZN4rack11createModelI14PatchBayModule20PatchBayModuleWidgetEEPNS_6plugin5ModelENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEN6TModel18createModuleWidgetEPNS_6engine6ModuleE 0x7ffa43627f30
23: ZN4rack3app7browser8ModelBox4drawERKNS_6widget6Widget8DrawArgsE 0x7ffa4bcb0660
22: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffa4b852d00
21: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffa4b852e70
20: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffa4b852d00
19: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffa4b852e70
18: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffa4b852d00
17: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffa4b852e70
16: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffa4b852d00
15: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffa4b852e70
14: ZN4rack2ui12ScrollWidget4drawERKNS_6widget6Widget8DrawArgsE 0x7ffa4b84af60
13: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffa4b852d00
12: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffa4b852e70
11: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffa4b852d00
10: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffa4b852e70
9: ZN4rack6widget6Widget9drawChildEPS1_RKNS1_8DrawArgsEi 0x7ffa4b852d00
8: ZN4rack6widget6Widget4drawERKNS1_8DrawArgsE 0x7ffa4b852e70
7: ZN4rack6window6Window4stepEv 0x7ffa4b854f20
6: ZN4rack6window6Window3runEv 0x7ffa4b855a10
5: ZN4rack6window6Window3runEv 0x7ffa4b855a10
4: ZN4rack6window6Window3runEv 0x7ffa4b855a10
3: ZN4rack6window6Window3runEv 0x7ffa4b855a10
2: ZN4rack6window6Window3runEv 0x7ffa4b855a10
1: BaseThreadInitThunk 0x7ffaf8b92560
0: RtlUserThreadStart 0x7ffaf9beaf00
I am trying to create a “custom” SvgSwitch, with my own two svg-files. If I do the following in my widget, all is fine:
SvgSwitch* muteSwitch = createParam<SvgSwitch>(Vec(butCol1, butRow), module, PatchBayModule::MUTE1_PARAM + i);
muteSwitch->addFrame(APP->window->loadSvg(asset::plugin(pluginInstance, "res/InfNoiseLtSmallBlackButton.svg")));
muteSwitch->addFrame(APP->window->loadSvg(asset::plugin(pluginInstance, "res/InfNoiseLtSmallRedButton.svg")));
muteSwitch->momentary = false;
addParam(muteSwitch);
However I would like my module to “have access” to this switch, as I in some cases will need to change the “momentary” state of these switches, So in my module I have added the following array
SvgSwitch* muteSwitch[16];
And then in stead in my widget I do this
module->muteSwitch[i] = createParam<SvgSwitch>(Vec(butCol1, butRow), module, PatchBayModule::MUTE1_PARAM + i);
module->muteSwitch[i]->addFrame(APP->window->loadSvg(asset::plugin(pluginInstance, "res/InfNoiseLtSmallBlackButton.svg")));
module->muteSwitch[i]->addFrame(APP->window->loadSvg(asset::plugin(pluginInstance, "res/InfNoiseLtSmallRedButton.svg")));
module->muteSwitch[i]->momentary = false;
addParam(module->muteSwitch[i]);
This last one is not working … most likely something trivial I can’t spot. As explained in the top, the odd part is it loads the rack just fine (with one of these modules already there), however it crashes when I try to open the browser