[Insight-users] Re: DeformableRegistration8.cxx std::bad_alloc

Ruben Schilling r.b.schilling at googlemail.com
Mon Apr 9 11:36:38 EDT 2007


Hi Luis,

I just came back to the registration issue. I ran  
DeformableRegistration8 from gdb by typing

gdb DeformableRegistration8

afterwards I ran the program from the gdb prompt with my inputfiles  
like this

 >> run fixedImage.tif movingImage.tif outputImage.tif

I don't know, if there is a way to get more details from gdb about  
the running program, but so far I got this from gdb:

[Thread debugging using libthread_db enabled]
[New Thread 47202034567056 (LWP 24727)]

Starting Registration
terminate called after throwing an instance of 'std::bad_alloc'
   what():  St9bad_alloc

Program received signal SIGABRT, Aborted.
[Switching to Thread 47202034567056 (LWP 24727)]
0x00002aee143e55ed in *__GI_raise (sig=24727) at ../nptl/sysdeps/unix/ 
sysv/linux/raise.c:67
67      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or  
directory.
         in ../nptl/sysdeps/unix/sysv/linux/raise.c






Hi Ruben,

Thanks for the detailed description of the problem you are facing.

There are many things that go on in the StartRegistration() method.
Actually, all of the registration process happens during that call.

We will need to track the problem by going inside the method and
locating the exact place where the exception is thrown.

Is it possible for you to run the program from a debugger ?

If you look at the implementation of the StartRegistration() method
in line 230 of:


        Insight/Code/Algorithms/itkImageRegistrationMethod.txx

You will see that the main actions in this methods are

    1) a call to Initialize()
    2) a call to StartOptimization()

If you can identify which one of these two method throw the
exception, we could help on further locating the source of the
problem.


    Please let us know what you find.



        Thanks


           Luis





More information about the Insight-users mailing list