View Issue Details

IDProjectCategoryView StatusLast Update
0002632Slicer4Module Editorpublic2014-03-06 05:55
Reporterpieper Assigned Tomillerjv  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.2.0Fixed in VersionSlicer 4.4.0 
Summary0002632: crash in growcut with unsigned char volume
Description

It seems that this template instantiation overwrites the output buffer:

vtkITK.dll!vtkITKImageGrowCutExecute3D<unsigned char,short>

Steps To Reproduce

Load an input volume of unsigned char (for example, load a set of bmp files and convert them to scalar volumes using the Vector To Scalar Volume module).

Then go into the editor and run growcut to get the crash.

Note that if you first make an unsigned short volume (e.g. using the Cast module) then the same data works in growcut.

Additional Information

Interesting - thanks for passing on the data Yasin. I can replicate
this issue and get the stack trace below.

Jim, it fails here:

memcpy(output, outputImage->GetBufferPointer(),
outputImage->GetBufferedRegion().GetNumberOfPixels()*sizeof(OT) );

Do you think there's an issue with the volume having only 10 slices?
Maybe the auto-ROI estimate is not correctly clipped to the size of
the volume?

-Steve

    msvcr90d.dll!memcpy(unsigned char * dst=0x000007fedf8de390, unsigned

char * src=0x00000000109fbae8, unsigned long count=0) Line 230 Asm

  vtkITK.dll!vtkITKImageGrowCutExecute3D&lt;unsigned char,short>(vtkImageData * inData=0x0000000015cdfd50, unsigned char * inPtr1=0x000000001a3b0070, short * inPtr2=0x000000001b780070, short * inPtr3=0x0000000013a90070, short * output=0x00000000188f0070, double & ObjectSize=17.000000000000000, double & ContrastNoiseRatio=0.80000000000000004, double & PriorSegmentStrength=0.0030000000000000001, itk::SmartPointer&lt;itk::CStyleCommand> * progressCommand=0x0000000000b18b58)  Line 362 + 0x63 bytes      C++

