View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007594ITKpublic2008-09-02 21:512010-10-21 12:31
ReporterYulia Arzhaeva 
Assigned ToIvan Macia 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionunable to reproduce 
PlatformOSOS Version
Product VersionITK-3-6 
Target VersionFixed in VersionITK-3-18 
Summary0007594: Crash when writing the output of an " In Place" filter with the InPlace feature ON. Happens with TIFF images.
DescriptionThe program in the attached file crashes when the input is a *.tif image. The program does a simple thresholding "in place". I found out that the crash has nothing to do with filtering but with writing an output image in a file. Although, it's not possible to catch it as an exception - the error happens because a null pointer is addressed within one of the functions called inside TIFFImageIO::Read().

I've done a bit of debugging and that is what I've found. In a pipeline,
that connects a reader with a filter with a writer, calling
writer->Update() causes an update of a reader, because, with
filter->InPlaceOn(), the filter input gets released. For tif images,
TIFFImageIO::Read() is called, which uses m_InternalImage that is
supposed to have a non-null pointer m_Image to an allocated piece of
memory. m_InternalImage is filled in TIFFImageIO::CanReadFile(), which
is not called the second time, as a part of writer->Update() procedure.
As a result, m_InternalImage->m_Image points to NULL, and causes the
runtime error when addressed in TIFFImageIO::Read(). If one includes
filter->GetOutput()->DisconnectPipeline() before calling
writer->Update(), no error occurs because no input image update occurs.
TagsNo tags attached.
Resolution Date
Sprint
Sprint Status
Attached Filescxx file icon itkInPlaceFilterTest.cxx [^] (2,153 bytes) 2008-09-02 21:51

 Relationships

  Notes
(0021051)
Ivan Macia (developer)
2010-06-16 18:09

I was unable to reproduce the behaviour with the provided example and latest CVS version (3.19). Checked in Win32 - VS2008 Express. TIFFImageIO::Read() is not called the second time.

 Issue History
Date Modified Username Field Change
2008-09-02 21:51 Yulia Arzhaeva New Issue
2008-09-02 21:51 Yulia Arzhaeva File Added: itkInPlaceFilterTest.cxx
2010-06-16 17:52 Ivan Macia Status new => assigned
2010-06-16 17:52 Ivan Macia Assigned To => Ivan Macia
2010-06-16 18:09 Ivan Macia Note Added: 0021051
2010-06-16 18:09 Ivan Macia Status assigned => resolved
2010-06-16 18:09 Ivan Macia Fixed in Version => ITK-3-18
2010-06-16 18:09 Ivan Macia Resolution open => unable to reproduce
2010-10-21 12:31 Gabe Hart Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team