Operating system: Windows 10, 64 Bit
Expected behavior: Show module UI
Actual behavior: Slicer crashes
Hi together, I am pretty new to Slicer (just started to work with Andrey Fedorov) and currently looking into the T1Mapping Extension ([https://github.com/QIICR/T1Mapping/tree/master/T1Mapping]). After it compiled fine it unfortunately crashes as soon as I try to load the module (select it under “All Modules”). I tracked the crash until “qSlicerCLIModuleUIHelper::updateUi” and from there it goes into “ButtonGroupWidgetWrapper::checkedValue()” for the IO parameter “modelName” which is a string-enumeration. Inside “ButtonGroupWidgetWrapper::checkedValue()” the call to “this->ButtonGroup->checkedButton()” returns a NULL pointer which causes the following assert to fail and crash the app.
I cannot figure out what is wrong. The T1Mapping source code is unaltered. I did notice that the string-enumeration did not declare a default, which I thought could be a problem, but adding a default in the xml didn’t change anything.
I would be happy if someone has an idea what could be wrong.
The simple fix is to set a <default> element for the modelName string-enumeration. The correct fix for Slicer core is probably to remove this assert, because returning NULL is part of the buttongroup interface. Try this patch:
Thank you for the answer. It works now! I actually had tried to add the <default> element before, but only build the solution, while it apparently required a complete re-build to make the changes in the xml take effect.