View Issue Details

IDProjectCategoryView StatusLast Update
0001789Slicer4Core: MRMLpublic2014-03-06 06:10
Reporterliuy5 Assigned Tonicole  
PriorityurgentSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product VersionSlicer 4.0.1 
Target VersionSlicer 4.1.0Fixed in VersionSlicer 4.1.1 
Summary0001789: Slicer crashes after cropping and saving
Description

Slicer 4 2012-03-06

  1. launch slicer
  2. load an image
  3. do cropping
  4. save it
  5. close scene
  6. crash

Tested on multiple images

TagsNo tags attached.

Activities

liuy5

liuy5

2012-03-08 12:16

developer   ~0003810

The problem is not seen in r19532 64bit windows binary.

nicole

nicole

2012-03-08 12:38

administrator   ~0003811

Last edited: 2012-03-08 12:41

Hmm, the back trace in the debugger hits the same error as in bug 1759, but I'm also getting an assert crash after I unhook the debugger, Slicer stays open, and I do File -> Exit:
ASSERT: "d->IsEntered == true" in file /projects/birn/nicole/Slicer4/Slicer4/Base/QTGUI/qSlicerAbstractModuleWidget.cxx, line 65

Is the crop volume module missing an enter() call? It has one, but is over riding the superclass, so adding in a call to the supercalss enter method and seeing if that helps.

nicole

nicole

2012-03-08 13:17

administrator   ~0003815

svn 19547 fixes the assert problem (could be seen if started up slicer, entered CropVolume, then tried to switch to another module). Didn't see the crash on scene close this time, will test more.

nicole

nicole

2012-03-12 10:19

administrator   ~0003839

Crash also happens if load a volume, go to editor to create a label volume, save scene, close scene.

nicole

nicole

2012-03-12 14:47

administrator   ~0003844

If I change the scene view node destructor:

  • this->Nodes->GetNodes()->RemoveAllItems();
  • //this->Nodes->GetNodes()->RemoveAllItems();
  • this->Nodes->Clear(1);

it changes the crash to happen if you restore a scene view and then close the scene (crash in referencing nodes of the crosshair node), but saving the mrml file (with scene view) then closing the scene doesn't crash due to volume node image data.

Still trying to figure out what the scene view saved scene thinks it's referenced/ing nodes are pointing to.

finetjul

finetjul

2012-03-12 16:32

administrator   ~0003846

Last edited: 2012-03-12 16:32

this->Nodes->GetNodes()->RemoveAllItems(); seems extremelly dangerous as it removes nodes without informing scene and node observers.

nicole

nicole

2012-03-13 06:27

administrator   ~0003849

The RemoveAllItems calls triggers Delete on the nodes it contains and the node removed event does trigger a bit of an observer clean up.
The destructor of the volume nodes calls SetAndObserveImageData(NULL) which does remove observations on the image data, but the next problem is that it tries to iterate through it's display nodes and the ids are pointing to invalid nodes at that point.
The Clear call seems to be less dangerous, but I still need to look at the RestoreScene call to fix any dangerous calls there.

nicole

nicole

2012-03-13 12:23

administrator   ~0003856

The Crop Volume error seems to be fixed as of svn 19588....

nicole

nicole

2012-03-14 06:37

administrator   ~0003862

svn 19597 reverts some changes to how the scene views are saved/restored and this crash is not longer happening. Yanling, could you verify that it works for you and set this bug status to closed if so?

Issue History

Date Modified Username Field Change
2012-03-06 05:20 liuy5 New Issue
2012-03-08 11:55 finetjul Status new => assigned
2012-03-08 11:55 finetjul Assigned To => nicole
2012-03-08 11:55 finetjul Category Usability => MRML
2012-03-08 11:55 finetjul Target Version => Slicer 4.1.0
2012-03-08 12:16 liuy5 Note Added: 0003810
2012-03-08 12:30 nicole Relationship added duplicate of 0001759
2012-03-08 12:38 nicole Note Added: 0003811
2012-03-08 12:41 nicole Note Edited: 0003811
2012-03-08 13:17 nicole Note Added: 0003815
2012-03-09 12:22 nicole Relationship deleted 0001759
2012-03-12 10:19 nicole Note Added: 0003839
2012-03-12 14:47 nicole Note Added: 0003844
2012-03-12 16:32 finetjul Note Added: 0003846
2012-03-12 16:32 finetjul Note Edited: 0003846
2012-03-13 06:27 nicole Note Added: 0003849
2012-03-13 12:23 nicole Note Added: 0003856
2012-03-14 06:37 nicole Note Added: 0003862
2012-03-14 06:37 nicole Status assigned => resolved
2012-03-14 06:37 nicole Resolution open => fixed
2012-05-04 04:07 liuy5 Status resolved => closed
2014-03-06 06:10 jcfr Fixed in Version => Slicer 4.1.1