[Insight-users] Fwd: Visual Studio 2008 crash in Release Mode

John Drescher drescherjm at gmail.com
Thu Jul 12 10:48:00 EDT 2012


---------- Forwarded message ----------
From: John Drescher <drescherjm at gmail.com>
Date: Thu, Jul 12, 2012 at 10:47 AM
Subject: Re: [Insight-users] Visual Studio 2008 crash in Release Mode
To: Mathieu Vadnais <mathieu.vadnais at zimmercas.com>


On Thu, Jul 12, 2012 at 10:44 AM, Mathieu Vadnais
<mathieu.vadnais at zimmercas.com> wrote:
> Hello,
>
>
>
> My name is Mathieu and I have come across an issue when using MetaImageIO
> with Visual Studio 2008 (ITK 4.1.0, 32 bits).
>
>
>
> The three lines below result in a crash in Release Mode. I compiled with the
> flag _SECURE_SCL=0 but it did not change anything.
>
>
>
> Here are the flags defined for the ITK version I compiled :
>
> /MD /O2 /Ob2 /D NDEBUG /D _SECURE_SCL=0 /D _CRT_SECURE_NO_WARNINGS /D
> _SCL_SECURE_NO_WARNINGS /D _HAS_ITERATOR_DEBUGGING=0
>
>
>
>
>
> typedef itk::Image<unsigned char, 3> ImageType;
>
> typedef itk::ImageFileWriter< ImageType > WriterType;
>
>
>
> itk::MetaImageIO::Pointer metaWriter = itk::MetaImageIO::New();
>
>
>
>
>
> I would like to know if there is a way to avoid that error or if it is a
> known issue/limitation of ITK ?
>
>

Is there any chance you are mixing debug and release dlls in your
application? Remember that in Visual Studio you can not safely mix
Debug and Release dlls in the same application.

John


-- 
John M. Drescher


More information about the Insight-users mailing list