View Issue Details

IDProjectCategoryView StatusLast Update
0002489Slicer4Core: Base Codepublic2014-03-06 05:54
Reporterungi Assigned Totokuda  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.4.0 
Summary0002489: Crash on closing when OpenIGTLink connector node in scene
Description

If there is an OpenIGTLink connector node in the scene, Slicer crashes when the application is being closed. Even if there was not communication through the connector node.

Tested on Windows 64-bit, nightly build 2012-09-07.

To reproduce:

  • Open Slicer,
  • Create a new connector node in the OpenIGTLinkIF module,
  • Close Slicer.
TagsNo tags attached.

Activities

tokuda

tokuda

2012-09-13 07:20

developer   ~0006050

I tried with Mac version (build 2012-09-12) and there was only a signal-slot problem:

Object::disconnect: No such slot qMRMLSceneModel::onDeviceVisibilityModified(vtkObject*)

The reported crash might be Windows-specific. I will check later.

ungi

ungi

2012-09-13 08:38

developer   ~0006051

On Windows in debug mode I get the following message in an error pop-up dialog:

Debug Assertion Failed!
Program: ...SlicerApp-real.exe
File: c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\list
Line: 242

Expression: list iterator not incrementable

ungi

ungi

2012-09-13 08:41

developer   ~0006052

After that if I press Ignore, I get the following in a similar window:
Expression: ("Standard C++ Libraries Out of Range", 0)

After these two exceptions, Slicer crashes with the following call stack:

