[Insight-users] itkGradientMagnitudeRecursiveGaussianImageFilter with no input segfaults ITK

Charl P. Botha cpbotha at gmail.com
Sun Mar 5 17:31:00 EST 2006


Dear all,

On ITK 2-4-1 on both Linux x86 g++ 3.4.4 (Centos 4.2) and on Windows
XP with VS.NET 2003 build with the default wrappings, the following
Python code generates a segfault:

import InsightToolkit as itk
g = itk.itkGradientMagnitudeRecursiveGaussianImageFilterF3F3_New()
g.Update()

*BOOM*

Perhaps somebody forgot to check for input before starting processing?
 I don't have a CVS HEAD build at the moment to check if this has been
fixed.  Could anybody try to reproduce?  (any language will do, just
instantiate the filter and Update() without setting input)

Backtrace on Linux is as follows:

(gdb) bt
#0  0x06b8e4e1 in
itk::GradientMagnitudeRecursiveGaussianImageFilter<itk::Image<float,
3u>, itk::Image<float, 3u> >::GenerateInputRequestedRegion
(this=0x9c48688) at
/home/cpbotha/build/Insight/Code/Common/itkSmartPointer.h:71
#1  0x066a4c60 in itk::ProcessObject::PropagateRequestedRegion
(this=0x9c48688, output=0x9e1f0c8)
    at /home/cpbotha/build/Insight/Code/Common/itkProcessObject.cxx:741
#2  0x0666c9fa in itk::DataObject::PropagateRequestedRegion
(this=0x9e1f0c8) at
/home/cpbotha/build/Insight/Code/Common/itkWeakPointer.h:67
#3  0x0666bd54 in itk::DataObject::Update (this=0x9e1f0c8) at
/home/cpbotha/build/Insight/Code/Common/itkDataObject.cxx:343
#4  0x066a51e0 in itk::ProcessObject::Update (this=0x9c48688) at
/home/cpbotha/build/Insight/Code/Common/itkProcessObject.cxx:554
#5  0x06b6c1cc in
_wrap_itkGradientMagnitudeRecursiveGaussianImageFilterF3F3_Pointer_Update
(args=0xb7fd44ec)
    at /home/cpbotha/build/Insight/Code/Common/itkSmartPointer.h:71
#6  0x0095b8e1 in PyCFunction_Call () from /usr/lib/libpython2.3.so.1.0
#7  0x00938607 in PyObject_Call () from /usr/lib/libpython2.3.so.1.0
#8  0x0098d968 in _PyEval_SliceIndex () from /usr/lib/libpython2.3.so.1.0
#9  0x0099006e in PyEval_EvalCodeEx () from /usr/lib/libpython2.3.so.1.0


More information about the Insight-users mailing list