[vtk-developers] [VTK 0011607]: Segfault with vtkXMLPImageDataReader

Mantis Bug Tracker mantis at public.kitware.com
Wed Dec 15 05:05:10 EST 2010


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=11607 
====================================================================== 
Reported By:                Paul Melis
Assigned To:                
====================================================================== 
Project:                    VTK
Issue ID:                   11607
Category:                   (No Category)
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2010-12-15 05:05 EST
Last Modified:              2010-12-15 05:05 EST
====================================================================== 
Summary:                    Segfault with vtkXMLPImageDataReader
Description: 
I converted a set of image slices in PNG format to a .pvti file + set of .vti
files, using a vtkPNGReader connected to a vtkXMLPImageDataWriter. I'm not sure
it's relevant for this bug to occur, but I used SetDataModeToAppended() and
EncodeAppendedDataOff() on the writer. The slices were 2000x2000 pixels each,
single channel 8-bit. In total 834 slices. 

Reading in this dataset in Paraview 3.8.1 I got a crash and managed to reduce it
to an issue in VTK 5.6.1 (VTK 5.4.2 seems to be immune). 




Steps to Reproduce: 
I attached a simplified dataset, which leaves out most of the piece files, but
should be enough to reproduce the crash.

paulm at sara0143:/scratch/paulm/coraltest/bug$ cat read.py 
#!/usr/bin/env python
import sys, vtk

dr = vtk.vtkXMLPImageDataReader()
dr.SetFileName(sys.argv[1])
dr.Update()

paulm at sara0143:/scratch/paulm/coraltest/bug$ ls -l dummy*
-rw-r--r-- 1 paulm Domain Users 212348 2010-12-14 16:36 dummy_387.vti
-rw-r--r-- 1 paulm Domain Users  58666 2010-12-14 16:35 dummy.pvti

paulm at sara0143:/scratch/paulm/coraltest/bug$ ./read.py dummy.pvti 
Segmentation fault (core dumped)

http://public.kitware.com/Bug/view.php?id=0  0xb75cfa55 in memcpy () from
/lib/tls/i686/cmov/libc.so.6
http://public.kitware.com/Bug/view.php?id=1  0xb621ed98 in
vtkXMLPStructuredDataReader::CopySubExtent (this=0x81c48d8, inExtent=0x81c4a28,
inDimensions=0x81c4a40, inIncrements=0x81c4a4c, outExtent=0x81c49b0,
outDimensions=0x81c49c8, outIncrements=0x81c49d4, subExtent=0x81c49f8,
subDimensions=0x81c4a10, 
    inArray=0x86c1d98, outArray=0x8388e50) at
