jilei-hao / itksnap

ITK-SNAP medical image segmentation tool
https://sourceforge.net/p/itk-snap/src/ci/master/tree/
GNU General Public License v3.0
0 stars 0 forks source link

4.2.0-alpha.1 crashes when reading double images #179

Closed jilei-hao closed 8 months ago

jilei-hao commented 8 months ago

SNAP crashes when reading double images. Converting to float using c3d can solve the issue.

/Volumes/itksnap-4.2.0-alpha.1-20231204-Darwin-Universal/ITK-SNAP.app/Contents/MacOS/ITK-SNAP -g b0_mni.nii.gz
Launching ITK-SNAP
*************************************
*************************************
ITK-SNAP: *************************************
ITK-SNAP: Segmentation fault: 11
BACKTRACE: Segmentation fault: 11
ITK-SNAP: Segmentation fault: 11
BACKTRACE: 

BACKTRACE: 
0   ITK-SNAP                            0x000000010bb1d28e _Z24SegmentationFaultHandleri + 142
0   ITK-SNAP                            0x000000010bb1d28e _Z24SegmentationFaultHandleri + 142
0   ITK-SNAP                            0x000000010bb1d28e _Z24SegmentationFaultHandleri + 142
1   libsystem_platform.dylib            0x00007ff80db7cdfd _sigtramp + 29
1   libsystem_platform.dylib            0x00007ff80db7cdfd _sigtramp + 29
1   libsystem_platform.dylib            0x00007ff80db7cdfd _sigtramp + 29
2   ???                                 0x0000000000000090 0x0 + 144
2   ???                                 0x0000000000000090 0x0 + 144
2   ???                                 0x0000000000000004 0x0 + 4
3   ITK-SNAP                            0x000000010bf7c1be _ZNSt3__110__function6__funcIZN3itk17MultiThreaderBase22ParallelizeImageRegionILj2EEEvRKNS2_11ImageRegionIXT_EEENS_8functionIFvS8_EEEPNS2_13ProcessObjectEEUlPKlPKmE_NS_9allocatorISI_EEFvSF_SH_EEclEOSF_OSH_ + 62
3   ITK-SNAP                            0x000000010bf7c1be _ZNSt3__110__function6__funcIZN3itk17MultiThreaderBase22ParallelizeImageRegionILj2EEEvRKNS2_11ImageRegionIXT_EEENS_8functionIFvS8_EEEPNS2_13ProcessObjectEEUlPKlPKmE_NS_9allocatorISI_EEFvSF_SH_EEclEOSF_OSH_ + 62
3   ITK-SNAP                            0x000000010bf7c1be _ZNSt3__110__function6__funcIZN3itk17MultiThreaderBase22ParallelizeImageRegionILj2EEEvRKNS2_11ImageRegionIXT_EEENS_8functionIFvS8_EEEPNS2_13ProcessObjectEEUlPKlPKmE_NS_9allocatorISI_EEFvSF_SH_EEclEOSF_OSH_ + 62
4   ITK-SNAP                            0x000000010d6621b3 _ZN3itk17PoolMultiThreader22ParallelizeImageRegionEjPKlPKmNSt3__18functionIFvS2_S4_EEEPNS_13ProcessObjectE + 2387
4   ITK-SNAP                            0x000000010d6640b9 _ZNSt3__120__packaged_task_funcINS_6__bindIZN3itk17PoolMultiThreader22ParallelizeImageRegionEjPKlPKmNS_8functionIFvS5_S7_EEEPNS2_13ProcessObjectEE3$_5JEEENS_9allocatorISE_EEFPvvEEclEv + 73
4   ITK-SNAP                            0x000000010d6640b9 _ZNSt3__120__packaged_task_funcINS_6__bindIZN3itk17PoolMultiThreader22ParallelizeImageRegionEjPKlPKmNS_8functionIFvS5_S7_EEEPNS2_13ProcessObjectEE3$_5JEEENS_9allocatorISE_EEFPvvEEclEv + 73
5   ITK-SNAP                            0x000000010d663732 _ZNSt3__113packaged_taskIFPvvEEclEv + 82
5   ITK-SNAP                            0x000000010bf7bf29 _ZN3itk17MultiThreaderBase22ParallelizeImageRegionILj2EEEvRKNS_11ImageRegionIXT_EEENSt3__18functionIFvS5_EEEPNS_13ProcessObjectE + 233
5   ITK-SNAP                            0x000000010d663732 _ZNSt3__113packaged_taskIFPvvEEclEv + 82
6   ITK-SNAP                            0x000000010bf7731d _ZN3itk11ImageSourceINS_5ImageINS_9RGBAPixelIhEELj2EEEE12GenerateDataEv + 205
6   ITK-SNAP                            0x000000010d6650b1 _ZN3itk10ThreadPool13ThreadExecuteEv + 513
6   ITK-SNAP                            0x000000010d6650b1 _ZN3itk10ThreadPool13ThreadExecuteEv + 513
7   ITK-SNAP                            0x000000010d6658c8 _ZNSt3__1L14__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEPFvvEEEEEEPvSA_ + 40
7   ITK-SNAP                            0x000000010d637244 _ZN3itk13ProcessObject16UpdateOutputDataEPNS_10DataObjectE + 180
7   ITK-SNAP                            0x000000010d6658c8 _ZNSt3__1L14__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEPFvvEEEEEEPvSA_ + 40
8   libsystem_pthread.dylib             0x00007ff80db674e1 _pthread_start + 125
8   libsystem_pthread.dylib             0x00007ff80db674e1 _pthread_start + 125
9   libsystem_pthread.dylib             0x00007ff80db62f6b thread_start + 15
9   libsystem_pthread.dylib             0x00007ff80db62f6b thread_start + 15
**************************************************************************

QObject::killTimer: Timers cannot be stopped from another thread
QObject::~QObject: Timers cannot be stopped from another thread
8   ITK-SNAP                            0x000000010c146908 _ZN12ImageWrapperI32AnatomicScalarImageWrapperTraitsIfLb0EEE13MakeThumbnailEj + 1096
9   ITK-SNAP                            0x000000010c146ca8 _ZTv0_n768_N12ImageWrapperI32AnatomicScalarImageWrapperTraitsIfLb0EEE13MakeThumbnailEj + 24
HDF5: infinite loop closing library
      L,T_top,P,P,FD,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
10  ITK-SNAP                            0x000000010bf27256 _ZN15IRISApplication19UpdateIRISMainImageEP19GuidedNativeImageIOP8Registry + 774
11  ITK-SNAP                            0x000000010bf1943b _ZN21LoadMainImageDelegate26UpdateApplicationWithImageEP19GuidedNativeImageIO + 43
12  ITK-SNAP                            0x000000010bf2788a _ZN15IRISApplication20OpenImageViaDelegateEPKcP25AbstractOpenImageDelegateR15IRISWarningListP8RegistryP31ImageReadingProgressAccumulator + 666
13  ITK-SNAP                            0x000000010bf28e63 _ZN15IRISApplication9OpenImageEPKc9LayerRoleR15IRISWarningListP8RegistryS6_b + 275
14  ITK-SNAP                            0x000000010bb200e4 main + 3460
15  dyld                                0x000000011b4ae52e start + 462
*************************************
jilei-hao commented 8 months ago

There are 2 issues for this crash:

jilei-hao commented 8 months ago

Addressed by https://github.com/jilei-hao/itksnap/pull/182