Reproducible Slicer crash deleting MarkupsROINodes from subject hierarchy

mikebind
Wed, 08 May 2024 21:15:10 +0000
Support

I get a reproducible Slicer application crash following these steps:

Open Slice (scene is empty)
Run

roiNode1 = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLMarkupsROINode")
roiNode1.SetSize((100, 100, 100))
roiNode2 = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLMarkupsROINode")
roiNode2.SetSize((50, 50, 50))

Select both ROI nodes in the subject hierarchy, right click, and select Delete. After a brief pause, Slicer crashes.

If I don’t set the size I don’t get a crash. If I create the ROIs using the GUI, I don’t get the crash. I’m using Slicer 5.7.0-2024-05-1 on Windows.
Also, if there is only one ROI node, deleting it doesn’t cause a crash, so perhaps it has something to do with iterating over multiple objects to delete. Also, since deleting multiple ROIs which were created via GUI does not cause the crash, I would guess that maybe there is something incompletely initialized about those created via AddNewNodeByClass.

4 posts - 2 participants