[Insight-users] [ITK Community] Crashing in debug mode

Luis Ibanez luis.ibanez at kitware.com
Sun Jan 5 13:37:12 EST 2014


Kent,

Thanks adding the two output images.

One of the main differences between Debug and Release builds,
is that in Debug mode, the compiler tends to initialize variables.

It may be the case here, that the code has an uninitialized variable,
and the compiler is setting it to zero in Debug mode, while leaving
it uninitialized in Release mode.


Just an idea....


    Luis



On Tue, Dec 31, 2013 at 3:04 PM, Kent Ogden <ogdenk at upstate.edu> wrote:

>  John,
>
> Thanks for that, it works now.  What I actually did was to leave my system
> path set to point to the release dll's, and put the debug dll's into the
> debug build directory for the project.  I have usually used static ITK/VTK
> builds so maybe that's why I haven't seen this before.
>
> Interestingly, the output of the Quickview demo is different for the debug
> and release versions.  I didn't use a command line argument so the
> CreateImage function gets called, attached are the outputs for the debug
> and release versions of the program.  Not sure why this happens, I would
> think the Allocate() function would initialize the pixel data the same way
> for debug and release.
>
> Kent
>
>
>
> >>> John Drescher <drescherjm at gmail.com> 12/31/2013 11:30 AM >>>
>
> On Tue, Dec 31, 2013 at 11:16 AM, Kent Ogden <ogdenk at upstate.edu> wrote:
> > Hi,
> >
> > I have downloaded the new ITK release and built it using VS 2012 on Win7
> 64
> > bit.  I have already downloaded and built VTK.  I build ITK and VTK with
> > Shared libraries on, and ITKVTKGlue enabled in ITK.  I also have TCL
> > wrapping turned on for VTK, but no wrapping in ITK.
> >
> > If I try something simple, such as the Quickview example, it will build
> and
> > run ok in release mode.  If I try running anything in debug mode, it will
> > crash at the first filter/reader Update() call with an access violation.
> >
> > Any thoughts on what I may be doing wrong?
> >
>
> Do not use the INSTALL target if you want to use debug and release
> configurations. Instead just build all. And when you configure your
> CMake generated project for your application set the ITK_DIR and
> VTK_DIR to be the root folder of the build tree. Since you built dlls
> you will have to copy these to your applications debug and release
> folder.
>
> John
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140105/27671d24/attachment.htm>


More information about the Insight-users mailing list