vtkITK.dll!ExecuteGrowCut<unsigned
char>(vtkITKGrowCutSegmentationImageFilter self=0x0000000015f5ca80,
vtkImageData
input1=0x0000000015cdfd50, vtkImageData
input2=0x000000001638a280, vtkImageData
input3=0x0000000019b2f790,
vtkImageData outData=0x00000000160c74a0, unsigned char
__formal=0x0000000000000000) Line 557 C++
vtkITK.dll!vtkITKGrowCutSegmentationImageFilter::ExecuteData(vtkDataObject

  • outData=0x00000000160c74a0) Line 647 C++
    vtkFiltering.dll!vtkSource::ProcessRequest(vtkInformation
    request=0x00000000197dcd60, vtkInformationVector

    inputVector=0x000000001966ed20, vtkInformationVector

    outputVector=0x00000000197d1fe0) Line 670 C++
    vtkFiltering.dll!vtkExecutive::CallAlgorithm(vtkInformation
    request=0x00000000197dcd60, int direction=1, vtkInformationVector

    inInfo=0x000000001966ed20, vtkInformationVector

    outInfo=0x00000000197d1fe0) Line 747 + 0x39 bytes C++
    vtkFiltering.dll!vtkDemandDrivenPipeline::ExecuteData(vtkInformation
  • request=0x00000000197dcd60, vtkInformationVector
    inInfo=0x000000001966ed20, vtkInformationVector *
    outInfo=0x00000000197d1fe0) Line 507 + 0x2e bytes C++
    vtkFiltering.dll!vtkDemandDrivenPipeline::ProcessRequest(vtkInformation
  • request=0x00000000197dcd60, vtkInformationVector
    inInfoVec=0x000000001966ed20, vtkInformationVector *
    outInfoVec=0x00000000197d1fe0) Line 279 + 0x22 bytes C++
    vtkFiltering.dll!vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation
  • request=0x00000000197dcd60, vtkInformationVector
    inInfoVec=0x000000001966ed20, vtkInformationVector
    outInfoVec=0x00000000197d1fe0) Line 276 + 0x25 bytes C++
    vtkFiltering.dll!vtkDemandDrivenPipeline::UpdateData(int
    outputPort=0) Line 450 C++
    vtkFiltering.dll!vtkStreamingDemandDrivenPipeline::Update(int
    port=0) Line 326 + 0x1e bytes C++
    vtkFiltering.dll!vtkSource::Update() Line 137 C++
    vtkFilteringPythonD.dll!PyvtkSource_Update(_object

    self=0x00000000109fbae8, _object args=0x0000000003918048) Line
    131 C++
    python26.dll!PyCFunction_Call(_object
    func=0x0000000000000000,
    _object arg=0x0000000003917f30, _object kw=0x0000000010a08e08)
    Line 81 + 0x8 bytes C
    python26.dll!call_function(_object
    pp_stack=0x0000000000000001, int oparg=131) Line 3750 + 0xaf bytes C
    python26.dll!PyEval_EvalFrameEx(_frame
    f=0x0000000010902a98, int
    throwflag=277883544) Line 2416 C
    python26.dll!fast_function(_object func=0x0000000000000001,
    _object
    pp_stack=0x0000000010a038d0, int n=116620200, int
    na=504067066, int nk=0) Line 3837 C
    python26.dll!call_function(_object
    pp_stack=0x0000000000000001, int oparg=131) Line 3771 + 0x16 bytes C
    python26.dll!PyEval_EvalFrameEx(_frame
    f=0x0000000010a50ac8, int
    throwflag=0) Line 2416 C
    python26.dll!PyEval_EvalCodeEx(PyCodeObject co=0x0000000000000000,
    _object
    globals=0x0000000000000001, _object
    locals=0x0000000000000000, _object
    args=0x0000000000000000, int
    argcount=1, _object
    * kws=0x0000000000000000, int kwcount=0, _object
    • defs=0x0000000000000000, int defcount=0, _object
      closure=0x0000000000000000) Line 3000 + 0xf bytes C
      python26.dll!function_call(_object
      func=0x0000000000000060,
      _object arg=0x00000000109eebe0, _object kw=0x0000000000b1a030)
      Line 529 + 0x3c bytes C
      python26.dll!PyObject_Call(_object func=0x00000000109eebe0,
      _object
      arg=0x0000000006f37978, _object kw=0x0000000000000000)
      Line 2493 C
      python26.dll!instancemethod_call(_object
      func=0x0000000010a05168,
      _object arg=0x0000000003918048, _object kw=0x0000000000000000)
      Line 2580 C
      python26.dll!PyObject_Call(_object func=0x0000000003918048,
      _object
      arg=0x0000000000b1a9d8, _object kw=0x0000000010a05168)
      Line 2493 C
      python26.dll!PyEval_CallObjectWithKeywords(_object

      func=0x0000000004652d10, _object arg=0x0000000000000001, _object
      kw=0x0000000000000001) Line 3620 C
      PythonQt.dll!PythonQtSignalTarget::call(_object
      callable=0x0000000010a05168, const PythonQtMethodInfo

      methodInfos=0x0000000004652d10, void arguments=0x0000000000b19eb0,
      bool skipFirstArgumentOfMethodInfo=false) Line 124 + 0x13 bytes C++
      PythonQt.dll!PythonQtSignalTarget::call(void
      arguments=0x0000000000b19eb0) Line 55 + 0x2e bytes C++
      PythonQt.dll!PythonQtSignalReceiver::qt_metacall(QMetaObject::Call
      c=InvokeMetaMethod, int id=4, void arguments=0x0000000000b19eb0)
      Line 261 C++
      QtCored4.dll!QMetaObject::metacall(QObject
      object=0x00000000195f5d00, QMetaObject::Call cl=InvokeMetaMethod, int
      idx=4, void
      argv=0x0000000000b19eb0) Line 238 C++
      QtCored4.dll!QMetaObject::activate(QObject

      sender=0x00000000195e0830, const QMetaObject m=0x0000000065dddf58,
      int local_signal_index=2, void
      * argv=0x0000000000b19eb0) Line 3278
  • 0x49 bytes C++
    QtGuid4.dll!QAbstractButton::clicked(bool _t1=false) Line 205 C++
    QtGuid4.dll!QAbstractButtonPrivate::emitClicked() Line 548 C++
    QtGuid4.dll!QAbstractButtonPrivate::click() Line 539 + 0xa bytes C++
    QtGuid4.dll!QAbstractButton::mouseReleaseEvent(QMouseEvent *
    e=0x0000000000b1b088) Line 1122 C++
    PythonQt.dll!PythonQtShell_QPushButton::mouseReleaseEvent(QMouseEvent
  • e=0x0000000000b1b088) Line 6236 C++
    QtGuid4.dll!QWidget::event(QEvent event=0x0000000000b1b088) Line 8260 C++
    QtGuid4.dll!QAbstractButton::event(QEvent
    e=0x0000000000b1b088)
    Line 1081 C++
    QtGuid4.dll!QPushButton::event(QEvent e=0x0000000000b1b088) Line 684 C++
    PythonQt.dll!PythonQtShell_QPushButton::event(QEvent

    e=0x0000000000b1b088) Line 5864 C++
    QtGuid4.dll!QApplicationPrivate::notify_helper(QObject
    receiver=0x00000000195e0830, QEvent
    e=0x0000000000b1b088) Line 4462
  • 0x15 bytes C++
    QtGuid4.dll!QApplication::notify(QObject
    receiver=0x00000000195e0830, QEvent
    e=0x0000000000b1b088) Line 4023
  • 0x51 bytes C++
    QtCored4.dll!QCoreApplication::notifyInternal(QObject
    receiver=0x00000000195e0830, QEvent
    event=0x0000000000b1b088) Line
    731 + 0x26 bytes C++
    QtCored4.dll!QCoreApplication::sendSpontaneousEvent(QObject
    receiver=0x00000000195e0830, QEvent
    event=0x0000000000b1b088) Line
    218 + 0x4c bytes C++
    QtGuid4.dll!QApplicationPrivate::sendMouseEvent(QWidget
    receiver=0x00000000195e0830, QMouseEvent
    event=0x0000000000b1b088,
    QWidget alienWidget=0x00000000195e0830, QWidget
    nativeWidget=0x000000000eb06940, QWidget
    buttonDown=0x00000000660ea560, QPointer<QWidget> &
    lastMouseReceiver={...}, bool spontaneous=true) Line 3120 + 0x16
    bytes C++
    QtGuid4.dll!QETWidget::translateMouseEvent(const tagMSG & msg={...})
    Line 3321 + 0x3f bytes C++
    QtGuid4.dll!QtWndProc(HWND * hwnd=0x000000000002081a, unsigned int
    message=514, unsigned
    int64 wParam=0, __int64 lParam=36962690) Line
    1659 + 0x15 bytes C++
    user32.dll!0000000076d79bd1()
    [Frames below may be incorrect and/or missing, no symbols loaded for
    user32.dll]
    user32.dll!0000000076d798da()
    QtCored4.dll!QEventDispatcherWin32::processEvents(QFlags<enum
    QEventLoop::ProcessEventsFlag> flags=0x0000000000b1f330) Line
    813 C++
    QtGuid4.dll!QGuiEventDispatcherWin32::processEvents(QFlags<enum
    QEventLoop::ProcessEventsFlag>
    flags=0x0000000000b1f37c) Line 1170
  • 0x27 bytes C++
    QtCored4.dll!QEventLoop::processEvents(QFlags<enum
    QEventLoop::ProcessEventsFlag> flags=0x0000000000b1f3e8) Line
    150 C++
    QtCored4.dll!QEventLoop::exec(QFlags<enum
    QEventLoop::ProcessEventsFlag>
    flags=0x0000000000b1f470) Line 201 +
    0x53 bytes C++
    QtCored4.dll!QCoreApplication::exec() Line 1008 + 0x23 bytes C++
    QtGuid4.dll!QApplication::exec() Line 3737 C++
    SlicerApp-real.exe!`anonymous namespace'::SlicerAppMain(int argc=1,
    char argv=0x000000000452e560) Line 292 + 0x6 bytes C++
    SlicerApp-real.exe!WinMain(HINSTANCE *
    hInstance=0x000000013f110000, HINSTANCE

    hPrevInstance=0x0000000000000000, char
    lpCmdLine=0x0000000000d16a78,
    int nShowCmd=1) Line 311 + 0xe bytes C++
    SlicerApp-real.exe!__tmainCRTStartup() Line 574 + 0x42 bytes C
    SlicerApp-real.exe!WinMainCRTStartup() Line 399 C
    kernel32.dll!000000007712652d()
    ntdll.dll!000000007746c521()
TagsNo tags attached.

Activities

2012-10-10 06:01

 

OCT.zip (225,130 bytes)
pieper

pieper

2012-10-10 06:02

administrator   ~0006488

The attached data can be used to replicate the issue.

millerjv

millerjv

2012-10-12 13:12

developer   ~0006519

Fixed in r21170

The intensity image is assigned to the first input on the vtkITKGrowCutImageFilter which forces the output segmentation image to have the same pixel type. But the output segmentation is assumed at the ITK level to be same pixel type as the gesture image.

Overrode ExecuteInformation() so information from the second input is propagated to the output image, so the gesture image and output segmentation image have the same pixel type

jcfr

jcfr

2014-03-06 05:08

administrator   ~0010980

Closing resolved issues that have not been updated in more than 3 months

Issue History

Date Modified Username Field Change
2012-10-10 05:57 pieper New Issue
2012-10-10 05:57 pieper Status new => assigned
2012-10-10 05:57 pieper Assigned To => millerjv
2012-10-10 06:01 pieper File Added: OCT.zip
2012-10-10 06:02 pieper Note Added: 0006488
2012-10-12 13:12 millerjv Note Added: 0006519
2012-10-12 13:12 millerjv Status assigned => resolved
2012-10-12 13:12 millerjv Resolution open => fixed
2014-03-06 05:08 jcfr Note Added: 0010980
2014-03-06 05:10 jcfr Status resolved => closed
2014-03-06 05:55 jcfr Fixed in Version => Slicer 4.4.0