View Issue Details

IDProjectCategoryView StatusLast Update
0002439Slicer4Core: Usabilitypublic2013-01-02 10:17
Reporterfedorov Assigned Tojcfr  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.2.2-1Fixed in VersionSlicer 4.2.2-1 
Summary0002439: Nightly Slicer crashes trying to load modules compiled against local Slicer build
Description

(0005830) fedorov (developer) - 2012-08-28 12:37
http://na-mic.org/Mantis/view.php?id=2310#c5830

Just to confirm -- it is not possible at runtime to detect that a plugin
was built against a different version and disable its loading?


(0005831) jcfr (administrator) - 2012-08-28 12:48
http://na-mic.org/Mantis/view.php?id=2310#c5831

It should indeed be possible to do so, since the metedata associated with
each extensions are also available along with the extension libraries.

Would be great if you could create an issue to specifically track that.

Additional Information

If I start from command line, I have this additional messages before crash:

[fedorov@bear SlicerCLITools] /Applications/Slicer.app/Contents/MacOS/Slicer
objc[39500]: Class QCocoaColorPanelDelegate is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QMacSoundDelegate is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QCocoaPanel is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QCocoaView is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QCocoaWindow is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QCocoaWindowDelegate is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QCocoaMenuLoader is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QNSApplication is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QCocoaApplicationDelegate is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QCocoaWindowCustomThemeFrame is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QCocoaToolBarDelegate is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QCocoaMenu is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QNSOpenSavePanelDelegate is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QCocoaFontPanelDelegate is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QNSWindowProxy is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QNSPanelProxy is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QCocoaPageLayoutDelegate is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QCocoaPrintPanelDelegate is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QNSMenu is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QNSStatusItem is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class QNSImageView is implemented in both /Applications/Slicer.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/fedorov/local/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[39500]: Class vtkCocoaServer is implemented in both /Applications/Slicer.app/Contents/MacOS/../lib/Slicer-4.1/libvtkRendering.5.10.dylib and /Users/fedorov/github/Slicer-Superbuild-Release/VTK-build/bin/libvtkRendering.5.10.dylib. One of the two will be used. Which one is undefined.
objc[39500]: Class vtkCocoaTimer is implemented in both /Applications/Slicer.app/Contents/MacOS/../lib/Slicer-4.1/libvtkRendering.5.10.dylib and /Users/fedorov/github/Slicer-Superbuild-Release/VTK-build/bin/libvtkRendering.5.10.dylib. One of the two will be used. Which one is undefined.
objc[39500]: Class vtkCocoaFullScreenWindow is implemented in both /Applications/Slicer.app/Contents/MacOS/../lib/Slicer-4.1/libvtkRendering.5.10.dylib and /Users/fedorov/github/Slicer-Superbuild-Release/VTK-build/bin/libvtkRendering.5.10.dylib. One of the two will be used. Which one is undefined.
objc[39500]: Class vtkCocoaGLView is implemented in both /Applications/Slicer.app/Contents/MacOS/../lib/Slicer-4.1/libvtkRendering.5.10.dylib and /Users/fedorov/github/Slicer-Superbuild-Release/VTK-build/bin/libvtkRendering.5.10.dylib. One of the two will be used. Which one is undefined.
Warning: Visitor N3itk3fem13LoadGravConstE that operates on objects of N3itk3fem33Element2DC0LinearTriangularStrainE was already registered! Ignoring the re-registration.
Warning: Visitor N3itk3fem12LoadLandmarkE that operates on objects of N3itk3fem33Element2DC0LinearTriangularStrainE was already registered! Ignoring the re-registration.
Warning: Visitor N3itk3fem13LoadGravConstE that operates on objects of N3itk3fem35Element2DC0LinearTriangularMembraneE was already registered! Ignoring the re-registration.
Warning: Visitor N3itk3fem12LoadLandmarkE that operates on objects of N3itk3fem35Element2DC0LinearTriangularMembraneE was already registered! Ignoring the re-registration.
Warning: Visitor N3itk3fem13LoadGravConstE that operates on objects of N3itk3fem33Element3DC0LinearHexahedronStrainE was already registered! Ignoring the re-registration.
Warning: Visitor N3itk3fem12LoadLandmarkE that operates on objects of N3itk3fem33Element3DC0LinearHexahedronStrainE was already registered! Ignoring the re-registration.
Warning: Visitor N3itk3fem13LoadGravConstE that operates on objects of N3itk3fem35Element3DC0LinearHexahedronMembraneE was already registered! Ignoring the re-registration.
Warning: Visitor N3itk3fem12LoadLandmarkE that operates on objects of N3itk3fem35Element3DC0LinearHexahedronMembraneE was already registered! Ignoring the re-registration.
Warning: Visitor N3itk3fem13LoadGravConstE that operates on objects of N3itk3fem34Element3DC0LinearTetrahedronStrainE was already registered! Ignoring the re-registration.
Warning: Visitor N3itk3fem12LoadLandmarkE that operates on objects of N3itk3fem34Element3DC0LinearTetrahedronStrainE was already registered! Ignoring the re-registration.
Warning: Visitor N3itk3fem13LoadGravConstE that operates on objects of N3itk3fem36Element3DC0LinearTetrahedronMembraneE was already registered! Ignoring the re-registration.
Number of registered modules: 104
Register compression libraries
Segmentation fault

