View Issue Details

IDProjectCategoryView StatusLast Update
0001537Slicer4Core: Base Codepublic2013-02-12 09:40
Reporterpohl Assigned Tojcfr  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSUbuntu OS Version11.10
Product Version 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.0 
Summary0001537: Exit from tcl adapter causes seg fault when exiting program
Description

JC helped me create the attached test, which exits with a seg fault. JC wanted to integrate the code as base function in Slicer (minus the EMSegmenter specific part), debug it, and include the test in to the base

TagsNo tags attached.

Relationships

related to 0002204 closedpieper Odd allocator bug in DCMTK code: SEGV on exit 
related to 0002459 closedjcfr DCMTK Destructor issue - Double Free or corruption when exiting Slicer4 

Activities

jcfr

jcfr

2011-11-10 14:58

administrator   ~0003304

Thanks for the remainder. Will be working on that issue on Monday.

pohl

pohl

2011-11-12 11:23

developer   ~0003311

can you then update

Tcl_Interp* vtkSlicerCommonInterface::Startup
and
vtkSlicerCommonInterfaceTest1.cxx

accordingly ?
Thanks

jcfr

jcfr

2011-11-17 16:42

administrator   ~0003328

I started to refactor the code so that the overall process to execute python from a standalone executable like EMSegmentCommandLine is simplified.

On the other hand, I couldn;t reproduce the error.

Would it be possible to provide me with a stack trace ?

pohl

pohl

2011-11-24 06:15

developer   ~0003380

I am trying to run it but all my tests now simply hang :

[14] [11:14am] [sbia-pc82 /software/Slicer4/Slicer4-SuperBuild/Slicer-build/QTModules] >ctest -VV -R vtkSlicerCommonInterfaceStartup
UpdateCTestConfiguration from :/software/Slicer4/Slicer4-SuperBuild/Slicer-build/QTModules/DartConfiguration.tcl
UpdateCTestConfiguration from :/software/Slicer4/Slicer4-SuperBuild/Slicer-build/QTModules/DartConfiguration.tcl
Test project /software/Slicer4/Slicer4-SuperBuild/Slicer-build/QTModules
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 66
Start 66: vtkSlicerCommonInterfaceStartupTest

66: Test command: /software/Slicer4/Slicer4-SuperBuild/Slicer-build/Slicer "--launcher-no-splash" "--launch" "/software/Slicer4/Slicer4-SuperBuild/Slicer-build/bin/vtkSlicerCommonInterfaceStartupTest"
66: Test timeout computed to be: 9.99988e+06
66: emsegmentModulePythonPath:/software/Slicer4/lib/Slicer-build/qt-loadable-modules/Python

nothing happens afterwards

jcfr

jcfr

2011-11-24 12:13

administrator   ~0003382

Could you either provide the version of "vtkSlicerCommonInterfaceStartup" you are using or commit the test into EMSegment repository ?

Adding the test into EMSegment/Testing and updating EMSegment/CMakeLists.txt, after re-configuring and re-compiling, the following tests pass:

jchris@karakoram:~/Projects/Slicer4-Superbuild-Debug/Slicer-build $ ctest -R vtkSlicerCommonInterface
Test project /home/jchris/Projects/Slicer4-Superbuild-Debug/Slicer-build
Start 269: vtkSlicerCommonInterfaceTest1
1/2 Test 0000269: vtkSlicerCommonInterfaceTest1 ......... Passed 1.46 sec
Start 270: vtkSlicerCommonInterfaceStartupTest
2/2 Test 0000270: vtkSlicerCommonInterfaceStartupTest ... Passed 1.22 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) = 3.23 sec

jcfr

jcfr

2011-11-24 12:37

administrator   ~0003383

Following 16910, vtkSlicerCommonInterfaceStartupTest can be simplified. The two "HACK" where mainContext and updatePythonOsEnviron are called can be removed.

See also https://github.com/Slicer/Slicer/commit/72231b6e9880b3ad1ffc93d415e937bcaf192ed6

pohl

pohl

2011-11-28 10:31

developer   ~0003404

Now I get to

ctest -VV vtkSlicerCommonInterfaceStartupTest
UpdateCTestConfiguration from :/software/Slicer4/Slicer4-SuperBuild/Slicer-build/QTModules/DartConfiguration.tcl
UpdateCTestConfiguration from :/software/Slicer4/Slicer4-SuperBuild/Slicer-build/QTModules/DartConfiguration.tcl
Test project /software/Slicer4/Slicer4-SuperBuild/Slicer-build/QTModules
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 1
Start 1: qSlicerColorsModuleWidgetTest1

1: Test command: /software/Slicer4/Slicer4-SuperBuild/Slicer-build/Slicer "--launcher-no-splash" "--launch" "/software/Slicer4/Slicer4-SuperBuild/Slicer-build/bin/ColorsCxxTests" "qSlicerColorsModuleWidgetTest1"
1: Test timeout computed to be: 9.99988e+06
1: RegisterIO "qSlicerColorsIO"

a window shortly pops up and nothing happens afterwards

kikinis

kikinis

2011-12-08 05:28

developer   ~0003429

How is progress with this?

2011-12-08 06:10

 

vtkSlicerCommonInterfaceStartupTest.cxx (2,625 bytes)
jcfr

jcfr

2011-12-13 15:41

administrator   ~0003444

A test named qSlicerApplicationTpyclEMSegmentIntegrationTest has been added. See https://github.com/Slicer/Slicer/commit/bb82ef199e72665a4955dc330c39de9dbb3fec20

The test passes on Ubuntu 10.04 / gcc (Ubuntu 4.4.3-4ubuntu5)

jcfr

jcfr

2011-12-14 05:57

administrator   ~0003446

Linking issue on windows should now be fixed.
See http://slicer.cdash.org/viewBuildError.php?buildid=6120
and http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=18920

pohl

pohl

2011-12-15 18:33

developer   ~0003455

I still have the same issue - how should I debug it ?

Linux sbia-pc82 3.0.0-14-generic 0000023-Ubuntu SMP Mon Nov 21 20:28:43 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

[5] [9:10pm] [sbia-pc82 /data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build] >ctest -VV -R qSlicerApplicationTpyclEMSegmentIntegrationTest
UpdateCTestConfiguration from :/data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build/DartConfiguration.tcl
Parse Config file:/data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build/DartConfiguration.tcl
Add coverage exclude regular expressions.
Add coverage exclude: /CMakeFiles/CMakeTmp/
Add coverage exclude: ./moc_.
Add coverage exclude: ./ui_.
Add coverage exclude: ./Testing/.
UpdateCTestConfiguration from :/data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build/DartConfiguration.tcl
Parse Config file:/data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build/DartConfiguration.tcl
Test project /data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 466
Start 466: qSlicerApplicationTpyclEMSegmentIntegrationTest

466: Test command: /data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build/Slicer "--launcher-no-splash" "--launch" "/data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build/bin/SlicerQTCxxTests" "qSlicerApplicationTpyclEMSegmentIntegrationTest" "/data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build/lib/Slicer-4.0/cli-modules/EMSegmentCommandLine"
466: Test timeout computed to be: 1500
466: emsegmentModulePythonPath:/data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build/lib/Slicer-4.0/qt-loadable-modules/Python
1/1 Test 0000466: qSlicerApplicationTpyclEMSegmentIntegrationTest ...***Timeout 2062.50 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 2063.37 sec

The following tests FAILED:
466 - qSlicerApplicationTpyclEMSegmentIntegrationTest (Timeout)
Errors while running CTest
[6] [9:44pm] [sbia-pc82 /data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build] >

jcfr

jcfr

2011-12-19 07:23

administrator   ~0003462

Last edited: 2011-12-19 07:25

Using the debugger could be useful.
See http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.0/Developers/Tutorials/Debug_Instructions

We need to find out why the test is timing out

jcfr

jcfr

2011-12-20 06:04

administrator   ~0003468

As of Dec 20 2011, the test "qSlicerApplicationTpyclEMSegmentIntegrationTest" passes on the following platform:

pohl

pohl

2012-01-04 16:40

developer   ~0003485

I followed the instructions on that web site but it did not help a lot - instead I executed the following :

