[Insight-users] debugging problem

Luis Ibanez luis.ibanez at kitware.com
Wed Mar 4 16:44:16 EST 2009


Hi Wen,

Please add a try/catch block around the calls to "Update()"
methods. Then print out the exception message.


Something like:


     try
       {
       reader->Update();
       }
     catch( itk::ExceptionObject & excp )
       {
       std::cerr << excp << std::endl;
       }


Chances are that the problem is related to an incorrect
filename being passed to your reader.


You will find more about itk::Exceptions in the ITK Software Guide

     http://www.itk.org/ItkSoftwareGuide.pdf



   Regards,


       Luis


-------------
Wen Shi wrote:
> Hi All,
> 
> I just start with ITK.
> I build up the example code called myProject.cpp from "GettingStarted-I.pdf".
> I successfully build up the project via VS 2005 compiler using CMake.
> Then I successfully build all the three projects(BUILD-ALL, myProject..) in the solution.
> But when I tried to debug I got the following errors:
> 
> First-chance exception at 0x7c812a5b in myProject.exe: Microsoft C++ exception: itk::ImageFileReaderException at memory location 0x0133fbbc..
> Unhandled exception at 0x7c812a5b in myProject.exe: Microsoft C++ exception: itk::ImageFileReaderException at memory location 0x0133fbbc..
> First-chance exception at 0x7c812a5b in myProject.exe: Microsoft C++ exception: itk::ImageFileReaderException at memory location 0x0133f8d0..
> First-chance exception at 0x7c812a5b in myProject.exe: Microsoft C++ exception: itk::ImageFileReaderException at memory location 0x0133fb78..
> Unhandled exception at 0x7c812a5b in myProject.exe: Microsoft C++ exception: itk::ImageFileReaderException at memory location 0x0133fb78..
> First-chance exception at 0x00411de2 in myProject.exe: 0xC0000005: Access violation reading location 0x00000000.
> Unhandled exception at 0x00411de2 in myProject.exe: 0xC0000005: Access violation reading location 0x00000000.
> First-chance exception at 0x00411de2 in myProject.exe: 0xC0000005: Access violation reading location 0x00000000.
> Unhandled exception at 0x00411de2 in myProject.exe: 0xC0000005: Access violation reading location 0x00000000. 
> 
> It seems to me that those are not the ITK technology errors, BUt it's memory violation errors.
> Could someone give me some suggestions on this, Maybe I improperly initialized the ITK library.
> 
> Many Thanks.
> 
> Wen SHi  
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.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