Closed cschol closed 5 years ago
ok can you try it now latest git hash: 3c6966dc5bb6e7030d1435cfd1fd89d0354c1b25
That did not fix it.
However, I found the issue:
When looking at the Blank
panel code in Rack's Core
I noticed that your prototype for the Widget classes, e.g. BlankPanelSmallWidget
, uses the derived BlankPanel
type for the *module
pointer:
struct BlankPanelSmallWidget : ModuleWidget { BlankPanelSmallWidget(BlankPanel *module); };
Per the example in Andrew's code, it should be:
struct BlankPanelSmallWidget : ModuleWidget { BlankPanelSmallWidget(Module *module); };
Updating the signature in all instances in the BlankPanel.cpp
source file will make it work correctly.
Now, I am a little confused why this code needs to be like this, but the other modules in your plugin are fine using the derived class in their Widget signature. Maybe @AndrewBelt can comment on that?
ok try it now 3fd0054 It never crashed for me but whatever.
This is on GNU/Linux (Ubuntu 18.04). Which platform do you develop on?
Still crashing with the latest change.
The following additional change is required to make it work (use base class type in createModel
):
Model *modelBlankPanelSmall = createModel<Module, BlankPanelSmallWidget>("BlankPanel_SM");
Model *modelBlankPanelMedium = createModel<Module, BlankPanelMediumWidget>("BlankPanel_MD");
Model *modelBlankPanelLarge = createModel<Module, BlankPanelLargeWidget>("BlankPanel_LG");
ok try it now 2bcb52b I'm on a mac. Sorry I couldn't test these changes because the blank panels work for me.
No worries. That's why I test this. And thank you for providing your plugin early so we can figure these things out.
Now it works. I will integrate the new version in the library repo.
Rack v1.0.0 crashes when selecting any of the 3 blank modules ("JW Head") in the module browser.
Stack trace: