View Issue Details

IDProjectCategoryView StatusLast Update
0003571Slicer4Core: Scripting (Wrapping, Python)public2014-05-20 08:51
Reporterjcfr Assigned Toblowekamp  
PriorityhighSeveritycrashReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.4.0Fixed in VersionSlicer 4.4.0 
Summary0003571: Import SimpleITK in Release build crashes Slicer
Description

$ ./Slicer --disable-builtin-modules --python-code "import SimpleITK"
Number of registered modules: 1
Number of instantiated modules: 1
Number of loaded modules: 1

Segmentation fault (core dumped)

Additional Information

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.10
Release: 13.10
Codename: saucy

$ gcc --version
gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1

TagsNo tags attached.

Activities

blowekamp

blowekamp

2014-01-29 08:50

developer   ~0010538

Is this a local build? Is this the standard configuration beyond just turning on SimpleITK?
What is the contents of the python's "site-packages"?
From a Slicer super build it would be "./python-install/lib/python2.7/site-packages/". The directory listings for the SimpleITK egg directory and the contents of the "setuptools.pth" file are also of interest.

jcfr

jcfr

2014-01-29 09:25

administrator   ~0010540

I just re-started a clean local build with the following options. Will keep you posted.

cmake -DCMAKE_BUILD_TYPE:STRING=Release -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/jchris/Support/qt-everywhere-opensource-release-build-4.8.5/bin/qmake -DSlicer_USE_SimpleITK:BOOL=1 -DSlicer_USE_QtTesting:BOOL=0 -DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=1 -DSlicer_BUILD_CLI:BOOL=0 -DSlicer_BUILD_QTSCRIPTEDMODULES:BOOL=0 -DSlicer_BUILD_DIFFUSION_SUPPORT:BOOL=0 -DSlicer_BUILD_MULTIVOLUME_SUPPORT:BOOL=0 ../Slicer-1


Is this a local build?
Yes


Contents of site-packages folder:

$ pwd
/home/jchris/Projects/Slicer-SuperBuild-Release-Qt485/python-install/lib/python2.7/site-packages

$ ls -1 SimpleITK-0.7.1.post1-py2.7-linux-x86_64.egg/*
SimpleITK-0.7.1.post1-py2.7-linux-x86_64.egg/SimpleITK.py
SimpleITK-0.7.1.post1-py2.7-linux-x86_64.egg/SimpleITK.pyc
SimpleITK-0.7.1.post1-py2.7-linux-x86_64.egg/_SimpleITK.so

SimpleITK-0.7.1.post1-py2.7-linux-x86_64.egg/EGG-INFO:
dependency_links.txt
not-zip-safe
PKG-INFO
SOURCES.txt
top_level.txt


Content of "setuptools.pth"

$ cat setuptools.pth
./distribute-0.6.28-py2.7.egg

blowekamp

blowekamp

2014-01-29 10:11

developer   ~0010541

I completed a clean build on a RH6 system and it works OK.

Everything looks in order with what you posed. I have seen crashing when importing SimpleITK when there were multiple eggs installed, and version mis-matches of ITK and other dependencies.

A stack trace would also be useful.

Do most of the Slicer tests pass? There are no other issues with the build?

A library dependency issue also comes to mind. Either a mis-match of the libraries _SimpleITK.so depends on compared to other ITK/Qt. Or some mis-match source files during the build causing problems.

jcfr

jcfr

2014-01-29 12:03

administrator   ~0010542

Thanks for checking on your side.

I confirm that a clean Release configure/build [1] on the system documented in the issue description leads to a crash after importing SimpleITK [2]

On the other hand, a Debug configure/build works as expected.

As a side note, on a release build, I also have issue loading dicom files. Currently investigating.

[1] cmake -DCMAKE_BUILD_TYPE:STRING=Release -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/jchris/Support/qt-everywhere-opensource-release-build-4.8.5/bin/qmake -DSlicer_USE_SimpleITK:BOOL=1 -DSlicer_USE_QtTesting:BOOL=0 -DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=1 -DSlicer_BUILD_CLI:BOOL=0 -DSlicer_BUILD_QTSCRIPTEDMODULES:BOOL=0 -DSlicer_BUILD_DIFFUSION_SUPPORT:BOOL=0 -DSlicer_BUILD_MULTIVOLUME_SUPPORT:BOOL=0 ../Slicer-1

[2] ./Slicer --disable-builtin-modules --python-code "import SimpleITK"

blowekamp

blowekamp

2014-01-29 13:36

developer   ~0010543

Replicating you configuration line I got the following configuration error (during Slicer?):
CMake Error at CMake/ExternalData.cmake:161 (add_test):
Error evaluating generator expression:

$<TARGET_FILE:EMSegmentCommandLine>

No target "EMSegmentCommandLine"
Call Stack (most recent call first):
CMake/SlicerMacroSimpleTest.cmake:44 (ExternalData_add_test)
Applications/SlicerApp/Testing/Cpp/CMakeLists.txt:56 (simple_test)

Had to add the following to the configuration:
cmake -DSlicer_BUILD_EMSegment:BOOL=OFF

jcfr

jcfr

2014-05-20 08:51

administrator   ~0011915

Unable to reproduce the crash.

Issue History

Date Modified Username Field Change
2014-01-29 08:27 jcfr New Issue
2014-01-29 08:27 jcfr Status new => assigned
2014-01-29 08:27 jcfr Assigned To => jcfr
2014-01-29 08:28 jcfr Assigned To jcfr => blowekamp
2014-01-29 08:28 jcfr Target Version => Slicer 4.4.0
2014-01-29 08:28 jcfr Additional Information Updated
2014-01-29 08:50 blowekamp Note Added: 0010538
2014-01-29 08:50 blowekamp Status assigned => feedback
2014-01-29 09:25 jcfr Note Added: 0010540
2014-01-29 10:11 blowekamp Note Added: 0010541
2014-01-29 12:03 jcfr Note Added: 0010542
2014-01-29 12:03 jcfr Description Updated
2014-01-29 13:36 blowekamp Note Added: 0010543
2014-05-20 08:51 jcfr Note Added: 0011915
2014-05-20 08:51 jcfr Status feedback => resolved
2014-05-20 08:51 jcfr Fixed in Version => Slicer 4.4.0
2014-05-20 08:51 jcfr Resolution open => fixed
2014-05-20 08:51 jcfr Status resolved => closed