[12] [9:34pm] [sbia-pc82 /software/Slicer4/Slicer4-SuperBuild/Slicer-build] >gdb /software/Slicer4/Slicer4-SuperBuild/Slicer-build/bin/vtkSlicerCommonInterfaceStartupTest
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /software/Slicer4/Slicer4-SuperBuild/Slicer-build/bin/vtkSlicerCommonInterfaceStartupTest...done.
(gdb) run
Starting program: /software/Slicer4/Slicer4-SuperBuild/Slicer-build/bin/vtkSlicerCommonInterfaceStartupTest
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffce7ab700 (LWP 21411)]
[New Thread 0x7fffcdfaa700 (LWP 21412)]
[New Thread 0x7fffc2ee3700 (LWP 21413)]
[New Thread 0x7fffc26e2700 (LWP 21414)]
[New Thread 0x7fffc1ee1700 (LWP 21415)]
[New Thread 0x7fffc16e0700 (LWP 21416)]
emsegmentModulePythonPath:/software/Slicer4/lib/Slicer-build/qt-loadable-modules/Python
[Thread 0x7fffc2ee3700 (LWP 21413) exited]
pure virtual method called
[Thread 0x7fffc26e2700 (LWP 21414) exited]
terminate called without an active exception

Program received signal SIGABRT, Aborted.
0x00007ffff51ef3a5 in raise () from /lib/x86_64-linux-gnu/libc.so.6

(gdb) backtrace
#0 0x00007ffff51ef3a5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
0000001 0x00007ffff51f2b0b in abort () from /lib/x86_64-linux-gnu/libc.so.6
0000002 0x00007ffff5829d7d in gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0000003 0x00007ffff5827f26 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0000004 0x00007ffff5827f53 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0000005 0x00007ffff582896f in
cxa_pure_virtual () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0000006 0x00007fffb8c1ab96 in OFCondition::~OFCondition (this=0x7fffb9c7cb90, __in_chrg=<optimized out>)
at /software/Slicer4/Slicer4-SuperBuild/CTK-build/CMakeExternals/Install/include/dcmtk/ofstd/ofcond.h:346
0000007 0x00007ffff51f4821 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
0000008 0x00007ffff51f48a5 in exit () from /lib/x86_64-linux-gnu/libc.so.6
0000009 0x00007ffff51da314 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
0000010 0x0000000000401eb9 in _start ()

Any help ?

finetjul

finetjul

2012-01-04 22:02

administrator   ~0003490

Last edited: 2012-01-04 22:25

http://forum.dcmtk.org/viewtopic.php?t=1119
http://forum.dcmtk.org/viewtopic.php?t=503

Somewhere in your test, you might want to add "OFCondition cond = EC_Normal;"

jcfr

jcfr

2012-01-11 11:17

administrator   ~0003496

After preventing the DICOM related modules from loading, it resumes the issue is related to FD message handler.

The following backtrace has been obtained by attaching gdb to the SlicerQTCxxTests.

