Hi all,<div><br></div><div>I&#39;m having hard time debugging issues related to ITK and Mac.</div><div><br></div><div>I can use my application on <b>STATIC</b> without any problem.</div><div>If I try to go to <b>SHARED</b> mode on <b>mac</b> (to generate installers) my application is not working anymore: sometimes it crashes, sometimes it works.</div>


<div><b>SHARED</b> mode is working on <b>windows</b> and on <b>linux</b>!</div><div><br></div><div>When it crashes, it crashes at random locations.</div><div>Nevertheless, those locations are always itk-based objects.(See at the end of the mail several bt to illustrate my sayings)</div>



<div>I tried my app with the ITK release branch (github) and with the ITK official release tar (<a href="http://itk.org/ITK/resources/software.html" target="_blank">http://itk.org/ITK/resources/software.html</a>)</div>
<div><br></div><div>Did somebody already experienced this issue?</div><div>Would somebody have any suggestion about how to fix/trac/debug this issue?</div><div>I assume the problem is related to ITK SmartPointers being erased whereas they shouldn&#39;t?</div>



<div><div><br></div></div><div><br></div><div>Thanks a lot,</div><div>Nicolas</div><div><div><div>________________________________________________________________________</div><div>===============================================================</div>


<div>________________________________________________________________________</div></div><div><div><div>Application Specific Information:</div><div>objc[14057]: garbage collection is OFF</div><div>*** error for object 0x7fab9a95ea10: pointer being freed was not allocated</div>


</div></div></div>
<div>________________________________________________________________________</div><div>===============================================================</div><div>________________________________________________________________________</div>




<div><br></div><div><div>Exception Type:  EXC_BAD_ACCESS (SIGSEGV)</div><div>Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018</div><div><br></div><div>VM Regions Near 0x18:</div><div>--&gt; </div><div>    __TEXT                 000000010b0a7000-000000010b1f9000 [ 1352K] r-x/rwx SM=COW  /Users/USER/*/gofigure.app/Contents/MacOS/gofigure</div>




<div><br></div><div>Application Specific Information:</div><div>objc[11040]: garbage collection is OFF</div><div><br></div><div>Thread 0:: Dispatch queue: com.apple.main-thread</div><div>0   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010b777654 itk::Index&lt;3u&gt;::operator[](unsigned int) + 20 (itkIndex.h:210)</div>




<div>1   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010b7831c5 itk::ImageLinearConstIteratorWithIndex&lt;itk::Image&lt;unsigned char, 3u&gt; &gt;::operator++() + 49 (itkImageLinearConstIteratorWithIndex.h:196)</div>




<div>2   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010b5451e2 itk::LabelImageToLabelMapFilter&lt;itk::Image&lt;unsigned char, 3u&gt;, itk::LabelMap&lt;itk::ShapeLabelObject&lt;bool, 3u&gt; &gt; &gt;::ThreadedGenerateData(itk::ImageRegion&lt;3u&gt; const&amp;, int) + 676 (itkLabelImageToLabelMapFilter.txx:104)</div>




<div>3   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010b4f30c1 itk::ImageSource&lt;itk::LabelMap&lt;itk::ShapeLabelObject&lt;bool, 3u&gt; &gt; &gt;::ThreaderCallback(void*) + 243 (itkImageSource.txx:296)</div>




<div>4   libITKCommon.3.20.dylib       <span style="white-space:pre-wrap">        </span>0x00000001123216b1 itk::MultiThreader::SingleMethodExecute() + 565</div><div>5   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010b541bd9 itk::ImageSource&lt;itk::LabelMap&lt;itk::ShapeLabelObject&lt;bool, 3u&gt; &gt; &gt;::GenerateData() + 239 (itkImageSource.txx:244)</div>




<div>6   libITKCommon.3.20.dylib       <span style="white-space:pre-wrap">        </span>0x000000011233c63a itk::ProcessObject::UpdateOutputData(itk::DataObject*) + 628</div><div>7   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010b8072cc itk::ImageBase&lt;3u&gt;::UpdateOutputData() + 124 (itkImageBase.txx:280)</div>




<div>8   libITKCommon.3.20.dylib       <span style="white-space:pre-wrap">        </span>0x000000011233c476 itk::ProcessObject::UpdateOutputData(itk::DataObject*) + 176</div><div>9   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010b8072cc itk::ImageBase&lt;3u&gt;::UpdateOutputData() + 124 (itkImageBase.txx:280)</div>




<div>10  libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010b545c1b itk::LabelImageToShapeLabelMapFilter&lt;itk::Image&lt;unsigned char, 3u&gt;, itk::LabelMap&lt;itk::ShapeLabelObject&lt;bool, 3u&gt; &gt; &gt;::GenerateData() + 1049 (itkLabelImageToShapeLabelMapFilter.txx:88)</div>




</div><div><br></div><div><div>________________________________________________________________________</div><div>===============================================================</div><div>________________________________________________________________________</div>




</div><div><br></div><div><div>Exception Type:  EXC_BAD_ACCESS (SIGSEGV)</div><div>Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018</div><div><br></div><div>VM Regions Near 0x18:</div><div>--&gt; </div><div>    __TEXT                 000000010b92c000-000000010ba7e000 [ 1352K] r-x/rwx SM=COW  /Users/USER/*/gofigure.app/Contents/MacOS/gofigure</div>




<div><br></div><div>Application Specific Information:</div><div>objc[11102]: garbage collection is OFF</div><div><br></div><div>Thread 0:: Dispatch queue: com.apple.main-thread</div><div>0   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010bd65e5d itk::SmartPointer&lt;itk::ShapeLabelObject&lt;bool, 3u&gt; &gt;::operator-&gt;() const + 27 (itkSmartPointer.h:70)</div>




<div>1   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010bde422a itk::ShapeLabelObject&lt;bool, 3u&gt;::New() + 186 (itkShapeLabelObject.h:54)</div><div>2   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010bde43c0 itk::LabelMap&lt;itk::ShapeLabelObject&lt;bool, 3u&gt; &gt;::SetLine(itk::Index&lt;3u&gt; const&amp;, unsigned long const&amp;, bool const&amp;) + 252 (itkLabelMap.txx:291)</div>




<div>3   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010bdc81cf itk::LabelImageToLabelMapFilter&lt;itk::Image&lt;unsigned char, 3u&gt;, itk::LabelMap&lt;itk::ShapeLabelObject&lt;bool, 3u&gt; &gt; &gt;::ThreadedGenerateData(itk::ImageRegion&lt;3u&gt; const&amp;, int) + 657 (itkLabelImageToLabelMapFilter.txx:120)</div>




<div>4   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010bd760c1 itk::ImageSource&lt;itk::LabelMap&lt;itk::ShapeLabelObject&lt;bool, 3u&gt; &gt; &gt;::ThreaderCallback(void*) + 243 (itkImageSource.txx:296)</div>




<div>5   libITKCommon.3.20.dylib       <span style="white-space:pre-wrap">        </span>0x0000000112bd06b1 itk::MultiThreader::SingleMethodExecute() + 565</div><div>6   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010bdc4bd9 itk::ImageSource&lt;itk::LabelMap&lt;itk::ShapeLabelObject&lt;bool, 3u&gt; &gt; &gt;::GenerateData() + 239 (itkImageSource.txx:244)</div>




<div>7   libITKCommon.3.20.dylib       <span style="white-space:pre-wrap">        </span>0x0000000112beb63a itk::ProcessObject::UpdateOutputData(itk::DataObject*) + 628</div><div>8   libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010c08a2cc itk::ImageBase&lt;3u&gt;::UpdateOutputData() + 124 (itkImageBase.txx:280)</div>




<div>9   libITKCommon.3.20.dylib       <span style="white-space:pre-wrap">        </span>0x0000000112beb476 itk::ProcessObject::UpdateOutputData(itk::DataObject*) + 176</div><div>10  libQGoGui.0.8.dylib           <span style="white-space:pre-wrap">        </span>0x000000010c08a2cc itk::ImageBase&lt;3u&gt;::UpdateOutputData() + 124 (itkImageBase.txx:280)</div>




</div><div><br></div>