I can add my module just fine but after stopping rack and restarting rack crashes with the following line in the crash report:
rack::app::ParamWidget::step() + 21 (ParamWidget.cpp:113)
Issue 2
I have a custom knob which points to a label and updates it. When I try to reference the paramQuantity to get the value rack crashes with this:
BPMKnob::formatCurrentValue() + 18 (SimpleClock.cpp:109)
Here is my v1 source:
Is there something I am missing about param widget or param quantity???
I tried to build and run your v1 but you havenāt checked in a plugin.json so I couldnāt. If you could check that in on your V1 branch Iād be happy to give it a try. Others probably more useful than me tho.
I see you already check for null against the paramQuantity which is the first thing I thought. I had some edge cases with module being null I had to deal with which took a turn or two.
OK! Iām headed out to an afternoon BBQ but got it to build. It cores out as soon as I open the module browser. My guess is that SimpleClockWidget is dealing improperly with a null module somewhere, probably where you bind your label to the knob. You may want to check module != null before you do that bind. So like āif module clock->connectLabel(bpmKnob)ā but I didnāt rebuild with that change
Yes, Iād guess the same thing.
See phase 1.9 of https://vcvrack.com/manual/Migrate1.html, and make sure that SimpleClockWidget and BPMKnob are checking if (module) ..., since Module Browser gives your ModuleWidget a NULL module.
On my Mac it crashes in the module browser every time. Perhaps you are reading corrupt memory successfully in the module browser on your platform and just dying later?
If I get some post bbq time I will see if I see anything!
pushed v1 up again with a null check for module inside the knob. This seems to help one issue. Still messing with my other issue - when rack restarts with the clock loaded it crashes right away.
I just stumbled into the same issue with a custom widget:
Thread 1 āRackā received signal SIGSEGV, Segmentation fault.
0x00007fffec006494 in HammDisplay::draw (this=0x17ddba0, args=ā¦) at src/AModal.hpp:149
149 unsigned int idx = module->idx;
where the issue is that module is NULL.
I donāt know if it is of any help to other people here, but to improve the drawing in the module browser I draw the background graphics of my widget before checking that module is NULL and returning. The appearance in the module browser wonāt be totally right, but at least better than nothingā¦
Just sent a pull request which gets your modules at least not segfaulting with V1.0 on my mac. I can also bind my LFO to your bouncing sprite panel and your sprite does indeed bounce. I donāt know how to test the rest of the modules.
Iām fine to assign copyright on my diffs to you if you want to merge them directly if such a thing matters to you. Lemme know over on GitHub. Alternately you can reject my PR and just implement it. Basically when you return a string from something that checks for null, make sure to return a string if it is null etcā¦ Turning off deprecation warnings and looking at remaining warning got me there. You were 99% of the way there.
Still having the same exact issue. When I restart rack it crashes with the trace i listed above. @baconpaul can you try adding a clock, closing down rack. and restarting rack and see if it crashes?
Using the branch from my PR last night, I can start up rack, load your simple clock, quit, and restart, and quit, and restart over and over. No problem.
Wanna push your code again and Iāll take a peek? I donāt have much time next day or two unfortunately.
On my mac using GitHub hash 02626925617a32b8d7dcfcdcf53ff07d7a4d4844 I can build it and load your modules fine with V1. Load unload, restart, over and over, etcā¦
Iāve been using the rack binaries for v1 for sdk and runtime since the weekend. I have a little bash script that downloads them and sets the path and runs and everything including making user dir and running rack with the right args and stuff. If you want thatās in GitHub.com/surge-synthesizer/surge-rack in the scripts directory. Should be straight forward if you know bash
Are you on Mac? I could also try windows 10 or linux if you want but not now - Iām headed to dinner.