(gdb) backtrace
#0 0x00007f6ed489004c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
0000001 0x00007f6ed4b271ab in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
0000002 0x00007f6ed4b26a4c in QThread::wait(unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
0000003 0x00007f6ed5c79b4d in ctkFDHandler::setEnabled (this=0x210dcf0, value=false) at /software/Slicer4/Slicer4-SuperBuild/CTK/Libs/Core/ctkErrorLogFDMessageHandler.cpp:133
0000004 0x00007f6ed5c7a111 in ctkErrorLogFDMessageHandler::setEnabledInternal (this=0x210d5d0, value=false) at /software/Slicer4/Slicer4-SuperBuild/CTK/Libs/Core/ctkErrorLogFDMessageHandler.cpp:254
0000005 0x00007f6ed5c76139 in ctkErrorLogAbstractMessageHandler::setEnabled (this=0x210d5d0, value=false) at /software/Slicer4/Slicer4-SuperBuild/CTK/Libs/Core/ctkErrorLogModel.cpp:734
0000006 0x00007f6ed5c72d5f in ctkErrorLogModelPrivate::~ctkErrorLogModelPrivate (this=0x2115fb0, in_chrg=<optimized out>) at /software/Slicer4/Slicer4-SuperBuild/CTK/Libs/Core/ctkErrorLogModel.cpp:231
0000007 0x00007f6ed5c787a9 in QScopedPointerDeleter<ctkErrorLogModelPrivate>::cleanup (pointer=0x2115fb0) at /usr/include/qt4/QtCore/qscopedpointer.h:62
0000008 0x00007f6ed5c77556 in QScopedPointer<ctkErrorLogModelPrivate, QScopedPointerDeleter<ctkErrorLogModelPrivate> >::~QScopedPointer (this=0x2149ef0, __in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qscopedpointer.h:100
0000009 0x00007f6ed5c73348 in ctkErrorLogModel::~ctkErrorLogModel (this=0x2149ee0,
in_chrg=<optimized out>) at /software/Slicer4/Slicer4-SuperBuild/CTK/Libs/Core/ctkErrorLogModel.cpp:287
0000010 0x00007f6ed5c733cb in ctkErrorLogModel::~ctkErrorLogModel (this=0x2149ee0, in_chrg=<optimized out>) at /software/Slicer4/Slicer4-SuperBuild/CTK/Libs/Core/ctkErrorLogModel.cpp:289
0000011 0x00007f6ed66704fb in QtSharedPointer::ExternalRefCount<ctkErrorLogModel>::deref (d=0x214fb90, value=0x2149ee0) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:344
0000012 0x00007f6ed666f927 in QtSharedPointer::ExternalRefCount<ctkErrorLogModel>::deref (this=0x1e980b8) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:338
0000013 0x00007f6ed666e39f in QtSharedPointer::ExternalRefCount<ctkErrorLogModel>::~ExternalRefCount (this=0x1e980b8, in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:403
0000014 0x00007f6ed666dd2d in QSharedPointer<ctkErrorLogModel>::~QSharedPointer (this=0x1e980b8,
in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:461
0000015 0x00007f6ed6666666 in qSlicerCoreApplicationPrivate::~qSlicerCoreApplicationPrivate (this=0x1e98010, __in_chrg=<optimized out>) at /software/Slicer4/Slicer4/Base/QTCore/qSlicerCoreApplication.cxx:99
0000016 0x00007f6ed6b6d29c in qSlicerApplicationPrivate::~qSlicerApplicationPrivate (this=0x1e98010,
in_chrg=<optimized out>) at /software/Slicer4/Slicer4/Base/QTGUI/qSlicerApplication.cxx:96
0000017 0x00007f6ed6b6d329 in qSlicerApplicationPrivate::~qSlicerApplicationPrivate (this=0x1e98010, in_chrg=<optimized out>) at /software/Slicer4/Slicer4/Base/QTGUI/qSlicerApplication.cxx:100
0000018 0x00007f6ed666fe0e in QScopedPointerDeleter<qSlicerCoreApplicationPrivate>::cleanup (pointer=0x1e98010) at /usr/include/qt4/QtCore/qscopedpointer.h:62
0000019 0x00007f6ed666eba6 in QScopedPointer<qSlicerCoreApplicationPrivate, QScopedPointerDeleter<qSlicerCoreApplicationPrivate> >::~QScopedPointer (this=0x1d235f8, __in_chrg=<optimized out>) at /usr/include/qt4/QtCore/qscopedpointer.h:100
0000020 0x00007f6ed6669a64 in qSlicerCoreApplication::~qSlicerCoreApplication (this=0x1d235d0,
in_chrg=<optimized out>) at /software/Slicer4/Slicer4/Base/QTCore/qSlicerCoreApplication.cxx:562
0000021 0x00007f6ed6b6d90f in qSlicerApplication::~qSlicerApplication (this=0x1d235d0, __in_chrg=<optimized out>) at /software/Slicer4/Slicer4/Base/QTGUI/qSlicerApplication.cxx:173
0000022 0x00007f6ed6b6d965 in qSlicerApplication::~qSlicerApplication (this=0x1d235d0, __in_chrg=<optimized out>) at /software/Slicer4/Slicer4/Base/QTGUI/qSlicerApplication.cxx:175
0000023 0x00000000004080d7 in qSlicerApplicationTpyclEMSegmentIntegrationTest (argc=2, argv=0x7ffff9b8bc80) at /software/Slicer4/Slicer4/Applications/SlicerQT/Testing/Cpp/qSlicerApplicationTpyclEMSegmentIntegrationTest.cxx:54
0000024 0x0000000000404cdb in main (ac=2, av=0x7ffff9b8bc80) at /software/Slicer4/Slicer4-SuperBuild/Slicer-build/Applications/SlicerQT/Testing/Cpp/SlicerQTCxxTests.cxx:171

pohl

pohl

2012-01-12 05:56

developer   ~0003497

When executing

make SlicerQTCxxTests && ctest -VV -R EMSegmentInt

with
int qSlicerApplicationTpyclEMSegmentIntegrationTest(int argc, char argv[])
{
// qSlicerApplication::setAttribute(qSlicerApplication::AA_DisablePython, true);
qSlicerApplication
app = new qSlicerApplication(argc, argv);
delete app;
return EXIT_SUCCESS;
}

then the test passes. if we include
SlicerApplication::setAttribute(qSlicerApplication::AA_DisablePython, true);

then the test crashes

481: pure virtual method called
481: terminate called without an active exception
481: error: [/software/Slicer4/Slicer4-SuperBuild/Slicer-build/bin/SlicerQTCxxTests] exit abnormally - Report the problem.
1/1 Test 0000481: qSlicerApplicationTpyclEMSegmentIntegrationTest ...***Failed 1.61 sec

with the following backtrace:

Program received signal SIGABRT, Aborted.
0x00007ffff410d3a5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) backtrace
#0 0x00007ffff410d3a5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
0000001 0x00007ffff4110b0b in abort () from /lib/x86_64-linux-gnu/libc.so.6
0000002 0x00007ffff4747d7d in gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0000003 0x00007ffff4745f26 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0000004 0x00007ffff4745f53 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0000005 0x00007ffff474696f in
cxa_pure_virtual () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0000006 0x00007fffbabc6b96 in OFCondition::~OFCondition (this=0x7fffbbc28b90, __in_chrg=<optimized out>) at /software/Slicer4/Slicer4-SuperBuild/CTK-build/CMakeExternals/Install/include/dcmtk/ofstd/ofcond.h:346
0000007 0x00007ffff4112821 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
0000008 0x00007ffff41128a5 in exit () from /lib/x86_64-linux-gnu/libc.so.6
0000009 0x00007ffff40f8314 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
0000010 0x00000000004043b9 in _start ()

which is due to dcmtk

pohl

pohl

2012-01-12 06:22

developer   ~0003498

To pass it disable DICOM (temporary solution)
Step 1) Remove form CTK

  • go to CTK-build
  • ccmake . and disable all entries with DICOM on the top level -> make
    Step 2) Remove from Slicer 4
  • Comment out dicom entry from /software/Slicer4/Slicer4/Base/QTCore/CMakeLists.txt
  • recompile slicer
  • remove in Slicer-build/lib/Slicer-4.0/qt-scripted-modules/
    DICOM2FullBrainTractography.py and DICOM.py

then the above test passes

pohl

pohl

2012-01-12 06:54

developer   ~0003499

if comment out

//this->ErrorLogModel->registerMsgHandler(new ctkErrorLogFDMessageHandler);

in

Slicer4/Base/QTCore/qSlicerCoreApplication.cxx

then the entire test passes

pohl

pohl

2012-01-14 15:50

developer   ~0003500

If I execute the test in release mode same bug comes up

test 481
Start 481: qSlicerApplicationTpyclEMSegmentIntegrationTest

481: Test command: /data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build/Slicer "--launcher-no-splash" "--launch" "/data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build/bin/SlicerQTCxxTests" "qSlicerApplicationTpyclEMSegmentIntegrationTest" "/data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build/lib/Slicer-4.0/cli-modules/EMSegmentCommandLine"
481: Test timeout computed to be: 1500
481: emsegmentModulePythonPath:/data/software/Slicer4-2011-12-15-18938/Slicer4-SuperBuild/Slicer-build/lib/Slicer-4.0/qt-loadable-modules/Python

now it hangs

finetjul

finetjul

2012-01-19 06:15

administrator   ~0003505

The OFCondition crash at exit is due to:
import ctk
in slicerqt.py (loaded at startup)

I tried to reproduce the error in CTK only by running:
$ ./bin/CTKScriptingPythonWidgetsCppTests ctkPythonConsoleTest1 -I

import ctk
ImportError: No module named ctk

pohl

pohl

2012-01-19 13:31

developer   ~0003508

I do not understand the entry completely - it does not seem to replicate the bug - correct ?

finetjul

finetjul

2012-01-23 19:24

administrator   ~0003520

In CTK, ctkSimplePythonShell reproduces the OFCondition crash at exit (pure virtual method called).
Preventing CTKDICOMWidgetsPythonQt from being loaded in init.py doesn't produce the error.
More specifically, removing all the registerClass() from PythonQt_init_org_commontk_CTKDICOMWidgets prevents the error from occuring.
Jc, any idea on what could go wrong ?

finetjul

finetjul

2012-01-24 08:41

administrator   ~0003523

Ok, I can now reproduce in CTK without the need of using python.
Just running the ctkDICOM app is enough to reproduce the crash. An email has been sent to the offis (dcmtk) team.

jcfr

jcfr

2012-01-25 11:33

administrator   ~0003527

From Julien:

With what test do you have the crash ?

When I fix the DICOM error, I don't have the msghandler problem:
from a clean slicer repo:
edit the file: Slicer-Superbuild/CTK/Libs/Scripting/Python/Core/Python/ctk/init.py.in :
...
if kit != 'DICOMWidgets' :
exec "from CTK%sPythonQt import *" % (kit)
...
cd CTK-build/CTK-build; make;
cd ../../Slicer-build; make
ctest -R EMSeg

then all the tests but 2 pass.

pohl

pohl

2012-01-29 05:34

developer   ~0003570

so I checked out Slicer

edited Slicer-Superbuild/CTK/Libs/Scripting/Python/Core/Python/ctk/init.py.in

I changed

try:
exec "from CTK%sPythonQt import *" % (kit)

to
try:
if kit != 'DICOMWidgets' :
exec "from CTK%sPythonQt import *" % (kit)

build CTK and SLICER

and executed ctest -VV -R qSlicerApplicationTpyclEMSegmentIntegrationTest

The test still gets stuck - nothing has changed. Is that also true for you ?

If yours is passing do you have the 32 or 64 bit version of ubuntu installed ?
Here is mine

Linux sbia-pc82 3.0.0-15-generic 0000026-Ubuntu SMP Fri Jan 20 17:23:00 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

jcfr

jcfr

2012-01-30 06:33

administrator   ~0003571

Could you make sure the file "CTK-build/CTK-build/bin/Python/ctk/init.py" still contains the modification after rebuilding ?

If not, I would suggest to directly update the file "CTK-build/CTK-build/bin/Python/ctk/init.py"

pohl

pohl

2012-01-30 18:17

developer   ~0003573

it does

2012-02-22 13:53

 

pohl

pohl

2012-02-23 10:07

developer   ~0003706

The problem with ctkErrorLogFDMessageHandler seems to be resolved thanks to JC . We now still have the issue with DCMTK. So If we run Slicer without DCMTK by
1) removing DICOMWidgets' and 'DICOMCore' from CTK-build/CTK-build/bin/Python/ctk/init.py
2) remove DICOM2FullBrainTractography.py and DICOM.py in Slicer-build/lib/Slicer-4.0/qt-scripted-modules/
then ctest qSlicerApplicationTpyclEMSegmentIntegrationTest passes

