So I’ve got a plugin I’m working on. The local builds run just fine. But the builds on github actions started not working for me when I migrated from 2.0.4 to 2.4.1.
I’ve migrated both my local builds and the git hub builds to be using 2.4.1.
The crash for me is happening in the module’s widget constructor.
I’ve traced the crash down to the TParamWidget* o = new TParamWidget; inside createParam. Here’s how:
Crash Log:
[2.720 info src/app/RackWidget.cpp:327 fromJson] Creating module widget JP Four Track
[2.721 debug src/FourTrack.cpp:428 FourTrackWidget] A
[2.721 debug src/FourTrack.cpp:430 FourTrackWidget] B1
[2.721 debug src/FourTrack.cpp:432 FourTrackWidget] B2 C:/Users/Andrew/Documents/Rack2/plugins-win-x64/JPLab/res/FourTrack.svg
[2.729 info src/window/Svg.cpp:28 loadFile] Loaded SVG C:/Users/Andrew/Documents/Rack2/plugins-win-x64/JPLab/res/FourTrack.svg
[2.729 debug src/FourTrack.cpp:434 FourTrackWidget] B3
[2.729 debug src/FourTrack.cpp:436 FourTrackWidget] C
[2.729 debug src/FourTrack.cpp:438 FourTrackWidget] D1
[2.729 debug src/FourTrack.cpp:440 FourTrackWidget] D2
[2.729 debug src/FourTrack.cpp:390 createParamCentered_my] createParamCentered_my A
[2.729 debug src/FourTrack.cpp:373 createParam_my] createParam_my A
[3.138 fatal adapters/standalone.cpp:49 fatalSignalHandler] Fatal signal 11. Stack trace:
21: 0x0
20: 0x0
19: _C_specific_handler 0x7ffc71e07f60
18: _chkstk 0x7ffc73c72100
17: RtlRaiseException 0x7ffc73c21030
16: KiUserExceptionDispatcher 0x7ffc73c70d00
15: RtlSizeHeap 0x7ffc73bf4160
14: NotifyShims 0x7ffc37df2190
13: free_base 0x7ffc7133f040
12: Z14createParam_myIN4rack16componentlibrary19RoundSmallBlackKnobEEPT_NS0_4math3VecEPNS0_6engine6ModuleEi 0x7ffbe396b770
11: ZN15FourTrackWidgetC1EP9FourTrack 0x7ffbe397f340
10: ZZN4rack11createModelI9FourTrack15FourTrackWidgetEEPNS_6plugin5ModelENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEN6TModel18createModuleWidgetEPNS_6engine6ModuleE 0x7ffbe39b3430
9: ZN4rack3app10RackWidget8fromJsonEP6json_t 0x7ffc0e3c8060
8: ZN4rack5patch7Manager8fromJsonEP6json_t 0x7ffc0e3884a0
7: ZN4rack5patch7Manager12loadAutosaveEv 0x7ffc0e388840
6: ZN4rack5patch7Manager6launchENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE 0x7ffc0e389f40
5: ZN4rack5patch7Manager6launchENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE 0x7ffc0e389f40
4: ZN4rack5patch7Manager6launchENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE 0x7ffc0e389f40
3: ZN4rack5patch7Manager6launchENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE 0x7ffc0e389f40
2: ZN4rack5patch7Manager6launchENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE 0x7ffc0e389f40
1: BaseThreadInitThunk 0x7ffc73267330
0: RtlUserThreadStart 0x7ffc73c22690
Code:
template <class TParamWidget>
TParamWidget* createParam_my(math::Vec pos, engine::Module* module, int paramId) {
DEBUG("createParam_my A");
TParamWidget* o = new TParamWidget;
DEBUG("createParam_my B");
o->box.pos = pos;
DEBUG("createParam_my C");
o->app::ParamWidget::module = module;
DEBUG("createParam_my D");
o->app::ParamWidget::paramId = paramId;
DEBUG("createParam_my E");
o->initParamQuantity();
DEBUG("createParam_my F");
return o;
}
template <class TParamWidget>
TParamWidget* createParamCentered_my(math::Vec pos, engine::Module* module, int paramId) {
DEBUG("createParamCentered_my A");
TParamWidget* o = createParam_my<TParamWidget>(pos, module, paramId);
DEBUG("createParamCentered_my B");
o->box.pos = o->box.pos.minus(o->box.size.div(2));
DEBUG("createParamCentered_my C");
return o;
}
struct FourTrackWidget : TrackModuleWidget<ROW_COUNT,COL_COUNT> {
//Other Code
FourTrackWidget(FourTrack* module) {
DEBUG("A");
setModule(module);
DEBUG("B1");
std::string a = asset::plugin(pluginInstance, "res/FourTrack.svg");
DEBUG("B2 %s",a.c_str());
auto b = createPanel(a);
DEBUG("B3");
setPanel(b);
DEBUG("C");
DEBUG("D1");
auto v = mm2px(Vec(5.149, 32.986));
DEBUG("D2");
auto d = createParamCentered_my<RoundSmallBlackKnob>(v, module, FourTrack::LENGTH_PARAM);
DEBUG("D3");
addParam(d);
DEBUG("E");
addParam(createParamCentered<Trimpot>(mm2px(Vec(15.486, 35.822)), module, FourTrack::LENGTH_AV_PARAM));
DEBUG("F");
addParam(createParamCentered<TrackSwitch>(mm2px(Vec(23.86, 63.53)), module, FourTrack::TRACK_CONFIG_PARAM));
DEBUG("G");
addParam(createParamCentered<ExtraModeSwitch>(mm2px(Vec(4.193, 49.00)), module, FourTrack::EXTRA_MODE_PARAM));
DEBUG("H");
Does anyone have any insight as to what might be going on here?
Each of my 5 modules inside this plugin crashes this way, though I haven’t specifically tracked down if there is one widget causing the problems yet. But since it was the first widget in FourTrack, I suspect its every parameter widget…