<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML DIR=ltr><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"></HEAD><BODY><DIV><FONT face='Arial' color=#000000 size=2>Hi</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I am trying to run gdb on 
Examples/Registration/DeformableRegistration7, but gdb gets stuck quickly (even 
before reading any data). This happens even on data for which the program runs 
fine if I don't use gdb.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>My configuration:</FONT></DIV>
<DIV><FONT size=2>
<P>ITK 2.2 on a fairly recent cygwin installation&nbsp; (cygwin 1.5.18-1, gcc 
3.4.4-1, binutils 20050610-1, cmake 2.0.6-1,&nbsp;&nbsp;gdb 
6.3.50_2004-12-28-cvs; none of which have any updates available via cygwin's 
setup) running&nbsp; on top of XP sp2. I've used ccmake to do the configuration 
with selecting the Debug build-type.</P>
<P>&nbsp;</P>
<P>What I do is:</P>
<P>break main<BR>run<BR>next a few times</P>
<P>gdb/the program then hangs in the line</P>
<P>&nbsp;TransformType::Pointer&nbsp; transform = TransformType::New();</P>
<P>If I single step through that one I end up in KERNEL32!IsBadWritePtr (see 
reproducible debugging session below).</P>
<P>Ok, the program does seem to work fine, but this makes me feel uncomfortable, 
and I'd like to be able to use gdb. It could of course be a cygwin-gdb 
problem.</P>
<P>&nbsp;</P>
<P>Any suggestions?</P>
<P>&nbsp;</P>
<P>Kris <FONT size=2>Thielemans<BR>Hammersmith Imanet Ltd<BR>part of GE 
Healthcare<BR>London, UK</P></FONT>
<P>&nbsp;</P>
<P>PS: debugging session:</P>
<P>(gdb) r<BR><FONT size=2></FONT>Starting program: 
/home/kris/MyDocuments/devel/ITK/ITK-bin-debug/bin/DeformableRegistration7.exe 
largervox_atn_2.mha largervox_atn_1.mha largervox_atn_2_to_1.mha</P>
<P>Breakpoint 1, main (argc=4, argv=0x1332878)<BR>&nbsp;&nbsp;&nbsp; at 
/home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Examples/Registration/DeformableRegistration7.cxx:119<BR>119 
{<BR>(gdb) n 12<BR>195&nbsp;&nbsp; TransformType::Pointer&nbsp; transform = 
TransformType::New();<BR>(gdb) s 29<BR>itk::LightObject::operator new 
(n=272)<BR>&nbsp;&nbsp;&nbsp; at 
/home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Code/Common/itkLightObject.cxx:78<BR>78&nbsp;&nbsp; 
return new char[n];<BR>(gdb) backtrace<BR>#0&nbsp; itk::LightObject::operator 
new (n=272)<BR>&nbsp;&nbsp;&nbsp; at 
/home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Code/Common/itkLightObject.cxx:78<BR>#1&nbsp; 
0x00636fc9 in itk::BSplineDeformableTransform&lt;double, 3u, 3u&gt;::New 
()<BR>&nbsp;&nbsp;&nbsp; at 
/home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Code/Common/itkBSplineDeformableTransform.h:121<BR>#2&nbsp; 
0x00401391 in main (argc=4, argv=0x1332878)<BR>&nbsp;&nbsp;&nbsp; at 
/home/kris/MyDocuments/devel/ITK/InsightToolkit-2.2.0/Examples/Registration/DeformableRegistration7.cxx:195<BR>(gdb) 
s<BR>0x005bb3d6 in operator new[] ()<BR>&nbsp;&nbsp;&nbsp; at 
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/iostream:77<BR>77&nbsp;&nbsp; 
static ios_base::Init __ioinit;<BR>(gdb) <BR>0x6109dbe0 in pthread_getspecific 
() from /usr/bin/cygwin1.dll<BR>(gdb) <BR>Single stepping until exit from 
function pthread_getspecific, <BR>which has no line number 
information.<BR>0x6109d010 in cygwin1!__getreent () from 
/usr/bin/cygwin1.dll<BR>(gdb) <BR>Single stepping until exit from function 
cygwin1!__getreent, <BR>which has no line number information.<BR>0x610e0bb0 in 
cygwin1!_alloca () from /usr/bin/cygwin1.dll<BR>(gdb) <BR>Single stepping until 
exit from function cygwin1!_alloca, <BR>which has no line number 
information.<BR>0x7c809f29 in KERNEL32!IsBadWritePtr () from 
/c/WINDOWS/system32/kernel32.dll<BR>(gdb) <BR>Single stepping until exit from 
function KERNEL32!IsBadWritePtr, <BR></P>
<P>(It never gets out of here).</P></FONT></DIV></BODY></HTML>