Additional notes from JC:
No recompilation of CTK / Slicer should be required to disable DICOM related module.

Each time you will update EMSegment code, make sure to either just rebuild the corresponding target in Slicer or remove the DICOM2FullBrainTractography.py and DICOM.py again.

jcfr

jcfr

2012-05-09 09:29

administrator   ~0004237

Reminder sent to: finetjul, pieper

Steve, Julien,

I changed the target version to 4.2.0 (Summer AHM), does that sounds reasonable. It's now too long we are keeping that issue open.

I also created issue 0002006 allowing to track the update of DCMTK version.

pohl

pohl

2012-07-24 11:07

developer   ~0005223

Now when I

1) removing DICOMWidgets' and 'DICOMCore' from CTK-build/CTK-build/bin/Python/ctk/init.py
2) remove DICOM2FullBrainTractography.py and DICOM.py in Slicer-build/lib/Slicer-4.1/qt-scripted-modules/

ctest qSlicerApplicationTpyclEMSegmentIntegrationTest fails

jcfr

jcfr

2012-07-24 11:13

administrator   ~0005224

Last edited: 2012-07-24 11:14

If the stack trace still mention OFCondition .. it means you failed to remove / rebuild without DCMTK. Could you check which stack trace you obtain ?

See http://www.na-mic.org/Bug/view.php?id=1537#c3527