TagsNo tags attached.

Relationships

related to 0002143 closedjcfr Extend Additional Launcher Settings to support user specific settings 
related to 0002310 closedcrmullin Nightly Slicer crashes unless I remove ~/.config/www.na-mic.org 

Activities

jcfr

jcfr

2012-09-14 12:15

administrator   ~0006080

The idea is to check the version associated with a plugin and the version of Slicer before trying to load it. Then it wouldn't crash.

Let's also note that this issue wouldn't occur if the extensions and associated settings would be specific to a version of Slicer.

That said, adding the extra check mentioned above can just be positive.

It is more complicated that it seems because everything happen at the factory level. Indeed, the factory search for plugins that match given patterns in a given list of directory. Considering that at the module level (opposed to extension level), there are no metadata allowing to now the associated version of Slicer. This change is in fact quite involved.

We will to discuss further how we want to approach that issue.

pieper

pieper

2012-11-07 05:47

administrator   ~0007093

Jc: I notice that incompatible extensions are detected at startup and are not loaded - can this issue be closed?

fedorov

fedorov

2012-11-09 12:24

developer   ~0007145

The issue appears to have been resolved in the post-4.2 builds.

fedorov

fedorov

2012-11-15 04:36

developer   ~0007233

The issue is happening again with Nov 15 nightly (r21414)

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libqSlicerBaseQTCore.dylib 0x000000010110c414 qSlicerAbstractCoreModule::setPath(QString const&) + 4
1 libqSlicerBaseQTCore.dylib 0x0000000101132063 qSlicerLoadableModuleFactoryItem::instanciator() + 51
2 libqSlicerModulesCore.dylib 0x00000001001684b9 ctkAbstractFactory<qSlicerAbstractCoreModule>::instantiate(QString const&) + 3113
3 libqSlicerBaseQTCore.dylib 0x000000010110e8dc qSlicerAbstractModuleFactoryManager::instantiateModule(QString const&) + 268
4 libqSlicerBaseQTCore.dylib 0x000000010111000e qSlicerAbstractModuleFactoryManager::instantiateModules() + 158
5 0x00000001000203cc main + 1260
6 0x000000010001fd68 start + 52

Thread 1: Dispatch queue: com.apple.libdispatch-manager
0 libSystem.B.dylib 0x00007fff824eac0a kevent + 10
1 libSystem.B.dylib 0x00007fff824ecadd _dispatch_mgr_invoke + 154
2 libSystem.B.dylib 0x00007fff824ec7b4 _dispatch_queue_invoke + 185
3 libSystem.B.dylib 0x00007fff824ec2de _dispatch_worker_thread2 + 252
4 libSystem.B.dylib 0x00007fff824ebc08 _pthread_wqthread + 353
5 libSystem.B.dylib 0x00007fff824ebaa5 start_wqthread + 13

Thread 2:
0 libSystem.B.dylib 0x00007fff824eba2a __workq_kernreturn + 10
1 libSystem.B.dylib 0x00007fff824ebe3c _pthread_wqthread + 917
2 libSystem.B.dylib 0x00007fff824ebaa5 start_wqthread + 13

Thread 3:
0 libSystem.B.dylib 0x00007fff824dc466 read + 10
1 libCTKCore.0.1.dylib 0x00000001044759d6 ctkFDHandler::run() + 134
2 QtCore 0x00000001076ed125 QThreadPrivate::start(void*) + 149
3 libSystem.B.dylib 0x00007fff8250afd6 _pthread_start + 331
4 libSystem.B.dylib 0x00007fff8250ae89 thread_start + 13

Thread 4:
0 libSystem.B.dylib 0x00007fff824dc466 read + 10
1 libCTKCore.0.1.dylib 0x00000001044759d6 ctkFDHandler::run() + 134
2 QtCore 0x00000001076ed125 QThreadPrivate::start(void*) + 149
3 libSystem.B.dylib 0x00007fff8250afd6 _pthread_start + 331
4 libSystem.B.dylib 0x00007fff8250ae89 thread_start + 13

