[Insight-users] crash with release build - not because of uninitialized variable?

Ryan Guan ryan.guan at yahoo.com
Wed Dec 14 08:21:45 EST 2011


Hi John,
Thanks a lot for your reply!
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  (VS default).
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, :-)
Really appreciate!


________________________________
 From: John Drescher <drescherjm at gmail.com>
To: Ryan Guan <ryan.guan at yahoo.com> 
Cc: users itk <insight-users at itk.org> 
Sent: Wednesday, December 14, 2011 11:04 AM
Subject: Re: [Insight-users] crash with release build - not because of uninitialized variable?
 
On Tue, Dec 13, 2011 at 6:57 PM, Ryan Guan <ryan.guan at yahoo.com> wrote:
> Hi All,
>
> I attached a simple test code basically reading in an image, and I just
> realized that it will crash at ImageReader->Update() [actually at
>  ITKProcessObject::GenerateOutputInformation() ] when I compile at release
> mode but was fine at Debug mode.
> I searched in the mailing list, and (thought) I have ruled out the cause of
> uninitialized variable or destructed smartpointer, so I came up with this
> test code and the problem is still there!
> I would appreciate if anyone can help to find what's the problem? Thanks a
> lot!
>
> IDE: windows7 Visual Studio 2008
> ITK/Application: 3.20.0
>

Did you build ITK to create DLLs. If so and you installed ITK (using
the INSTALL target) that is the problem. I'll explain In Visual Studio
you can not safely mix a debug dll and a release executable or vice
versa.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20111214/124a10d1/attachment.htm>


More information about the Insight-users mailing list