View Issue Details

IDProjectCategoryView StatusLast Update
0003060Slicer4Core: MRMLpublic2014-03-06 06:16
Reporterpinter Assigned Toalexy  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product VersionSlicer 4.2.2-1 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.0 
Summary0003060: Crash when show/hide models or annotations
Description

Reproducing is very simple for me (on Windows anyway):

  • Start Slicer
  • Load any vtk model
  • Go to Models
  • Try to hide it
Additional Information

In vtkMRMLDisplayableNode::SetDisplayVisibility the DisplayNodes
vector is traversed and Visibility is set on each. But when this set
macro is called, the Modified flag is turned on, and so
vtkMRMLModelDisplayableManager::OnMRMLDisplayableModelNodeModifiedEvent is
called. In this function, vtkMRMLDisplayableNode::GetDisplayNodes is
called, which clears the DisplayNodes vector and re-populates it.
Eventually the SetDisplayVisibility continues, and it wants to go
through the same vector as before, but it has changed. The vector is
good, the items in it are valid, but it has been cleared and
re-populated since we entered the for cycle. This is where it crashes.

TagsNo tags attached.

Activities

alexy

alexy

2013-04-09 11:29

developer   ~0008354

I cannot find vtkMRMLDisplayableNode::SetDisplayVisibility method in current slicer code.

pinter

pinter

2013-04-09 13:19

developer   ~0008357

http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Libs/MRML/Core/vtkMRMLDisplayableNode.cxx?revision=21850&view=markup

Line 175 through 191.

alexy

alexy

2013-04-10 18:51

developer   ~0008375

Replaced the use of vtkMRMLDisplayableNode::DisplayNodes with vtkMRMLDisplayableNode::GetDisplayNodes()
At revision: 21884

pinter

pinter

2013-04-11 06:07

developer   ~0008376

The last commit broke the dashboard:
http://slicer.cdash.org/viewBuildError.php?buildid=84792

I'll close it when Slicer builds again.

alexy

alexy

2013-04-19 05:53

developer   ~0008446

Made

const std::vector<vtkMRMLDisplayNode*>& vtkMRMLDisplayableNode::GetDisplayNodes();

  • Obsolete

    utility function that provides an unsafe API. Please use GetNumberOfDisplayNodes() and GetNthDisplayNode() instead.

At revision: 21898

pinter

pinter

2013-04-25 09:48

developer   ~0008488

There is no crash on showing/hiding models now.

Issue History

Date Modified Username Field Change
2013-04-09 07:12 pinter New Issue
2013-04-09 07:12 pinter Status new => assigned
2013-04-09 07:12 pinter Assigned To => alexy
2013-04-09 11:29 alexy Note Added: 0008354
2013-04-09 11:30 alexy Status assigned => feedback
2013-04-09 13:19 pinter Note Added: 0008357
2013-04-10 18:51 alexy Note Added: 0008375
2013-04-10 18:51 alexy Status feedback => resolved
2013-04-10 18:51 alexy Resolution open => fixed
2013-04-11 06:07 pinter Note Added: 0008376
2013-04-19 05:53 alexy Note Added: 0008446
2013-04-25 09:48 pinter Note Added: 0008488
2013-04-25 09:48 pinter Status resolved => closed
2013-04-25 09:48 pinter Fixed in Version => Slicer 4.3.0
2014-03-06 06:16 jcfr Target Version => Slicer 4.3.0