[Insight-users] Fwd: Crash on simple application in Release

Luis Ibanez luis.ibanez at kitware.com
Mon May 24 12:13:26 EDT 2010


Hi Vincent,

John's suggestion was also my next guess...

Apart from that, there are not many ways of getting
a constructor to crash....

So, you have to start reducing this problem to a
minimal case.

Please do the following:

A) In your main() function, insert the following code
    *before* calling your function:

       typedef itk::ImageFileReader< TImage > ReaderType;
       ReaderType::Pointer reader = ReaderType::New();


      Let us know if the code crashes at that point.


B) There is something wrong about your initial report

    You said that the code crashes in:

         "itk::ImageFileReader constructor 80"

    but line 80 is not part of the constructor.

    instead it is part of the SetImageIO() method
    that apparently you are not  calling in your
    function.

    and .. whose absence makes useless the
    declaration of

     ImageIOType::Pointer AnalyzeImageIO = ImageIOType::New();


    You probably had at some point a line such as

       reader->SetImageIO( AnalyzeImageIO );

    What happened to this line ?



Thanks


     Luis


------------------------------------------------------
On Mon, May 24, 2010 at 12:02 PM, John Drescher <drescherjm at gmail.com> wrote:
> Hi John,
>
> I'm not mixing Debug and Release librairies. I take care of this because I
> had lots of strange behavior of applications in the past because of such
> unintentional mixes...
>
> V
> _____________________________________
> 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.html
>
> 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
>


More information about the Insight-users mailing list