Segfault when reading parallel image data
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Ran across this in PV 3.8.1 and 3.10.1, turned out to be a bug in VTK.
I originally converted a set of DICOM slices into a .pvti + 16*.vti dataset, using GDCM's VTK DICOM reader and the regular VTK parallel .vti writer class.
The resulting dataset can't be read back in as it causes a segfault. See the attached two scripts. The gen.py script generates a dataset (similar to the one originally causing the problem). The read.py script reads it back in, but segfaults:
paulm@v41-8:/projects/acta_scans/CT-dataset/dicom_3/dicom_3/pv$ ./read.py
Segmentation fault (core dumped)
paulm@v41-8:/projects/acta_scans/CT-dataset/dicom_3/dicom_3/pv$ gdb which python
core
(gdb) bt
#0 memcpy () at ../sysdeps/x86_64/memcpy.S:162
#1 0x00007f4292a3767b in vtkXMLPStructuredDataReader::CopySubExtent(int*, int*, long long*, int*, int*, long long*, int*, int*, vtkDataArray*, vtkDataArray*) ()
from /software/vtk/5.8.0/lib/vtk-5.8/libvtkIO.so.5.8
#2 0x00007f4292a37900 in vtkXMLPStructuredDataReader::CopyArrayForPoints(vtkDataArray*, vtkDataArray*) () from /software/vtk/5.8.0/lib/vtk-5.8/libvtkIO.so.5.8
#3 0x00007f4292a311d7 in vtkXMLPDataReader::ReadPieceData() () from /software/vtk/5.8.0/lib/vtk-5.8/libvtkIO.so.5.8
#4 0x00007f4292a3082b in vtkXMLPDataReader::ReadPieceData(int) () from /software/vtk/5.8.0/lib/vtk-5.8/libvtkIO.so.5.8
#5 0x00007f4292a38c4b in vtkXMLPStructuredDataReader::ReadXMLData() () from /software/vtk/5.8.0/lib/vtk-5.8/libvtkIO.so.5.8
#6 0x00007f4292a44a4d in vtkXMLReader::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () from /software/vtk/5.8.0/lib/vtk-5.8/libvtkIO.so.5.8
#7 0x00007f4292a4372d in vtkXMLReader::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () from /software/vtk/5.8.0/lib/vtk-5.8/libvtkIO.so.5.8
#8 0x00007f42934fe224 in vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*) () from /software/vtk/5.8.0/lib/vtk-5.8/libvtkFiltering.so.5.8
#9 (closed) 0x00007f42934f0f6c in vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () from /software/vtk/5.8.0/lib/vtk-5.8/libvtkFiltering.so.5.8
#10 0x00007f42934f401b in vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () from /software/vtk/5.8.0/lib/vtk-5.8/libvtkFiltering.so.5.8
#11 (closed) 0x00007f429367ac79 in vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () from /software/vtk/5.8.0/lib/vtk-5.8/libvtkFiltering.so.5.8
#12 0x00007f42934f3d5f in vtkDemandDrivenPipeline::UpdateData(int) () from /software/vtk/5.8.0/lib/vtk-5.8/libvtkFiltering.so.5.8
#13 0x00007f4293679e5b in vtkStreamingDemandDrivenPipeline::Update(int) () from /software/vtk/5.8.0/lib/vtk-5.8/libvtkFiltering.so.5.8
#14 0x00007f4293a21509 in PyvtkAlgorithm_Update(_object*, _object*) () from /software/vtk/5.8.0/lib/vtk-5.8/libvtkFilteringPythonD.so.5.8
#15 0x00000000004a7ba5 in PyEval_EvalFrameEx ()
#16 0x00000000004a95c1 in PyEval_EvalCodeEx ()
#17 0x00000000004a9692 in PyEval_EvalCode ()
#18 0x00000000004c98be in PyRun_FileExFlags ()
#19 0x00000000004c9ad4 in PyRun_SimpleFileExFlags ()
#20 0x000000000041a6bd in Py_Main ()
#21 0x00007f4295950c4d in __libc_start_main (main=, argc=, ubp_av=, init=, fini=,
rtld_fini=, stack_end=0x7fffeb8c8b88) at libc-start.c:228
#22 0x00000000004198d9 in _start ()