View Issue Details

IDProjectCategoryView StatusLast Update
0002196Slicer4Core: CLI infrastructurepublic2014-03-06 05:02
ReporterAnthonyBlumfield Assigned Tojcfr  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformOSWindows 7OS VersionSP1
Product VersionSlicer 4.1.0 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.0 
Summary0002196: Command line module hangs – regression from slicer 3 to slicer 4
Description

The cpp in the attached zip is a light weight command line module that only loads an input file using itk::ImageFileReader.
It works fine standalone and from 3D slicer v3; however, it crashes when launched from 3D slicer v4 when the line reader->Update(); is executed.
See stack below.

Of note is the fact that when the line itk::ImageFileReader<ImageType>::Pointer reader = itk::ImageFileReader<ImageType>::New(); executes a list of DLLs are loaded into the process space. See Additional information section below. These DLLs are not loaded when launching the command line module from 3D slicer v3 or standalone indicating that the method command line models are launched has changed.
This problem was successfully reproduced on 2 separate windows 7 machines and prevents migration to slicer v4.
The problem was reproduced using both itk 3.20.0 and 3.20.1.

Stack>
slicer4cmdmdlhang.exe!std::list<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject> > >::begin() Line 782 + 0x13 bytes C++
slicer4cmdmdlhang.exe!std::list<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject> > >::splice(std::_List_const_iterator<std::_List_val<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject> > > > _Where, std::list<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject> > > & _Right) Line 1139 + 0x90 bytes C++
slicer4cmdmdlhang.exe!itk::ObjectFactoryBase::CreateAllInstance(const char
itkclassname) Line 145 + 0x71 bytes C++
slicer4cmdmdlhang.exe!itk::ImageIOFactory::CreateImageIO(const char path, itk::ImageIOFactory::FileModeType mode) Line 52 + 0x11 bytes C++
slicer4cmdmdlhang.exe!itk::ImageFileReader<itk::Image<short,2>,itk::DefaultConvertPixelTraits<short> >::GenerateOutputInformation() Line 120 + 0x29 bytes C++
slicer4cmdmdlhang.exe!itk::ProcessObject::UpdateOutputInformation() Line 756 C++
slicer4cmdmdlhang.exe!itk::ImageBase<2>::UpdateOutputInformation() Line 234 + 0x43 bytes C++
slicer4cmdmdlhang.exe!itk::DataObject::Update() Line 343 C++
slicer4cmdmdlhang.exe!itk::ProcessObject::Update() Line 617 C++
slicer4cmdmdlhang.exe!main(int argc, char
argv) Line 23 C++
slicer4cmdmdlhang.exe!__tmainCRTStartup() Line 555 + 0x19 bytes C
slicer4cmdmdlhang.exe!mainCRTStartup() Line 371 C
kernel32.dll!000000007733652d()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
ntdll.dll!0000000077a2c521()
slicer4cmdmdlhang.exe!std::list<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject> > >::begin() Line 782 + 0x13 bytes C++
slicer4cmdmdlhang.exe!std::list<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject> > >::splice(std::_List_const_iterator<std::_List_val<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject> > > >
_Where, std::list<itk::SmartPointer<itk::LightObject>,std::allocator<itk::SmartPointer<itk::LightObject> > > & _Right) Line 1139 + 0x90 bytes C++
slicer4cmdmdlhang.exe!itk::ObjectFactoryBase::CreateAllInstance(const char itkclassname) Line 145 + 0x71 bytes C++
slicer4cmdmdlhang.exe!itk::ImageIOFactory::CreateImageIO(const char
path, itk::ImageIOFactory::FileModeType mode) Line 52 + 0x11 bytes C++
slicer4cmdmdlhang.exe!itk::ImageFileReader<itk::Image<short,2>,itk::DefaultConvertPixelTraits<short> >::GenerateOutputInformation() Line 120 + 0x29 bytes C++
slicer4cmdmdlhang.exe!itk::ProcessObject::UpdateOutputInformation() Line 756 C++
slicer4cmdmdlhang.exe!itk::ImageBase<2>::UpdateOutputInformation() Line 234 + 0x43 bytes C++
slicer4cmdmdlhang.exe!itk::DataObject::Update() Line 343 C++
slicer4cmdmdlhang.exe!itk::ProcessObject::Update() Line 617 C++
slicer4cmdmdlhang.exe!main(int argc, char argv) Line 23 C++
slicer4cmdmdlhang.exe!__tmainCRTStartup() Line 555 + 0x19 bytes C
slicer4cmdmdlhang.exe!mainCRTStartup() Line 371 C
kernel32.dll!000000007733652d()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
ntdll.dll!0000000077a2c521()

Steps To Reproduce

