[Insight-users] ImageRegistrationMethod and possible threads problem,

Luis Ibanez luis . ibanez at kitware . com
Mon, 05 Aug 2002 15:51:24 -0400


Hi Ruben,

Could you please post more details
about the test you are running ?

 From the error message that you posted,
it seems that there is not a "Segmentation Fault"
but a call to "abort()". This looks pretty much
like an uncaught exception. (since the callstack
in your message starts with a throw...)

The StartRegistration() method test if all
the components of the registration problem
are configured correctly. When inconsistencies
are found, this method throws exceptions.

It may be useful to put your invocation of
StartRegistration() in a try/catch block and
to print the message returned by the eventual
exception.

Something like:

try
   {
   myRegistrationClass->StartRegistration();
   }
catch( itk::ExceptionObject & except )
   {
   std::cerr << except << std::endl;
   }


If it happens to be an exception, the message
printed should be clear enough to figure out
the source of the problem.

Please let us know what you find,

Thanks


Luis

==========================================




Ruben Cardenes wrote:
> Hi all,
> 
> I was doing some experiments with the itk::ImageRegistrationMethod, but
> after compiling I'm not able to execute it. There is always a
> segmentation fault during the "StartRegistration" method. 
> I'm using Solaris 8, ang gcc 2.95.3. 
> 
> It seems to be a problem with the libthread.so library.
> I compiled ITK from the CVS just a month ago, with pthread support, do I
> have to recompile ITK? 
> 
> This is the gdb output:
> 
> Program received signal SIGABRT, Aborted.
> 0xfed69b0c in __sigprocmask () from /usr/lib/libthread.so.1
> (gdb) bt
> #0  0xfed69b0c in __sigprocmask () from /usr/lib/libthread.so.1
> #1  0xfed5e544 in _resetsig () from /usr/lib/libthread.so.1
> #2  0xfed5dc34 in _sigon () from /usr/lib/libthread.so.1
> #3  0xfed60da8 in _thrp_kill () from /usr/lib/libthread.so.1
> #4  0xfeccae68 in raise () from /usr/lib/libc.so.1
> #5  0xfecb5644 in abort () from /usr/lib/libc.so.1
> #6  0xfedc22d4 in __default_terminate ()
>    from /usr/local/lib/libstdc++.so.2.10.0
> #7  0xfedc2304 in __terminate () from /usr/local/lib/libstdc++.so.2.10.0
> #8  0xfedc2e1c in throw_helper (eh=0x96f88, pc=0x26117,
> my_udata=0xffbeee20, 
>     offset_p=0xffbeee1c) from /usr/local/lib/libstdc++.so.2.10.0
> #9  0xfedc3024 in __throw () from /usr/local/lib/libstdc++.so.2.10.0
> #10 0x27a9c in main (argc=635768, argv=0xffbef15c) at
> registration.cxx:93
> 
> 
>