Thread 5:
0 libSystem.B.dylib 0x00007fff8250ca6a __semwait_signal + 10
1 libSystem.B.dylib 0x00007fff8250c8f9 nanosleep + 148
2 libSystem.B.dylib 0x00007fff8250c863 usleep + 57
3 libSlicerBaseLogic.dylib 0x0000000102fd2afa vtkSlicerApplicationLogic::ProcessProcessingTasks() + 154
4 libSlicerBaseLogic.dylib 0x0000000102fd2c3f vtkSlicerApplicationLogic::ProcessingThreaderCallback(void*) + 31
5 libSystem.B.dylib 0x00007fff8250afd6 _pthread_start + 331
6 libSystem.B.dylib 0x00007fff8250ae89 thread_start + 13

Thread 6:
0 libSystem.B.dylib 0x00007fff8250ca6a __semwait_signal + 10
1 libSystem.B.dylib 0x00007fff8250c8f9 nanosleep + 148
2 libSystem.B.dylib 0x00007fff8250c863 usleep + 57
3 libSlicerBaseLogic.dylib 0x0000000102fd2cea vtkSlicerApplicationLogic::ProcessNetworkingTasks() + 154
4 libSlicerBaseLogic.dylib 0x0000000102fd2e2f vtkSlicerApplicationLogic::NetworkingThreaderCallback(void*) + 31
5 libSystem.B.dylib 0x00007fff8250afd6 _pthread_start + 331
6 libSystem.B.dylib 0x00007fff8250ae89 thread_start + 13

Thread 7:
0 libSystem.B.dylib 0x00007fff8250ca6a __semwait_signal + 10
1 libSystem.B.dylib 0x00007fff82510881 _pthread_cond_wait + 1286
2 QtWebKit 0x0000000102150048 WTF::TCMalloc_PageHeap::scavengerThread() + 520
3 QtWebKit 0x00000001021500e9 WTF::TCMalloc_PageHeap::runScavengerThread(void*) + 9
4 libSystem.B.dylib 0x00007fff8250afd6 _pthread_start + 331
5 libSystem.B.dylib 0x00007fff8250ae89 thread_start + 13

Thread 8:
0 libSystem.B.dylib 0x00007fff82515932 select$DARWIN_EXTSN + 10
1 QtCore 0x00000001077c5935 qt_safe_select(int, fd_set, fd_set, fd_set, timeval const) + 389
2 QtCore 0x00000001077c9bd3 QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval) + 435
3 QtCore 0x00000001077ca0a2 QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 178
4 QtCore 0x00000001077a3ed4 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 68
5 QtCore 0x00000001077a41f4 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 180
6 QtCore 0x00000001076ec116 QThread::exec() + 182
7 QtCore 0x00000001076ed125 QThreadPrivate::start(void
) + 149
8 libSystem.B.dylib 0x00007fff8250afd6 _pthread_start + 331
9 libSystem.B.dylib 0x00007fff8250ae89 thread_start + 13

Thread 9:
0 libSystem.B.dylib 0x00007fff824eba2a __workq_kernreturn + 10
1 libSystem.B.dylib 0x00007fff824ebe3c _pthread_wqthread + 917
2 libSystem.B.dylib 0x00007fff824ebaa5 start_wqthread + 13

Thread 10:
0 libSystem.B.dylib 0x00007fff824eac0a kevent + 10
1 QtCore 0x0000000107790a2b QKqueueFileSystemWatcherEngine::run() + 155
2 QtCore 0x00000001076ed125 QThreadPrivate::start(void*) + 149
3 libSystem.B.dylib 0x00007fff8250afd6 _pthread_start + 331
4 libSystem.B.dylib 0x00007fff8250ae89 thread_start + 13

Thread 11:
0 libSystem.B.dylib 0x00007fff82515932 select$DARWIN_EXTSN + 10
1 QtCore 0x0000000107786410 QProcessManager::run() + 96
2 QtCore 0x00000001076ed125 QThreadPrivate::start(void*) + 149
3 libSystem.B.dylib 0x00007fff8250afd6 _pthread_start + 331
4 libSystem.B.dylib 0x00007fff8250ae89 thread_start + 13

Thread 12: com.apple.CFSocket.private
0 libSystem.B.dylib 0x00007fff82515932 select$DARWIN_EXTSN + 10
1 com.apple.CoreFoundation 0x00007fff82162468 __CFSocketManager + 824
2 libSystem.B.dylib 0x00007fff8250afd6 _pthread_start + 331
3 libSystem.B.dylib 0x00007fff8250ae89 thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x000000010e170780 rbx: 0x000000010e168c98 rcx: 0x00007fff70409650 rdx: 0x0000000000000001
rdi: 0x0000000000000000 rsi: 0x00007fff5fbff1c0 rbp: 0x00007fff5fbff190 rsp: 0x00007fff5fbff190
r8: 0x0000000000000001 r9: 0x000000013ee52880 r10: 0x0000000000000000 r11: 0x000000000000000d
r12: 0x000000010e17a9d0 r13: 0x0000000000000000 r14: 0x000000013e47ee40 r15: 0x00007fff5fbff638
rip: 0x000000010110c414 rfl: 0x0000000000010202 cr2: 0x0000000000000010