vtkSlicerOpenIGTLinkIFModuleMRML.dll!std::list<vtkSmartPointer<vtkIGTLToMRMLBase>,std::allocator<vtkSmartPointer<vtkIGTLToMRMLBase> > >::_Const_iterator<1>::operator++() Line 250 C++
vtkSlicerOpenIGTLinkIFModuleMRML.dll!std::list<vtkSmartPointer<vtkIGTLToMRMLBase>,std::allocator<vtkSmartPointer<vtkIGTLToMRMLBase> > >::_Iterator<1>::operator++() Line 405 C++
vtkSlicerOpenIGTLinkIFModuleMRML.dll!std::list<vtkSmartPointer<vtkIGTLToMRMLBase>,std::allocator<vtkSmartPointer<vtkIGTLToMRMLBase> > >::_Iterator<1>::operator++(int formal=0) Line 412 C++
vtkSlicerOpenIGTLinkIFModuleMRML.dll!vtkMRMLIGTLConnectorNode::UnregisterMessageConverter(vtkIGTLToMRMLBase converter=0x0000000018ac1280) Line 1045 + 0x62 bytes C++
vtkSlicerOpenIGTLinkIFModuleLogic.dll!vtkSlicerOpenIGTLinkIFLogic::UnregisterMessageConverter(vtkIGTLToMRMLBase
converter=0x0000000018ac1280) Line 442 C++
vtkSlicerOpenIGTLinkIFModuleLogic.dll!vtkSlicerOpenIGTLinkIFLogic::~vtkSlicerOpenIGTLinkIFLogic() Line 103 C++
vtkSlicerOpenIGTLinkIFModuleLogic.dll!vtkSlicerOpenIGTLinkIFLogic::`vector deleting destructor'() + 0x7f bytes C++
vtkCommon.dll!vtkObjectBase::UnRegisterInternal(vtkObjectBase *
formal=0x0000000000000000, int check=0) Line 286 + 0x31 bytes C++
vtkCommon.dll!vtkObject::UnRegisterInternal(vtkObjectBase o=0x0000000000000000, int check=0) Line 886 C++
vtkCommon.dll!vtkObjectBase::UnRegister(vtkObjectBase
o=0x0000000000000000) Line 190 C++
vtkCommon.dll!vtkSmartPointerBase::~vtkSmartPointerBase() Line 64 C++
qSlicerBaseQTCore.dll!vtkSmartPointer<vtkMRMLAbstractLogic>::~vtkSmartPointer<vtkMRMLAbstractLogic>() + 0x2e bytes C++
qSlicerBaseQTCore.dll!qSlicerAbstractCoreModulePrivate::~qSlicerAbstractCoreModulePrivate() Line 68 + 0xe bytes C++
qSlicerBaseQTCore.dll!qSlicerAbstractCoreModulePrivate::scalar deleting destructor'() + 0x31 bytes C++ qSlicerBaseQTCore.dll!QScopedPointerDeleter&lt;qSlicerAbstractCoreModulePrivate>::cleanup(qSlicerAbstractCoreModulePrivate * pointer=0x000000000f5b62f0) Line 62 + 0x30 bytes C++ qSlicerBaseQTCore.dll!QScopedPointer&lt;qSlicerAbstractCoreModulePrivate,QScopedPointerDeleter&lt;qSlicerAbstractCoreModulePrivate> >::~QScopedPointer&lt;qSlicerAbstractCoreModulePrivate,QScopedPointerDeleter&lt;qSlicerAbstractCoreModulePrivate> >() Line 101 C++ qSlicerBaseQTCore.dll!qSlicerAbstractCoreModule::~qSlicerAbstractCoreModule() Line 83 + 0xe bytes C++ qSlicerBaseQTGUI.dll!qSlicerAbstractModule::~qSlicerAbstractModule() Line 50 + 0x1a bytes C++ qSlicerBaseQTGUI.dll!qSlicerLoadableModule::~qSlicerLoadableModule() Line 58 + 0x19 bytes C++ qSlicerOpenIGTLinkIFModule.dll!qSlicerOpenIGTLinkIFModule::~qSlicerOpenIGTLinkIFModule() Line 57 + 0x1a bytes C++ qSlicerOpenIGTLinkIFModule.dll!qSlicerOpenIGTLinkIFModule::vector deleting destructor'() + 0x7f bytes C++
qSlicerBaseQTCore.dll!ctkAbstractFactoryItem<qSlicerAbstractCoreModule>::uninstantiate() Line 163 + 0x35 bytes C++
qSlicerBaseQTCore.dll!ctkAbstractFactory<qSlicerAbstractCoreModule>::uninstantiate(const QString & itemKey={...}) Line 265 C++
qSlicerBaseQTCore.dll!qSlicerAbstractModuleFactoryManager::uninstantiateModule(const QString & moduleName={...}) Line 373 C++
qSlicerBaseQTCore.dll!qSlicerModuleFactoryManager::uninstantiateModule(const QString & name={...}) Line 219 C++
qSlicerBaseQTCore.dll!qSlicerModuleFactoryManager::unloadModule(const QString & name={...}) Line 206 C++
qSlicerBaseQTCore.dll!qSlicerModuleFactoryManager::unloadModules() Line 177 + 0x12 bytes C++
qSlicerBaseQTCore.dll!qSlicerModuleFactoryManager::~qSlicerModuleFactoryManager() Line 64 + 0xa bytes C++
qSlicerBaseQTCore.dll!qSlicerModuleFactoryManager::vector deleting destructor'() + 0x7f bytes C++ QtCored4.dll!QObjectPrivate::deleteChildren() Line 1955 + 0x35 bytes C++ QtCored4.dll!QObject::~QObject() Line 948 C++ qSlicerBaseQTCore.dll!qSlicerModuleManager::~qSlicerModuleManager() Line 54 + 0x1a bytes C++ qSlicerBaseQTCore.dll!qSlicerModuleManager::vector deleting destructor'() + 0x7f bytes C++
qSlicerBaseQTCore.dll!QtSharedPointer::ExternalRefCount<qSlicerModuleManager>::deref(QtSharedPointer::ExternalRefCountData d=0x0000000003c131f0, qSlicerModuleManager value=0x0000000003c0b370) Line 344 + 0x31 bytes C++
qSlicerBaseQTCore.dll!QtSharedPointer::ExternalRefCount<qSlicerModuleManager>::internalSet(QtSharedPointer::ExternalRefCountData o=0x0000000003c131f0, qSlicerModuleManager actual=0x0000000003c0b370) Line 451 C++
qSlicerBaseQTCore.dll!QtSharedPointer::ExternalRefCount<qSlicerModuleManager>::internalCopy<qSlicerModuleManager>(const QtSharedPointer::ExternalRefCount<qSlicerModuleManager> & other={...}) Line 409 C++
qSlicerBaseQTCore.dll!QSharedPointer<qSlicerModuleManager>::operator=(const QSharedPointer<qSlicerModuleManager> & other={...}) Line 479 C++
qSlicerBaseQTCore.dll!QSharedPointer<qSlicerModuleManager>::clear() Line 531 + 0x54 bytes C++
qSlicerBaseQTCore.dll!qSlicerCoreApplicationPrivate::~qSlicerCoreApplicationPrivate() Line 125 C++
qSlicerBaseQTGUI.dll!qSlicerApplicationPrivate::~qSlicerApplicationPrivate() Line 143 + 0xe bytes C++
qSlicerBaseQTGUI.dll!qSlicerApplicationPrivate::scalar deleting destructor'() + 0x31 bytes C++ qSlicerBaseQTCore.dll!QScopedPointerDeleter&lt;qSlicerCoreApplicationPrivate>::cleanup(qSlicerCoreApplicationPrivate * pointer=0x0000000003aedfa0) Line 62 + 0x30 bytes C++ qSlicerBaseQTCore.dll!QScopedPointer&lt;qSlicerCoreApplicationPrivate,QScopedPointerDeleter&lt;qSlicerCoreApplicationPrivate> >::~QScopedPointer&lt;qSlicerCoreApplicationPrivate,QScopedPointerDeleter&lt;qSlicerCoreApplicationPrivate> >() Line 101 C++ qSlicerBaseQTCore.dll!qSlicerCoreApplication::~qSlicerCoreApplication() Line 631 + 0xe bytes C++ qSlicerBaseQTGUI.dll!qSlicerApplication::~qSlicerApplication() Line 266 + 0xb bytes C++ SlicerApp-real.exe!anonymous namespace'::SlicerAppMain(int argc=1, char argv=0x0000000003ae6820) Line 365 + 0x40 bytes C++
SlicerApp-real.exe!WinMain(HINSTANCE * hInstance=0x000000013fba0000, HINSTANCE hPrevInstance=0x0000000000000000, char lpCmdLine=0x00000000009f76b3, int nShowCmd=1) Line 384 + 0xe bytes C++
SlicerApp-real.exe!__tmainCRTStartup() Line 574 + 0x42 bytes C
SlicerApp-real.exe!WinMainCRTStartup() Line 399 C
kernel32.dll!00000000770b652d()
ntdll.dll!00000000771ec521()

tokuda

tokuda

2012-09-13 14:43

developer   ~0006067

I'm still not sure why this happens, but changed destructor process to avoid UnregisterMessageConverter() call.

I also found that the destructor of vtkMRMLIGTConnector was not properly called, when a connector node is removed from the scene. The logic class didn't unregister the connector node when it is removed from the scene, and the reference counter could not become 0. (This might not be related to the issue.)

ungi

ungi

2012-09-14 08:45

developer   ~0006071

I built Slicer from scratch this morning. I have the same problems:

  1. Exception: list iterator not incrementable
  2. Exception: ("Standard C++ Libraries Out of Range", 0)
  3. Crash with a stack starting like this:

msvcr90d.dll!crt_debugger_hook(int _Reserved=0) Line 62 C
msvcr90d.dll!_invalid_parameter(const wchar_t pszExpression=0x000007fec954c1a8, const wchar_t pszFunction=0x000007fec95573a0, const wchar_t * pszFile=0x000007fec9552fe0, unsigned int nLine=243, unsigned
int64 pReserved=0) Line 114 C++
vtkSlicerOpenIGTLinkIFModuleMRML.dll!std::list<vtkSmartPointer<vtkIGTLToMRMLBase>,std::allocator<vtkSmartPointer<vtkIGTLToMRMLBase> > >::_Const_iterator<1>::operator++() Line 250 C++
vtkSlicerOpenIGTLinkIFModuleMRML.dll!std::list<vtkSmartPointer<vtkIGTLToMRMLBase>,std::allocator<vtkSmartPointer<vtkIGTLToMRMLBase> > >::_Iterator<1>::operator++() Line 405 C++
vtkSlicerOpenIGTLinkIFModuleMRML.dll!std::list<vtkSmartPointer<vtkIGTLToMRMLBase>,std::allocator<vtkSmartPointer<vtkIGTLToMRMLBase> > >::_Iterator<1>::operator++(int __formal=0) Line 412 C++
vtkSlicerOpenIGTLinkIFModuleMRML.dll!vtkMRMLIGTLConnectorNode::UnregisterMessageConverter(vtkIGTLToMRMLBase * converter=0x000000001945acb0) Line 1045 + 0x62 bytes C++

tokuda

tokuda

2012-09-14 10:55

developer   ~0006077

Thank you for your report.

Did you build with the latest version of the module? The change is within the OpenIGTLinkIF repository and Slicer cmake file is still pointing the old revision of OpenIGTLink... could you confirm that you tried after manually updating the module to the latest revision (revision 8015)?

ungi

ungi

2012-09-15 02:37

developer   ~0006082

I didn't update the module manually when I reported the error.

Now, I ran svn update on OpenIGTLinkIF and recompiled that module. The crash on close is gone, so this problem seems to be solved.
But I tested the connection by running TrackingServer from the OpenIGTLink package, and tried to receive it in Slicer with a client. I didn't receive any transform messages, however the transforms were printed on the server side. Could you too check if there is such a regression before updating the revision in Slicer cmake?

Thanks.

ungi

ungi

2012-09-15 02:42

developer   ~0006083

And a less related think is that vtk debugger reports that one vtkCommand object is not deleted when closing the program. If you happen to catch it while looking into the above problem of not receiving data as a client...

ungi

ungi

2012-09-15 02:43

developer   ~0006084

Status turns ON from WAIT, but no transform node is created.

tokuda

tokuda

2012-09-15 10:41

developer   ~0006092

Message converters (vtkIGTLToMRML* class) were not properly registered. I fixed the issue and it's working on Mac OS X. The OpenIGTLinkIF revision number is 8016.

The vtkCommand object issue has not been fixed yet.

tokuda

tokuda

2012-09-15 11:14

developer   ~0006093

I fix the vtkCommand object issue. The OpenIGTLinkIF revision number is 8017.

ungi

ungi

2012-09-16 16:31

developer   ~0006105

It looks fixed on Windows too. I don't get any exceptions or crash when closing slicer with connector nodes.
When will this be effective in the nightly Slicer build?

tokuda

tokuda

2013-04-10 10:08

developer   ~0008364

I think this issue has been resolved by:

https://github.com/Slicer/Slicer/commit/aad32d92b33cc98ae58418f31292c591f2189d05

tokuda

tokuda

2013-04-10 10:09

developer   ~0008365

Solved in:

https://github.com/Slicer/Slicer/commit/aad32d92b33cc98ae58418f31292c591f2189d05

jcfr

jcfr

2014-03-06 05:15

administrator   ~0011063

Closing resolved issues that have not been updated in more than 3 months

Issue History

Date Modified Username Field Change
2012-09-08 15:28 ungi New Issue
2012-09-08 15:28 ungi Status new => assigned
2012-09-08 15:28 ungi Assigned To => pieper
2012-09-13 05:16 pieper Assigned To pieper => tokuda
2012-09-13 07:20 tokuda Note Added: 0006050
2012-09-13 08:38 ungi Note Added: 0006051
2012-09-13 08:41 ungi Note Added: 0006052
2012-09-13 14:43 tokuda Note Added: 0006067
2012-09-14 08:45 ungi Note Added: 0006071
2012-09-14 10:55 tokuda Note Added: 0006077
2012-09-15 02:37 ungi Note Added: 0006082
2012-09-15 02:42 ungi Note Added: 0006083
2012-09-15 02:43 ungi Note Added: 0006084
2012-09-15 10:41 tokuda Note Added: 0006092
2012-09-15 11:14 tokuda Note Added: 0006093
2012-09-16 16:31 ungi Note Added: 0006105
2012-12-08 10:08 jcfr Target Version => Slicer 4.2.3
2013-02-12 09:37 jcfr Target Version Slicer 4.2.3 => Slicer 4.3.0
2013-04-10 10:08 tokuda Note Added: 0008364
2013-04-10 10:09 tokuda Note Added: 0008365
2013-04-10 10:09 tokuda Status assigned => resolved
2013-04-10 10:09 tokuda Resolution open => fixed
2014-03-06 05:15 jcfr Note Added: 0011063
2014-03-06 05:17 jcfr Status resolved => closed
2014-03-06 05:54 jcfr Fixed in Version => Slicer 4.4.0