nicole
2012-05-09 08:16
administrator
~0004228
Last edited: 2012-05-09 08:32
|
Looks like there was a missing null pointer check, svn 20043 fixes that, will check with the scene mentioned to see if this fixes the crash.
Note: using the tool bar delete does not cause a crash, just when doing it from the Scene Views module. |
|
|
Crashing in vtkMRMLScene RemoveNodeReferences:
Program received signal SIGSEGV, Segmentation fault.
0x00007f9293027306 in vtkMRMLScene::RemoveNodeReferences (this=0x4a1c7f0, n=0x4a1c2d0) at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLScene.cxx:1485
1485 if (node->GetID() && strcmp(node->GetID(), n->GetID()))
(gdb) print node
$1 = (vtkMRMLNode ) 0x4557830
(gdb) print n
$2 = (vtkMRMLNode ) 0x4a1c2d0
(gdb) print node_ID
No symbol "node_ID" in current context.
(gdb) print node->ID
$3 = 0x69006c0053002f <Address 0x69006c0053002f out of bounds>
(gdb) print n->ID
$4 = 0x4a1c520 "vtkMRMLCrosshairNodedefault"
(gdb) print node
$5 = (vtkMRMLNode *) 0x4557830
(gdb) print node->Name
$6 = 0x65006c006f0063 <Address 0x65006c006f0063 out of bounds>
(gdb) print node->Description
$7 = 0x7200690062002f <Address 0x7200690062002f out of bounds>
This is an area actively being debugged by Julien and Alex, will point them to this bug as well. |
|
|
Back trace:
#0 0x00007f9293027306 in vtkMRMLScene::RemoveNodeReferences (this=0x4a1c7f0, n=0x4a1c2d0) at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLScene.cxx:1485
0000001 0x00007f9293026a0f in vtkMRMLScene::RemoveNode (this=0x4a1c7f0, n=0x4a1c2d0) at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLScene.cxx:1394
0000002 0x00007f9293021a75 in vtkMRMLScene::Clear (this=0x4a1c7f0, removeSingletons=1) at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLScene.cxx:482
0000003 0x00007f92930219b5 in vtkMRMLScene::SceneCallback (clientData=0x4a1c7f0) at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLScene.cxx:455
0000004 0x00007f9287b7e5f7 in vtkCallbackCommand::Execute (this=0x4a1c7a0, caller=0x4a1c7f0, event=2, callData=0x0)
at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkCallbackCommand.cxx:42
0000005 0x00007f9287c5ec5d in vtkSubjectHelper::InvokeEvent (this=0x4a1ca90, event=2, callData=0x0, self=0x4a1c7f0)
at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkObject.cxx:602
0000006 0x00007f9287c5f16d in vtkObject::InvokeEvent (this=0x4a1c7f0, event=2, callData=0x0) at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkObject.cxx:770
0000007 0x00007f9287c5f983 in vtkObject::UnRegisterInternal (this=0x4a1c7f0, o=0x0, check=0) at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkObject.cxx:878
0000008 0x00007f9287c610ce in vtkObjectBase::UnRegister (this=0x4a1c7f0, o=0x0) at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkObjectBase.cxx:189
---Type <return> to continue, or q <return> to quit---
0000009 0x00007f9287c60e4e in vtkObjectBase::Delete (this=0x4a1c7f0) at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkObjectBase.cxx:134
0000010 0x00007f929303e46d in vtkMRMLSceneViewNode::~vtkMRMLSceneViewNode (this=0x4a1be90, __in_chrg=<value optimized out>)
at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLSceneViewNode.cxx:57
0000011 0x00007f929303e579 in vtkMRMLSceneViewNode::~vtkMRMLSceneViewNode (this=0x4a1be90, __in_chrg=<value optimized out>)
at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLSceneViewNode.cxx:65
0000012 0x00007f9287c614db in vtkObjectBase::UnRegisterInternal (this=0x4a1be90, check=0) at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkObjectBase.cxx:286
0000013 0x00007f9287c5f9a5 in vtkObject::UnRegisterInternal (this=0x4a1be90, o=0x174a410, check=0) at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkObject.cxx:885
0000014 0x00007f9287c610ce in vtkObjectBase::UnRegister (this=0x4a1be90, o=0x174a410) at /projects/birn/nicole/Slicer4/S4-SuperBuild/VTK/Common/vtkObjectBase.cxx:189
0000015 0x00007f9293026b76 in vtkMRMLScene::RemoveNode (this=0x174a410, n=0x4a1be90) at /projects/birn/nicole/Slicer4/Slicer4/Libs/MRML/Core/vtkMRMLScene.cxx:1406
0000016 0x00007f9266cefb80 in vtkSlicerSceneViewsModuleLogic::RemoveSceneViewNode (this=0x4447920, sceneViewNode=0x4a1be90)
at /projects/birn/nicole/Slicer4/Slicer4/Modules/Loadable/SceneViews/Logic/vtkSlicerSceneViewsModuleLogic.cxx:544
---Type <return> to continue, or q <return> to quit---
0000017 0x00007f925891a60e in qMRMLSceneViewsTreeView::deleteSelected (this=0xe2f59f0)
at /projects/birn/nicole/Slicer4/Slicer4/Modules/Loadable/SceneViews/GUI/qMRMLSceneViewsTreeView.cxx:316
0000018 0x00007f92589216fb in qMRMLSceneViewsTreeView::qt_metacall (this=0xe2f59f0, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fff1c7a21b0)
at /projects/birn/nicole/Slicer4/S4-SuperBuild/Slicer-build/Modules/Loadable/SceneViews/GUI/moc_qMRMLSceneViewsTreeView.cxx:92
0000019 0x00007f92943a56e7 in QMetaObject::activate(QObject, QMetaObject const, int, void*) () from /projects/birn/nicole/Slicer4/S4-SuperBuild/Qt-build/lib/libQtCore.so.4
0000020 0x00007f9295adc422 in QAbstractButton::clicked(bool) () from /projects/birn/nicole/Slicer4/S4-SuperBuild/Qt-build/lib/libQtGui.so.4
0000021 0x00007f9295825aeb in ?? () from /projects/birn/nicole/Slicer4/S4-SuperBuild/Qt-build/lib/libQtGui.so.4
0000022 0x00007f9295826c5b in ?? () from /projects/birn/nicole/Slicer4/S4-SuperBuild/Qt-build/lib/libQtGui.so.4
0000023 0x00007f9295826ecc in QAbstractButton::mouseReleaseEvent(QMouseEvent) () from /projects/birn/nicole/Slicer4/S4-SuperBuild/Qt-build/lib/libQtGui.so.4
[...] |
|
|
Just confirming that this still happens on Mac nightly 5-8 |
|
|
Here's another stack trace that is probably the same underlying issue.
This was triggered by the following steps:
Open: .../Dropbox/RonsExamples/2012-04-27-PrepareforLecture2012-04-27-aDemo-PeritumoralTractParcellation.mrml
Select File->Save
Select all data to save
Select a new output directory
Save & Crash
MRMLCore.dll!vtkMRMLScene::RemoveReferencedNodeID(const char id=0x000000001609c0d0, vtkMRMLNode refrencingNode=0x00000000160f7ea0) Line 1444 + 0x13 bytes C++
MRMLCore.dll!vtkMRMLDisplayableNode::SetAndObserveNthDisplayNodeID(int n=0, const char displayNodeID=0x0000000000000000) Line 304 C++
MRMLCore.dll!vtkMRMLDisplayableNode::SetAndObserveDisplayNodeID(const char displayNodeID=0x0000000000000000) Line 269 C++
MRMLCore.dll!vtkMRMLDiffusionImageVolumeNode::~vtkMRMLDiffusionImageVolumeNode() Line 60 + 0xc bytes C++
MRMLCore.dll!vtkMRMLDiffusionTensorVolumeNode::~vtkMRMLDiffusionTensorVolumeNode() Line 46 + 0xa bytes C++
MRMLCore.dll!vtkMRMLDiffusionTensorVolumeNode::vector deleting destructor'() + 0x7f bytes C++ vtkCommon.dll!vtkObjectBase::UnRegisterInternal(vtkObjectBase * __formal=0x000000000d1fbd00, int check=0) Line 286 + 0x31 bytes C++ vtkCommon.dll!vtkObject::UnRegisterInternal(vtkObjectBase * o=0x000000000d1fbd00, int check=0) Line 886 C++ vtkCommon.dll!vtkObjectBase::UnRegister(vtkObjectBase * o=0x000000000d1fbd00) Line 190 C++ vtkCommon.dll!vtkCollection::DeleteElement(vtkCollectionElement * e=0x000000001609c170) Line 58 C++ vtkCommon.dll!vtkCollection::RemoveAllItems() Line 184 C++ MRMLCore.dll!vtkMRMLSceneViewNode::StoreScene() Line 345 C++ qSlicerBaseQTGUI.dll!qSlicerSaveDataDialogPrivate::saveScene() Line 834 C++ qSlicerBaseQTGUI.dll!qSlicerSaveDataDialogPrivate::save() Line 566 + 0x1b bytes C++ qSlicerBaseQTGUI.dll!qSlicerSaveDataDialogPrivate::accept() Line 542 + 0xa bytes C++ qSlicerBaseQTGUI.dll!qSlicerSaveDataDialogPrivate::qt_metacall(QMetaObject::Call _c=InvokeMetaMethod, int _id=4, void * * _a=0x0000000000a54310) Line 92 + 0x13 bytes C++ QtCored4.dll!QMetaObject::metacall(QObject * object=0x0000000016501c20, QMetaObject::Call cl=InvokeMetaMethod, int idx=40, void * * argv=0x0000000000a54310) Line 238 C++ QtCored4.dll!QMetaObject::activate(QObject * sender=0x00000000164ff190, const QMetaObject * m=0x0000000065d82610, int local_signal_index=1, void * * argv=0x0000000000000000) Line 3278 + 0x49 bytes C++ QtGuid4.dll!QDialogButtonBox::accepted() Line 172 C++ QtGuid4.dll!QDialogButtonBoxPrivate::_q_handleButtonClicked() Line 1136 C++ QtGuid4.dll!QDialogButtonBox::qt_metacall(QMetaObject::Call _c=InvokeMetaMethod, int _id=4, void * * _a=0x0000000000a54680) Line 121 + 0x12 bytes C++ QtCored4.dll!QMetaObject::metacall(QObject * object=0x00000000164ff190, QMetaObject::Call cl=InvokeMetaMethod, int idx=31, void * * argv=0x0000000000a54680) Line 238 C++ QtCored4.dll!QMetaObject::activate(QObject * sender=0x000000001653c040, const QMetaObject * m=0x0000000065e11058, int local_signal_index=2, void * * argv=0x0000000000a54680) Line 3278 + 0x49 bytes C++ QtGuid4.dll!QAbstractButton::clicked(bool _t1=false) Line 207 C++ QtGuid4.dll!QAbstractButtonPrivate::emitClicked() Line 548 C++ QtGuid4.dll!QAbstractButtonPrivate::click() Line 539 + 0xa bytes C++ QtGuid4.dll!QAbstractButton::mouseReleaseEvent(QMouseEvent * e=0x0000000000a55738) Line 1122 C++ QtGuid4.dll!QWidget::event(QEvent * event=0x0000000000a55738) Line 8296 C++ QtGuid4.dll!QAbstractButton::event(QEvent * e=0x0000000000a55738) Line 1081 C++ QtGuid4.dll!QPushButton::event(QEvent * e=0x0000000000a55738) Line 684 C++ QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x000000001653c040, QEvent * e=0x0000000000a55738) Line 4481 + 0x15 bytes C++ QtGuid4.dll!QApplication::notify(QObject * receiver=0x000000001653c040, QEvent * e=0x0000000000a55738) Line 4042 + 0x51 bytes C++ QtCored4.dll!QCoreApplication::notifyInternal(QObject * receiver=0x000000001653c040, QEvent * event=0x0000000000a55738) Line 787 + 0x26 bytes C++ QtCored4.dll!QCoreApplication::sendSpontaneousEvent(QObject * receiver=0x000000001653c040, QEvent * event=0x0000000000a55738) Line 218 + 0x4c bytes C++ QtGuid4.dll!QApplicationPrivate::sendMouseEvent(QWidget * receiver=0x000000001653c040, QMouseEvent * event=0x0000000000a55738, QWidget * alienWidget=0x000000001653c040, QWidget * nativeWidget=0x0000000016501c20, QWidget * * buttonDown=0x0000000066135df0, QPointer<QWidget> & lastMouseReceiver={...}, bool spontaneous=true) Line 3139 + 0x16 bytes C++ QtGuid4.dll!QETWidget::translateMouseEvent(const tagMSG & msg={...}) Line 3321 + 0x3f bytes C++ QtGuid4.dll!QtWndProc(HWND__ * hwnd=0x0000000000030602, unsigned int message=514, unsigned __int64 wParam=0, __int64 lParam=18809852) Line 1659 + 0x15 bytes C++ user32.dll!0000000076b09bd1() [Frames below may be incorrect and/or missing, no symbols loaded for user32.dll] user32.dll!0000000076b098da() QtCored4.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> * flags=0x0000000000a599e0) Line 810 C++ QtGuid4.dll!QGuiEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> * flags=0x0000000000a59a2c) Line 1170 + 0x27 bytes C++ QtCored4.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> * flags=0x0000000000a59a98) Line 150 C++ QtCored4.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> * flags=0x0000000000a59b50) Line 201 + 0x53 bytes C++ QtGuid4.dll!QDialog::exec() Line 553 C++ qSlicerBaseQTGUI.dll!qSlicerSaveDataDialog::exec(const QMap<QString,QVariant> & readerProperties={...}) Line 966 + 0xb bytes C++ qSlicerBaseQTGUI.dll!qSlicerIOManager::openDialog(qSlicerIO::IOFileType fileType=NoFile, qSlicerFileDialog::IOAction action=Write, const QMap<QString,QVariant> & properties={...}) Line 195 + 0x18 bytes C++ qSlicerBaseQTGUI.dll!qSlicerIOManager::openSaveDataDialog() Line 181 + 0x17 bytes C++ qSlicerApp.dll!qSlicerAppMainWindowCore::onFileSaveSceneActionTriggered() Line 184 C++ qSlicerApp.dll!qSlicerAppMainWindowCore::qt_metacall(QMetaObject::Call _c=InvokeMetaMethod, int _id=6, void * * _a=0x0000000000a59f10) Line 130 + 0xa bytes C++ QtCored4.dll!QMetaObject::metacall(QObject * object=0x000000000d2f86d0, QMetaObject::Call cl=InvokeMetaMethod, int idx=10, void * * argv=0x0000000000a59f10) Line 238 C++ QtCored4.dll!QMetaObject::activate(QObject * sender=0x000000000c926f70, const QMetaObject * m=0x00000000661340a8, int local_signal_index=1, void * * argv=0x0000000000a59f10) Line 3278 + 0x49 bytes C++ QtGuid4.dll!QAction::triggered(bool _t1=false) Line 264 C++ QtGuid4.dll!QAction::activate(QAction::ActionEvent event=Trigger) Line 1259 C++ QtGuid4.dll!QMenuPrivate::activateCausedStack(const QList<QPointer<QWidget> > & causedStack={...}, QAction * action=0x000000000c926f70, QAction::ActionEvent action_e=Trigger, bool self=true) Line 1007 C++ QtGuid4.dll!QMenuPrivate::activateAction(QAction * action=0x000000000c926f70, QAction::ActionEvent action_e=Trigger, bool self=true) Line 1100 C++ QtGuid4.dll!QMenu::mouseReleaseEvent(QMouseEvent * e=0x0000000000a5b028) Line 2297 C++ QtGuid4.dll!QWidget::event(QEvent * event=0x0000000000a5b028) Line 8296 C++ QtGuid4.dll!QMenu::event(QEvent * e=0x0000000000a5b028) Line 2406 C++ QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x000000000c960170, QEvent * e=0x0000000000a5b028) Line 4481 + 0x15 bytes C++ QtGuid4.dll!QApplication::notify(QObject * receiver=0x000000000c960170, QEvent * e=0x0000000000a5b028) Line 4042 + 0x51 bytes C++ QtCored4.dll!QCoreApplication::notifyInternal(QObject * receiver=0x000000000c960170, QEvent * event=0x0000000000a5b028) Line 787 + 0x26 bytes C++ QtCored4.dll!QCoreApplication::sendSpontaneousEvent(QObject * receiver=0x000000000c960170, QEvent * event=0x0000000000a5b028) Line 218 + 0x4c bytes C++ QtGuid4.dll!QApplicationPrivate::sendMouseEvent(QWidget * receiver=0x000000000c960170, QMouseEvent * event=0x0000000000a5b028, QWidget * alienWidget=0x0000000000000000, QWidget * nativeWidget=0x000000000c960170, QWidget * * buttonDown=0x0000000066135df0, QPointer<QWidget> & lastMouseReceiver={...}, bool spontaneous=true) Line 3139 + 0x16 bytes C++ QtGuid4.dll!QETWidget::translateMouseEvent(const tagMSG & msg={...}) Line 3234 + 0x3f bytes C++ QtGuid4.dll!QtWndProc(HWND__ * hwnd=0x00000000000505ea, unsigned int message=514, unsigned __int64 wParam=0, __int64 lParam=9109553) Line 1659 + 0x15 bytes C++ user32.dll!0000000076b09bd1() user32.dll!0000000076b098da() QtCored4.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> * flags=0x0000000000a5f390) Line 810 C++ QtGuid4.dll!QGuiEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> * flags=0x0000000000a5f3dc) Line 1170 + 0x27 bytes C++ QtCored4.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> * flags=0x0000000000a5f448) Line 150 C++ QtCored4.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> * flags=0x0000000000a5f4d0) Line 201 + 0x53 bytes C++ QtCored4.dll!QCoreApplication::exec() Line 1064 + 0x23 bytes C++ QtGuid4.dll!QApplication::exec() Line 3756 C++ SlicerApp-real.exe! anonymous namespace'::SlicerAppMain(int argc=1, char argv=0x00000000038f6af0) Line 311 + 0x6 bytes C++
SlicerApp-real.exe!WinMain(HINSTANCE * hInstance=0x000000013f680000, HINSTANCE hPrevInstance=0x0000000000000000, char lpCmdLine=0x0000000000af74c7, int nShowCmd=1) Line 330 + 0xe bytes C++
SlicerApp-real.exe!__tmainCRTStartup() Line 574 + 0x42 bytes C
SlicerApp-real.exe!WinMainCRTStartup() Line 399 C
kernel32.dll!000000007689652d()
ntdll.dll!0000000076d7c521()
|
|
|
Nicole> Let Julien or myself if you are waiting on action from our side. If it's the case, create a mantis issue and add this issue as a dependency. |
|
|
See commit from Julien - http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=20043 |
|
|
Concerning the crash reported by Steve on 2012-05-10 16:50:
StoreScene() should not call RemoveAllItems() on Nodes scene but should call Clear(1) instead.
Indeed, some node destructors (such as vtkMRMLDisplayableNode) need to access a scene in correct state (e.g with references properly removed). This correct state can only happen if Clear() is called.
Note that this fix might only work if 1995 is fixed first. |
|
|
See also http://www.slicer.org/slicerWiki/index.php/Developer_Meetings/20120508#Problem_with_the_SceneView_nodes |
|
|
The fixe for 1993 and 1995 seems to fix this issue. Please reopen if still happens.
http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=20067 |
|