TheInterventionCentre / NorMIT-Plan

10 stars 1 forks source link

Bad access exception thrown when Slicer is exited after a resection has been created (mac only?) #16

Open lcoram opened 7 years ago

lcoram commented 7 years ago

When you close the program it eventually throws a bad access exception. Appears to come from the DisplayableManager - from something being called by OnMRMLSceneEndClose. If I comment out the call to this function in SetMRMLSceneInternal, then it does not crash on exit. But reading the code inside OnMRMLSceneEndClose I do not see why calling it should be a problem... you have checks before you loop through / delete items.


Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libvtkSlicerResectionPlanningModuleMRMLDisplayableManager.dylib 0x00000001420c7425 vtkInteractorObserver::Off() + 21 1 libvtkSlicerResectionPlanningModuleMRMLDisplayableManager.dylib 0x00000001420bc643 vtkMRMLResectionDisplayableManager3D::OnMRMLSceneEndClose() + 1971 2 libvtkSlicerResectionPlanningModuleMRMLDisplayableManager.dylib 0x00000001420b2637 vtkMRMLResectionDisplayableManager3D::SetMRMLSceneInternal(vtkMRMLScene) + 55 3 libMRMLLogic.dylib
0x0000000111482faa vtkMRMLAbstractLogic::SetMRMLScene(vtkMRMLScene
) + 106 (vtkMRMLAbstractLogic.cxx:283) 4 libMRMLDisplayableManager.dylib 0x000000011137a3b6 vtkMRMLAbstractDisplayableManager::SetAndObserveMRMLDisplayableNode(vtkMRMLNode) + 982 (vtkMRMLAbstractDisplayableManager.cxx:825) 5 libMRMLDisplayableManager.dylib 0x000000011137cec2 vtkMRMLDisplayableManagerGroup::SetMRMLDisplayableNode(vtkMRMLNode) + 130 (vtkMRMLDisplayableManagerGroup.cxx:379) 6 libqMRMLWidgets.dylib
0x000000010e7369dd qMRMLThreeDView::setMRMLViewNode(vtkMRMLViewNode) + 205 (qMRMLThreeDView.cxx:268) 7 libqMRMLWidgets.dylib
0x000000010e7368fc qMRMLThreeDView::setMRMLScene(vtkMRMLScene
) + 124 (qMRMLThreeDView.cxx:250)

RafaelPalomar commented 7 years ago

@lcoram Could you explain how to reproduce it? I'm not able to do reproduce it in Linux

lcoram commented 6 years ago

I open the models, add a resection plane, then close slicer...

"Model" Reader has successfully read the file "/Users/louise/Documents/MED_IMAGES/TestData/LRPHepaticModel.vtk" "[1.34s]" "Model" Reader has successfully read the file "/Users/louise/Documents/MED_IMAGES/TestData/LRPParenchymaModel.vtk" "[0.48s]" "Model" Reader has successfully read the file "/Users/louise/Documents/MED_IMAGES/TestData/LRPPortalModel.vtk" "[0.50s]" "Model" Reader has successfully read the file "/Users/louise/Documents/MED_IMAGES/TestData/LRPTumor1Model.vtk" "[0.10s]" "Model" Reader has successfully read the file "/Users/louise/Documents/MED_IMAGES/TestData/LRPTumor2Model.vtk" "[0.06s]" "Model" Reader has successfully read the file "/Users/louise/Documents/MED_IMAGES/TestData/LRPTumor3Model.vtk" "[0.04s]" poly data connection

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libvtkSlicerResectionPlanningModuleMRMLDisplayableManager.dylib 0x0000000143ee6105 vtkInteractorObserver::Off() + 21 1 libvtkSlicerResectionPlanningModuleMRMLDisplayableManager.dylib 0x0000000143edb323 vtkMRMLResectionDisplayableManager3D::OnMRMLSceneEndClose() + 1971 2 libvtkSlicerResectionPlanningModuleMRMLDisplayableManager.dylib 0x0000000143ed1317 vtkMRMLResectionDisplayableManager3D::SetMRMLSceneInternal(vtkMRMLScene) + 55 3 libMRMLLogic.dylib 0x00000001129e0faa vtkMRMLAbstractLogic::SetMRMLScene(vtkMRMLScene) + 106

lcoram commented 6 years ago

Problem still occurring - open models, click to add a plane (and either move it a bit or don't touch it at all), exit and get the traceback:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libvtkSlicerResectionPlanningModuleMRMLDisplayableManager.dylib 0x00000001416ecd95 vtkInteractorObserver::Off() + 21 1 libvtkSlicerResectionPlanningModuleMRMLDisplayableManager.dylib 0x00000001416e1fc3 vtkMRMLResectionDisplayableManager3D::OnMRMLSceneEndClose() + 1971 2 libvtkSlicerResectionPlanningModuleMRMLDisplayableManager.dylib 0x00000001416d7fb7 vtkMRMLResectionDisplayableManager3D::SetMRMLSceneInternal(vtkMRMLScene) + 55 3 libMRMLLogic.dylib 0x000000010da297fa vtkMRMLAbstractLogic::SetMRMLScene(vtkMRMLScene) + 106 (vtkMRMLAbstractLogic.cxx:283) 4 libMRMLDisplayableManager.dylib 0x000000010d925d96 vtkMRMLAbstractDisplayableManager::SetAndObserveMRMLDisplayableNode(vtkMRMLNode) + 982 (vtkMRMLAbstractDisplayableManager.cxx:825) 5 libMRMLDisplayableManager.dylib 0x000000010d9288f2 vtkMRMLDisplayableManagerGroup::SetMRMLDisplayableNode(vtkMRMLNode) + 130 (vtkMRMLDisplayableManagerGroup.cxx:382) 6 libqMRMLWidgets.dylib 0x000000010ac924dd qMRMLThreeDView::setMRMLViewNode(vtkMRMLViewNode) + 205 (qMRMLThreeDView.cxx:356) 7 libqMRMLWidgets.dylib 0x000000010ac923fc qMRMLThreeDView::setMRMLScene(vtkMRMLScene) + 124 (qMRMLThreeDView.cxx:338)