/scratch/paulm/vtk-5.6.1/IO/vtkXMLPStructuredDataReader.cxx:413
http://public.kitware.com/Bug/view.php?id=2  0xb621ef4e in
vtkXMLPStructuredDataReader::CopyArrayForPoints (this=0x81c48d8,
inArray=0x86c1d98, outArray=0x8388e50) at
/scratch/paulm/vtk-5.6.1/IO/vtkXMLPStructuredDataReader.cxx:331
http://public.kitware.com/Bug/view.php?id=3  0xb6216b1b in
vtkXMLPDataReader::ReadPieceData (this=0x81c48d8) at
/scratch/paulm/vtk-5.6.1/IO/vtkXMLPDataReader.cxx:400
http://public.kitware.com/Bug/view.php?id=4  0xb621f094 in
vtkXMLPStructuredDataReader::ReadPieceData (this=0x81c48d8) at
/scratch/paulm/vtk-5.6.1/IO/vtkXMLPStructuredDataReader.cxx:315
http://public.kitware.com/Bug/view.php?id=5  0xb6215d09 in
vtkXMLPDataReader::ReadPieceData (this=0x81c48d8, index=387) at
/scratch/paulm/vtk-5.6.1/IO/vtkXMLPDataReader.cxx:376
http://public.kitware.com/Bug/view.php?id=6  0xb621ff9e in
vtkXMLPStructuredDataReader::ReadXMLData (this=0x81c48d8) at
/scratch/paulm/vtk-5.6.1/IO/vtkXMLPStructuredDataReader.cxx:156
http://public.kitware.com/Bug/view.php?id=7  0xb622f39c in
vtkXMLReader::RequestData (this=0x81c48d8, outputVector=0x837f3f0) at
/scratch/paulm/vtk-5.6.1/IO/vtkXMLReader.cxx:524
http://public.kitware.com/Bug/view.php?id=8  0xb622dc02 in
vtkXMLReader::ProcessRequest (this=0x81c48d8, request=0x83893a8,
inputVector=0x0, outputVector=0x837f3f0) at
/scratch/paulm/vtk-5.6.1/IO/vtkXMLReader.cxx:1201
http://public.kitware.com/Bug/view.php?id=9  0xb67a2ed0 in
vtkExecutive::CallAlgorithm (this=0x837f398, request=0x83893a8, direction=1,
inInfo=0x0, outInfo=0x837f3f0) at
/scratch/paulm/vtk-5.6.1/Filtering/vtkExecutive.cxx:747
http://public.kitware.com/Bug/view.php?id=10 0xb678bf22 in
vtkDemandDrivenPipeline::ExecuteData (this=0x837f398, request=0x83893a8,
inInfo=0x0, outInfo=0x837f3f0) at
/scratch/paulm/vtk-5.6.1/Filtering/vtkDemandDrivenPipeline.cxx:507
http://public.kitware.com/Bug/view.php?id=11 0xb67905df in
vtkDemandDrivenPipeline::ProcessRequest (this=0x837f398, request=0x83893a8,
inInfoVec=0x0, outInfoVec=0x837f3f0) at
/scratch/paulm/vtk-5.6.1/Filtering/vtkDemandDrivenPipeline.cxx:279
http://public.kitware.com/Bug/view.php?id=12 0xb6912220 in
vtkStreamingDemandDrivenPipeline::ProcessRequest (this=0x837f398,
request=0x83893a8, inInfoVec=0x0, outInfoVec=0x837f3f0) at
/scratch/paulm/vtk-5.6.1/Filtering/vtkStreamingDemandDrivenPipeline.cxx:202
http://public.kitware.com/Bug/view.php?id=13 0xb67900d6 in
vtkDemandDrivenPipeline::UpdateData (this=0x837f398, outputPort=0) at
/scratch/paulm/vtk-5.6.1/Filtering/vtkDemandDrivenPipeline.cxx:449
http://public.kitware.com/Bug/view.php?id=14 0xb6910c59 in
vtkStreamingDemandDrivenPipeline::Update (this=0x837f398, port=0) at
/scratch/paulm/vtk-5.6.1/Filtering/vtkStreamingDemandDrivenPipeline.cxx:246
http://public.kitware.com/Bug/view.php?id=15 0xb67a39e3 in vtkExecutive::Update
(this=0x837f398) at /scratch/paulm/vtk-5.6.1/Filtering/vtkExecutive.cxx:315
http://public.kitware.com/Bug/view.php?id=16 0xb678e4a5 in
vtkDemandDrivenPipeline::Update (this=0x837f398) at
/scratch/paulm/vtk-5.6.1/Filtering/vtkDemandDrivenPipeline.cxx:312
http://public.kitware.com/Bug/view.php?id=17 0xb69081c5 in
vtkStreamingDemandDrivenPipeline::Update (this=0x837f398) at
/scratch/paulm/vtk-5.6.1/Filtering/vtkStreamingDemandDrivenPipeline.cxx:226
http://public.kitware.com/Bug/view.php?id=18 0xb6710fd5 in vtkAlgorithm::Update
(this=0x81c48d8) at /scratch/paulm/vtk-5.6.1/Filtering/vtkAlgorithm.cxx:1167
http://public.kitware.com/Bug/view.php?id=19 0xb6ac3b78 in PyvtkAlgorithm_Update
(self=0xb751b800, args=0xb751b02c) at
/scratch/paulm/vtk-5.6.1-debug/Filtering/vtkAlgorithmPython.cxx:1372
http://public.kitware.com/Bug/view.php?id=20 0x080c9ab3 in PyEval_EvalFrameEx
(f=0x819050c, throwflag=0) at ../Python/ceval.c:3573
http://public.kitware.com/Bug/view.php?id=21 0x080cb1f7 in PyEval_EvalCodeEx
(co=0xb74e59f8, globals=0xb7534acc, locals=0xb7534acc, args=0x0, argcount=0,
kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2836
http://public.kitware.com/Bug/view.php?id=22 0x080cb347 in PyEval_EvalCode
(co=0xb74e59f8, globals=0xb7534acc, locals=0xb7534acc) at ../Python/ceval.c:494
http://public.kitware.com/Bug/view.php?id=23 0x080ea818 in PyRun_FileExFlags
(fp=0x816b008, filename=0xbfda1368 "./read.py", start=257, globals=0xb7534acc,
locals=0xb7534acc, closeit=1, flags=0xbfd9f778) at ../Python/pythonrun.c:1273
http://public.kitware.com/Bug/view.php?id=24 0x080eaab9 in
PyRun_SimpleFileExFlags (fp=0x816b008, filename=0xbfda1368 "./read.py",
closeit=1, flags=0xbfd9f778) at ../Python/pythonrun.c:879
http://public.kitware.com/Bug/view.php?id=25 0x08059335 in Py_Main (argc=2,
argv=0xbfd9f844) at ../Modules/main.c:523
http://public.kitware.com/Bug/view.php?id=26 0x080587f2 in main (argc=Cannot
access memory at address 0x44) at ../Modules/python.c:23




