<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 debug and release config </span>(VS default).</div><div>What will you suggest me to do then? Should I turn off BUILD_SHARED_LIBS 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 <drescherjm@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Ryan Guan <ryan.guan@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> users itk <insight-users@itk.org> <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 <<a ymailto="mailto:ryan.guan@yahoo.com" href="mailto:ryan.guan@yahoo.com">ryan.guan@yahoo.com</a>> wrote:<br>> Hi All,<br>><br>> I attached a simple test code basically reading in an image, and I just<br>> realized that it will crash at ImageReader->Update() [actually at<br>> ITKProcessObject::GenerateOutputInformation() ] when I compile at release<br>> mode but was fine at Debug mode.<br>> I searched in the mailing list, and (thought) I have ruled out the cause of<br>> uninitialized variable or destructed smartpointer, so I came up with this<br>> test code and the problem is still there!<br>> I would appreciate if anyone can help to find what's the problem? Thanks a<br>> lot!<br>><br>> IDE: windows7 Visual Studio 2008<br>> ITK/Application: 3.20.0<br>><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>