[Insight-developers] ITK Shared Libs on Mac

Nicolas Rannou nicolas.lists at gmail.com
Thu Aug 11 13:05:28 EDT 2011


Hi all,

I'm having hard time debugging issues related to ITK and Mac.

I can use my application on *STATIC* without any problem.
If I try to go to *SHARED* mode on *mac* (to generate installers) my
application is not working anymore: sometimes it crashes, sometimes it
works.
*SHARED* mode is working on *windows* and on *linux*!

When it crashes, it crashes at random locations.
Nevertheless, those locations are always itk-based objects.(See at the end
of the mail several bt to illustrate my sayings)
I tried my app with the ITK release branch (github) and with the ITK
official release tar (http://itk.org/ITK/resources/software.html)

Did somebody already experienced this issue?
Would somebody have any suggestion about how to fix/trac/debug this issue?
I assume the problem is related to ITK SmartPointers being erased whereas
they shouldn't?


Thanks a lot,
Nicolas
________________________________________________________________________
===============================================================
________________________________________________________________________
Application Specific Information:
objc[14057]: garbage collection is OFF
*** error for object 0x7fab9a95ea10: pointer being freed was not allocated
 ________________________________________________________________________
===============================================================
________________________________________________________________________

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018

VM Regions Near 0x18:
-->
    __TEXT                 000000010b0a7000-000000010b1f9000 [ 1352K]
r-x/rwx SM=COW  /Users/USER/*/gofigure.app/Contents/MacOS/gofigure

Application Specific Information:
objc[11040]: garbage collection is OFF

Thread 0:: Dispatch queue: com.apple.main-thread
0   libQGoGui.0.8.dylib           0x000000010b777654
itk::Index<3u>::operator[](unsigned int) + 20 (itkIndex.h:210)
1   libQGoGui.0.8.dylib           0x000000010b7831c5
itk::ImageLinearConstIteratorWithIndex<itk::Image<unsigned char, 3u>
>::operator++() + 49 (itkImageLinearConstIteratorWithIndex.h:196)
2   libQGoGui.0.8.dylib           0x000000010b5451e2
itk::LabelImageToLabelMapFilter<itk::Image<unsigned char, 3u>,
itk::LabelMap<itk::ShapeLabelObject<bool, 3u> >
>::ThreadedGenerateData(itk::ImageRegion<3u> const&, int) + 676
(itkLabelImageToLabelMapFilter.txx:104)
3   libQGoGui.0.8.dylib           0x000000010b4f30c1
itk::ImageSource<itk::LabelMap<itk::ShapeLabelObject<bool, 3u> >
>::ThreaderCallback(void*) + 243 (itkImageSource.txx:296)
4   libITKCommon.3.20.dylib       0x00000001123216b1
itk::MultiThreader::SingleMethodExecute() + 565
5   libQGoGui.0.8.dylib           0x000000010b541bd9
itk::ImageSource<itk::LabelMap<itk::ShapeLabelObject<bool, 3u> >
>::GenerateData() + 239 (itkImageSource.txx:244)
6   libITKCommon.3.20.dylib       0x000000011233c63a
itk::ProcessObject::UpdateOutputData(itk::DataObject*) + 628
7   libQGoGui.0.8.dylib           0x000000010b8072cc
itk::ImageBase<3u>::UpdateOutputData() + 124 (itkImageBase.txx:280)
8   libITKCommon.3.20.dylib       0x000000011233c476
itk::ProcessObject::UpdateOutputData(itk::DataObject*) + 176
9   libQGoGui.0.8.dylib           0x000000010b8072cc
itk::ImageBase<3u>::UpdateOutputData() + 124 (itkImageBase.txx:280)
10  libQGoGui.0.8.dylib           0x000000010b545c1b
itk::LabelImageToShapeLabelMapFilter<itk::Image<unsigned char, 3u>,
itk::LabelMap<itk::ShapeLabelObject<bool, 3u> > >::GenerateData() + 1049
(itkLabelImageToShapeLabelMapFilter.txx:88)

________________________________________________________________________
===============================================================
________________________________________________________________________

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018

VM Regions Near 0x18:
-->
    __TEXT                 000000010b92c000-000000010ba7e000 [ 1352K]
r-x/rwx SM=COW  /Users/USER/*/gofigure.app/Contents/MacOS/gofigure

Application Specific Information:
objc[11102]: garbage collection is OFF

Thread 0:: Dispatch queue: com.apple.main-thread
0   libQGoGui.0.8.dylib           0x000000010bd65e5d
itk::SmartPointer<itk::ShapeLabelObject<bool, 3u> >::operator->() const + 27
(itkSmartPointer.h:70)
1   libQGoGui.0.8.dylib           0x000000010bde422a
itk::ShapeLabelObject<bool, 3u>::New() + 186 (itkShapeLabelObject.h:54)
2   libQGoGui.0.8.dylib           0x000000010bde43c0
itk::LabelMap<itk::ShapeLabelObject<bool, 3u> >::SetLine(itk::Index<3u>
const&, unsigned long const&, bool const&) + 252 (itkLabelMap.txx:291)
3   libQGoGui.0.8.dylib           0x000000010bdc81cf
itk::LabelImageToLabelMapFilter<itk::Image<unsigned char, 3u>,
itk::LabelMap<itk::ShapeLabelObject<bool, 3u> >
>::ThreadedGenerateData(itk::ImageRegion<3u> const&, int) + 657
(itkLabelImageToLabelMapFilter.txx:120)
4   libQGoGui.0.8.dylib           0x000000010bd760c1
itk::ImageSource<itk::LabelMap<itk::ShapeLabelObject<bool, 3u> >
>::ThreaderCallback(void*) + 243 (itkImageSource.txx:296)
5   libITKCommon.3.20.dylib       0x0000000112bd06b1
itk::MultiThreader::SingleMethodExecute() + 565
6   libQGoGui.0.8.dylib           0x000000010bdc4bd9
itk::ImageSource<itk::LabelMap<itk::ShapeLabelObject<bool, 3u> >
>::GenerateData() + 239 (itkImageSource.txx:244)
7   libITKCommon.3.20.dylib       0x0000000112beb63a
itk::ProcessObject::UpdateOutputData(itk::DataObject*) + 628
8   libQGoGui.0.8.dylib           0x000000010c08a2cc
itk::ImageBase<3u>::UpdateOutputData() + 124 (itkImageBase.txx:280)
9   libITKCommon.3.20.dylib       0x0000000112beb476
itk::ProcessObject::UpdateOutputData(itk::DataObject*) + 176
10  libQGoGui.0.8.dylib           0x000000010c08a2cc
itk::ImageBase<3u>::UpdateOutputData() + 124 (itkImageBase.txx:280)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110811/8938d2a9/attachment.htm>


More information about the Insight-developers mailing list