Additional Information: 
Relevant valgrind error:

==13663== Invalid write of size 1
==13663==    at 0x4024DB6: memcpy (mc_replace_strmem.c:482)
==13663==    by 0x5B3DD97: vtkXMLPStructuredDataReader::CopySubExtent(int*,
int*, int*, int*, int*, int*, int*, int*, vtkDataArray*, vtkDataArray*)
(vtkXMLPStructuredDataReader.cxx:413)
==13663==    by 0x5B3DF4D:
vtkXMLPStructuredDataReader::CopyArrayForPoints(vtkDataArray*, vtkDataArray*)
(vtkXMLPStructuredDataReader.cxx:331)
==13663==    by 0x5B35B1A: vtkXMLPDataReader::ReadPieceData()
(vtkXMLPDataReader.cxx:400)
==13663==    by 0x5B3E093: vtkXMLPStructuredDataReader::ReadPieceData()
(vtkXMLPStructuredDataReader.cxx:315)
==13663==    by 0x5B34D08: vtkXMLPDataReader::ReadPieceData(int)
(vtkXMLPDataReader.cxx:376)
==13663==    by 0x5B3EF9D: vtkXMLPStructuredDataReader::ReadXMLData()
(vtkXMLPStructuredDataReader.cxx:156)
==13663==    by 0x5B4E39B: vtkXMLReader::RequestData(vtkInformation*,
vtkInformationVector**, vtkInformationVector*) (vtkXMLReader.cxx:524)
==13663==    by 0x5B4CC01: vtkXMLReader::ProcessRequest(vtkInformation*,
vtkInformationVector**, vtkInformationVector*) (vtkXMLReader.cxx:1201)
==13663==    by 0x5251ECF: vtkExecutive::CallAlgorithm(vtkInformation*, int,
vtkInformationVector**, vtkInformationVector*) (vtkExecutive.cxx:747)
==13663==    by 0x523AF21: vtkDemandDrivenPipeline::ExecuteData(vtkInformation*,
vtkInformationVector**, vtkInformationVector*) (vtkDemandDrivenPipeline.cxx:507)
==13663==    by 0x523F5DE:
vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**,
vtkInformationVector*) (vtkDemandDrivenPipeline.cxx:279)
==13663==  Address 0x2996c1c7 is not stack'd, malloc'd or (recently) free'd

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-15 05:05 Paul Melis     New Issue                                    
2010-12-15 05:05 Paul Melis     File Added: files.tgz                        
======================================================================




More information about the vtk-developers mailing list