FYI - Few days ago, an option named Slicer_BUILD_DICOM_SUPPORT has been added. You could probably do a clean build in a different folder disabling this option.

pohl

pohl

2012-07-24 13:24

developer   ~0005225

I confirm that the test does not fail anymore after performing a clean build with Slicer_BUILD_DICOM_SUPPORT disabled

finetjul

finetjul

2012-08-14 12:56

administrator   ~0005550

Either
a) fix the linking with Static DCMTK or
b) change to loadable DCMTK

jcfr

jcfr

2013-01-17 13:41

administrator   ~0007703

This should be fixed with the recent update made at the AHM2013 when working on the ITKv4 integration. See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=21602

Issue History

Date Modified Username Field Change
2011-11-10 14:24 pohl New Issue
2011-11-10 14:24 pohl Status new => assigned
2011-11-10 14:24 pohl Assigned To => jcfr
2011-11-10 14:24 pohl File Added: vtkSlicerCommonInterfaceStartupTest.cxx
2011-11-10 14:58 jcfr Note Added: 0003304
2011-11-12 11:23 pohl Note Added: 0003311
2011-11-17 16:42 jcfr Note Added: 0003328
2011-11-24 06:15 pohl Note Added: 0003380
2011-11-24 12:13 jcfr Note Added: 0003382
2011-11-24 12:37 jcfr Note Added: 0003383
2011-11-28 10:31 pohl Note Added: 0003404
2011-12-08 05:28 kikinis Note Added: 0003429
2011-12-08 06:10 pohl File Deleted: vtkSlicerCommonInterfaceStartupTest.cxx
2011-12-08 06:10 pohl File Added: vtkSlicerCommonInterfaceStartupTest.cxx
2011-12-13 15:41 jcfr Note Added: 0003444
2011-12-14 05:57 jcfr Note Added: 0003446
2011-12-15 18:33 pohl Note Added: 0003455
2011-12-19 07:23 jcfr Note Added: 0003462
2011-12-19 07:25 jcfr Note Edited: 0003462
2011-12-20 06:04 jcfr Note Added: 0003468
2012-01-04 16:40 pohl Note Added: 0003485
2012-01-04 22:02 finetjul Note Added: 0003490
2012-01-04 22:25 finetjul Note Edited: 0003490
2012-01-11 11:17 jcfr Note Added: 0003496
2012-01-12 05:56 pohl Note Added: 0003497
2012-01-12 06:22 pohl Note Added: 0003498
2012-01-12 06:54 pohl Note Added: 0003499
2012-01-14 15:50 pohl Note Added: 0003500
2012-01-19 06:15 finetjul Note Added: 0003505
2012-01-19 13:31 pohl Note Added: 0003508
2012-01-23 19:24 finetjul Note Added: 0003520
2012-01-24 08:41 finetjul Note Added: 0003523
2012-01-25 11:33 jcfr Note Added: 0003527
2012-01-25 11:34 jcfr Assigned To jcfr => pohl
2012-01-25 11:34 jcfr Status assigned => feedback
2012-01-29 05:34 pohl Note Added: 0003570
2012-01-30 06:33 jcfr Note Added: 0003571
2012-01-30 18:17 pohl Note Added: 0003573
2012-02-02 04:38 finetjul Status feedback => assigned
2012-02-22 13:53 jcfr File Added: Slicer-ctkErrorLogFDMessageHandler-hang.png
2012-02-23 10:07 pohl Note Added: 0003706
2012-04-04 22:52 pohl Assigned To pohl => finetjul
2012-05-09 09:25 jcfr Target Version Slicer 4.0.0 => Slicer 4.2.0 AHM Summer 2012
2012-05-09 09:29 jcfr Note Added: 0004237
2012-07-24 11:07 pohl Note Added: 0005223
2012-07-24 11:13 jcfr Note Added: 0005224
2012-07-24 11:14 jcfr Note Edited: 0005224
2012-07-24 13:24 pohl Note Added: 0005225
2012-07-30 05:28 pieper Relationship added related to 0002204
2012-08-14 12:55 finetjul Assigned To finetjul => jcfr
2012-08-14 12:56 finetjul Note Added: 0005550
2012-08-20 11:37 jcfr Target Version Slicer 4.2.0 - Feature freeze Sept 1st 2012 => Slicer 4.2.5
2012-08-21 09:39 jcfr Target Version Slicer 4.2.5 => Slicer 4.3.0
2013-01-17 13:41 jcfr Note Added: 0007703
2013-01-17 13:41 jcfr Status assigned => resolved
2013-01-17 13:41 jcfr Fixed in Version => Slicer 4.3.0
2013-01-17 13:41 jcfr Resolution open => fixed
2013-01-17 14:38 pohl Status resolved => closed
2013-01-17 15:38 jcfr Relationship added related to 0002459