View Issue Details

IDProjectCategoryView StatusLast Update
0000579Slicer3GUIpublic2009-05-12 12:13
Reporternicole Assigned Towjp  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Platformlinux64OSOS Version
Summary0000579: Loading data using Data module widgets causes crash if Data GUI not built
Description

This error case can arise because I reused the Data module's new loading widgets in the Models GUI. But if you start up Slicer in such a way that the Data module GUI hasn't been built before trying to load a new unknown extension model from the Models module, there's an error message that tries to come up in a dialogue that has as it's parent the Data module's gui, which hasn't been created yet. In vtkSlicerDataGUI.cxx ProcessGUIEvents there are multiple instances of the dialog's calling SetParent with
this->UIPanel->GetPageWidget ( "Data" )
My plan had been to reuse the Data modules's loading widgets from other modules, but this crash needs to be avoided first. It's not obvious to me on first glance what the dialog parents should be.

Steps To Reproduce

Using the 3.4 branch:
(not sure this one is necessary, but delete the .3D Slicer Version 3.4 RC1rc file in your home directory)
Start up slicer using: ./Slicer --no-modules
It should come up with the Data string in the module chooser drop down menu, but it looks like the Slices module GUI is in the left hand frame, but not actually filled in.
Click on the Models icon in the toolbar, without opening any other modules.
Click on the Add a 3D Model button.
Click on the Select Model button to bring up a file browser.
Select a model file with an unknown extension (ie attached rh.hippo)
Slicer will crash with a seg fault and this error message:

ERROR: In /projects/birn/nicole/Linux/Slicer3-lib/KWWidgets/vtkKWWidget.cxx, line 283
vtkKWMessageDialog (0x2f11870): Can not create widget if its application attribute was not set. Make sure that you called the SetApplication method on this widget, or that you set its parent to a widget which application attribute is set already.

ERROR: In /projects/birn/nicole/Linux/Slicer3-lib/KWWidgets/vtkKWTopLevel.cxx, line 95
vtkKWMessageDialog (0x2f11870): Failed creating widget vtkKWMessageDialog

TagsNo tags attached.

Activities

2009-05-07 07:21

 

rh.hippo (90,344 bytes)
nicole

nicole

2009-05-07 07:36

administrator   ~0000948

In vtkSlicerModelsGUI.cxx, ProcessGUI events, I get the Data GUI, check that it's not null, and call RaiseAddModelWindow. That works fine, it's not until the error dialogue comes up that the crash occurs.

wjp

wjp

2009-05-07 12:46

administrator   ~0000951

I've created the UI elements in the ModelsGUI that it was borrowing from DataGUI; this way we don't have to worry about the case that DataGUI wasn't yet created (causing those widgets to be unavailable for Models module's use...) I believe this is fixed now.

There is another bug mixed in with this bug tho. That's what is reported about starting slicer up with --no-modules, and having the Data Module be selected in the modules menubutton, but the gui panel populated with what appears to be the slices gui (sans any widgets.) I will report this as a separate bug, and try to figure out what's going on.

Issue History

Date Modified Username Field Change
2009-05-07 07:21 nicole New Issue
2009-05-07 07:21 nicole Status new => assigned
2009-05-07 07:21 nicole Assigned To => wjp
2009-05-07 07:21 nicole File Added: rh.hippo
2009-05-07 07:21 nicole Tag Attached: 3.4 Targeted fix
2009-05-07 07:36 nicole Note Added: 0000948
2009-05-07 12:46 wjp Note Added: 0000951
2009-05-07 12:46 wjp Status assigned => resolved
2009-05-07 12:46 wjp Resolution open => fixed
2009-05-12 12:13 pieper Status resolved => closed
2009-05-18 11:37 wjp Tag Detached: 3.4 Targeted fix