pieper

pieper

2012-11-15 04:42

administrator   ~0007235

To clarify the situation, here's the current behavior as I understand it:

(A) - if a user downloads several versions of slicer (release or nightly), and downloads extensions for them, only the extensions that are compatible with the currently running version of slicer will be loaded.

(B) - if a developer builds a module and sets the module path by hand, it will attempt to load in whatever version of slicer the user loads, and if they were built against different libraries and/or with different compilers there can be a crash.

Situation (A) is a real issue we should address via some kind of versioning of parts of the settings file, while leaving other settings global.

Situation (B) probably should be allowed since developers need freedom, but there should be some kind of mechanism to detect and warn to avoid surprising crashes that the developer may not instantly recognize.

fedorov

fedorov

2012-11-15 04:45

developer   ~0007236

JC, situation (B) was the topic of the original issue

jcfr

jcfr

2012-11-15 04:46

administrator   ~0007237

thanks for clarifying Steve :)

For situation (A). See 0002143

For situation (B). See http://www.na-mic.org/Bug/view.php?id=2439#c6080

pieper

pieper

2012-11-19 03:38

administrator   ~0007308

From the mailing list:

Hi,

Is it a valid usage scenario to have multiple versions of Slicer at
the same time installed?

I just spent quite some time with a user who complained about
Reporting extension not working. She had 5 versions of Slicer
installed (the reason was, she had bad experience with things not
working consistently, and with scenes not backward compatible).

We tried first removing config file, but reporting logic was not
initialized. After we uninstalled all versions and installed Slicer
4.2 from scratch, things started to work.

The user was not aware that having multiple versions could potentially
cause any issues.

What is the expected behavior in this situation? If having multiple
versions is not supported, we should properly disclose this in the
release notes, and perhaps keep track of the version in the config
file and catch this.

AF

jcfr

jcfr

2012-11-19 09:08

administrator   ~0007320

Will attempt to fix this for 4.2.2

jcfr

jcfr

2012-12-06 14:37

administrator   ~0007440

Fixed in:
trunk: http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=21482
4.2 branch: http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=21489

Issue History

Date Modified Username Field Change
2012-08-28 09:19 fedorov New Issue
2012-08-28 09:19 fedorov Status new => assigned
2012-08-28 09:19 fedorov Assigned To => kikinis
2012-08-28 09:19 fedorov Relationship added child of 0002310
2012-08-28 09:21 fedorov Assigned To kikinis => crmullin
2012-08-28 09:22 jcfr Target Version => Slicer 4.3.0
2012-08-28 09:23 jcfr Relationship replaced related to 0002310
2012-09-14 12:15 jcfr Note Added: 0006080
2012-11-07 05:47 pieper Note Added: 0007093
2012-11-07 05:55 jcfr Assigned To crmullin => jcfr
2012-11-09 12:24 fedorov Note Added: 0007145
2012-11-09 12:24 fedorov Status assigned => closed
2012-11-09 12:24 fedorov Resolution open => unable to reproduce
2012-11-09 12:24 fedorov Fixed in Version => Slicer 4.2.1
2012-11-15 04:36 fedorov Note Added: 0007233
2012-11-15 04:36 fedorov Status closed => feedback
2012-11-15 04:36 fedorov Resolution unable to reproduce => reopened
2012-11-15 04:42 pieper Note Added: 0007235
2012-11-15 04:45 fedorov Note Added: 0007236
2012-11-15 04:46 jcfr Note Added: 0007237
2012-11-15 04:46 jcfr Relationship added related to 0002143
2012-11-15 04:50 jcfr Status feedback => assigned
2012-11-19 03:38 pieper Note Added: 0007308
2012-11-19 09:08 jcfr Target Version Slicer 4.3.0 => Slicer 4.2.2
2012-11-19 09:08 jcfr Note Added: 0007320
2012-12-06 14:37 jcfr Note Added: 0007440
2012-12-06 14:37 jcfr Status assigned => resolved
2012-12-06 14:37 jcfr Fixed in Version Slicer 4.2.1 => Slicer 4.2.2
2012-12-06 14:37 jcfr Resolution reopened => fixed
2013-01-02 10:17 fedorov Status resolved => closed