place command line module in modules directory
restart slicer
select modules / test / slicer 4 hang test
enter DICOM file name
press Apply
command line module will crash

Additional Information

DLLs loaded when line itk::ImageFileReader<ImageType>::Pointer reader = itk::ImageFileReader<ImageType>::New(); is executed:
'slicer4cmdmdlhang.exe': 'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\lib\Slicer-4.0\ITKFactories\MGHIOPlugin.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\lib\Slicer-4.0\MGHIO.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\ITKCommon.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\winsxs\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_08e61857a83bc251\msvcp90.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\winsxs\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_08e61857a83bc251\msvcr90.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\uxtheme.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\dwmapi.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac\comctl32.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\shlwapi.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\lib\Slicer-4.0\ITKFactories\MRMLIDIOPlugin.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\lib\Slicer-4.0\MRMLIDIO.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\lib\Slicer-4.0\MRMLCore.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\lib\Slicer-4.0\vtkITK.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkCommon.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtksys.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\wsock32.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkFiltering.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkImaging.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkGraphics.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkverdict.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkHybrid.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkRendering.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkIO.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkDICOMParser.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkNetCDF.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkNetCDF_cxx.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkmetaio.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkzlib.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkpng.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkjpeg.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtktiff.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkexpat.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\avifil32.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\winmm.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\msacm32.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\msvfw32.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\shell32.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_a4d6a923711520a9\comctl32.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkftgl.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\opengl32.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\glu32.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\ddraw.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\dciman32.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkfreetype.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\QTGUI4.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\comdlg32.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\winspool.drv', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\QTCORE4.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\d3d9.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\version.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\d3d8thk.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkParallel.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\VPIC.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\Cosmo.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\vtkexoIIc.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Windows\System32\avicap32.dll', Cannot find or open the PDB file
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\lib\Slicer-4.0\FreeSurfer.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\lib\Slicer-4.0\vtkTeem.dll', Binary was not built with debug information.
'slicer4cmdmdlhang.exe': Loaded 'C:\Program Files (x86)\Slicer 4.0.1\bin\teem.dll', Binary was not built with debug information.

TagsNo tags attached.

Activities

2012-06-13 19:02

 

slicer4cmdmdlhang.zipx (3,068,302 bytes)
AnthonyBlumfield

AnthonyBlumfield

2012-06-18 14:11

reporter   ~0004849

Last edited: 2012-06-19 04:59

Further investigation:
Slicer v4 sets environment variable ITK_AUTOLOAD_PATH=C:/Program Files (x86)/Slicer 4.0.1/lib/Slicer-4.0/ITKFactories
Slicer v3 did not set this environment variable
Calling _putenv("ITK_AUTOLOAD_PATH=") at the beginning of main of the cli works around the problem and the cli completes with no crash.

AnthonyBlumfield

AnthonyBlumfield

2012-06-19 05:06

reporter   ~0004852

Per discussion with JC: The current CLI child process inherits the environment from slicer. This should not be a problem for CLIs that build together with slicer, however, is for CLIs that are built outside slicer.
The long term solution for this is the extension SDK in the roadmap.
Short term the work around is calling _putenv("ITK_AUTOLOAD_PATH=") within the CLI.

pieper

pieper

2013-08-27 11:58

administrator   ~0009641

Hi Anthony -

It sounds like this issue is resolved? I.e. if you build the CLI as an extension then everything should work, correct?

-Steve

jcfr

jcfr

2013-08-30 12:39

administrator   ~0009739

This has been bixed in r21853
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=21853

jcfr

jcfr

2014-03-06 05:00

administrator   ~0010850

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

Issue History

Date Modified Username Field Change
2012-06-13 19:02 AnthonyBlumfield New Issue
2012-06-13 19:02 AnthonyBlumfield File Added: slicer4cmdmdlhang.zipx
2012-06-18 14:11 AnthonyBlumfield Note Added: 0004849
2012-06-19 04:59 AnthonyBlumfield Note Edited: 0004849
2012-06-19 05:06 AnthonyBlumfield Note Added: 0004852
2012-08-20 08:14 nicole Assigned To => jcfr
2012-08-20 08:14 nicole Status new => assigned
2012-08-20 08:14 nicole Target Version => Slicer 4.3.0
2013-08-27 11:58 pieper Note Added: 0009641
2013-08-27 12:07 jcfr Status assigned => feedback
2013-08-30 12:39 jcfr Note Added: 0009739
2013-08-30 12:39 jcfr Status feedback => resolved
2013-08-30 12:39 jcfr Fixed in Version => Slicer 4.3.0
2013-08-30 12:39 jcfr Resolution open => fixed
2014-03-06 05:00 jcfr Note Added: 0010850
2014-03-06 05:02 jcfr Status resolved => closed