<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hi John,</span></div><div><span>Thanks a lot for your reply!</span></div><div><span>I did have BUILD_SHARED_LIBS on and there are ItkCommon.dll at both Debug and Release directory. but I don't recall that I 'installed' ITK (how to do this anyway?), I just built ITK with &nbsp;debug and release config &nbsp;</span>(VS default).</div><div>What will you suggest me to do then? Should I turn off&nbsp;BUILD_SHARED_LIBS&nbsp;and rebuild ITK to try it out? It will take hours so I thought I'd better make sure that's gonna help before I do it, :-)</div><div>Really appreciate!</div><div><br></div>  <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <font size="2" face="Arial"> <hr size="1">  <b><span
 style="font-weight:bold;">From:</span></b> John Drescher &lt;drescherjm@gmail.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> Ryan Guan &lt;ryan.guan@yahoo.com&gt; <br><b><span style="font-weight: bold;">Cc:</span></b> users itk &lt;insight-users@itk.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, December 14, 2011 11:04 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Insight-users] crash with release build - not because of uninitialized variable?<br> </font> <br>
On Tue, Dec 13, 2011 at 6:57 PM, Ryan Guan &lt;<a ymailto="mailto:ryan.guan@yahoo.com" href="mailto:ryan.guan@yahoo.com">ryan.guan@yahoo.com</a>&gt; wrote:<br>&gt; Hi All,<br>&gt;<br>&gt; I attached a simple test code basically reading in an image, and I just<br>&gt; realized that it will crash at ImageReader-&gt;Update() [actually at<br>&gt; &nbsp;ITKProcessObject::GenerateOutputInformation() ] when I compile at release<br>&gt; mode but was fine at Debug mode.<br>&gt; I searched in the mailing list, and (thought) I have ruled out the cause of<br>&gt; uninitialized variable or destructed smartpointer, so I came up with this<br>&gt; test code and the problem is still there!<br>&gt; I would appreciate if anyone can help to find what's the problem? Thanks a<br>&gt; lot!<br>&gt;<br>&gt; IDE: windows7 Visual Studio 2008<br>&gt; ITK/Application: 3.20.0<br>&gt;<br><br>Did you build ITK to create DLLs. If so and you installed ITK (using<br>the INSTALL target)
 that is the problem. I'll explain In Visual Studio<br>you can not safely mix a debug dll and a release executable or vice<br>versa.<br><br>John<br><br><br> </div> </div>  </div></body></html>