MantisBT - VTK | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0012753 | VTK | (No Category) | public | 2011-11-29 04:41 | 2015-01-09 13:43 | |||||
Reporter | Paul Melis | |||||||||
Assigned To | Utkarsh Ayachit | |||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | |||||
Status | closed | Resolution | fixed | |||||||
Platform | OS | OS Version | ||||||||
Product Version | 5.8.0 | |||||||||
Target Version | Fixed in Version | 6.2.0 | ||||||||
Project | TBD | |||||||||
Type | crash | |||||||||
Summary | 0012753: Segfault when reading .vti file written by VTK itself | |||||||||
Description | The attached Python script creates an vtkImageData of 2000x2000x834 uint8 scalar values. It saves this to a .vti file using vtkXMLImageDataWriter. When trying to read it back in with vtkXMLImageDataReader the reader segfaults. Found on an actual DICOM dataset that I wanted to store as a .vti. This is with VTK 5.8.0 on an Ubuntu 10.04.3 x86_64 system. Relevant stack trace and valgrind error (looks like null pointer being dereferenced): (gdb) bt #0 memcpy () at ../sysdeps/x86_64/memcpy.S:267 #1 0x00007ffec4089995 in vtkXMLDataParser::ReadCompressedData(unsigned char*, long long, long long, int) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8 #2 0x00007ffec408a4ad in vtkXMLDataParser::ReadBinaryData(void*, long long, long long, int) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8 #3 0x00007ffec40914c1 in int vtkXMLDataReaderReadArrayValues<vtkArrayIteratorTemplate<unsigned char> >(vtkXMLDataElement*, vtkXMLDataParser*, long long, vtkArrayIteratorTemplate<unsigned char>*, long long, long long) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8 #4 0x00007ffec4090287 in vtkXMLDataReader::ReadArrayValues(vtkXMLDataElement*, long long, vtkAbstractArray*, long long, long long) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8 #5 0x00007ffec40c42ab in vtkXMLStructuredDataReader::ReadSubExtent(int*, int*, long long*, int*, int*, long long*, int*, int*, vtkXMLDataElement*, vtkAbstractArray*) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8 #6 0x00007ffec40c222f in vtkXMLStructuredDataReader::ReadArrayForPoints(vtkXMLDataElement*, vtkAbstractArray*) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8 #7 0x00007ffec408e470 in vtkXMLDataReader::ReadPieceData() () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8 #8 0x00007ffec40c296e in vtkXMLStructuredDataReader::ReadXMLData() () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8 0000009 0x00007ffec40ba08d in vtkXMLReader::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8 #10 0x00007ffec40b8d6d in vtkXMLReader::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8 0000011 0x00007ffec4b77974 in vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkFiltering.so.5.8 #12 0x00007ffec4b6a6ac in vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkFiltering.so.5.8 #13 0x00007ffec4b6d75b in vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkFiltering.so.5.8 #14 0x00007ffec4cf3f89 in vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkFiltering.so.5.8 #15 0x00007ffec4b6d49f in vtkDemandDrivenPipeline::UpdateData(int) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkFiltering.so.5.8 #16 0x00007ffec4cf316b in vtkStreamingDemandDrivenPipeline::Update(int) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkFiltering.so.5.8 #17 0x00007ffec509c549 in PyvtkAlgorithm_Update(_object*, _object*) () from /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkFilteringPythonD.so.5.8 #18 0x00000000004a7c5e in PyEval_EvalFrameEx () #19 0x00000000004a9671 in PyEval_EvalCodeEx () #20 0x00000000004a9742 in PyEval_EvalCode () #21 0x00000000004c9a0e in PyRun_FileExFlags () #22 0x00000000004c9c24 in PyRun_SimpleFileExFlags () #23 0x000000000041a7ff in Py_Main () #24 0x00007ffec6e1ac4d in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fff97620768) at libc-start.c:226 #25 0x00000000004199f9 in _start () ==26083== Invalid write of size 1 ==26083== at 0x4C28F04: memcpy (mc_replace_strmem.c:497) ==26083== by 0x9853994: vtkXMLDataParser::ReadCompressedData(unsigned char*, long long, long long, int) (in /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8.0) ==26083== by 0x98544AC: vtkXMLDataParser::ReadBinaryData(void*, long long, long long, int) (in /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8.0) ==26083== by 0x985B4C0: int vtkXMLDataReaderReadArrayValues<vtkArrayIteratorTemplate<unsigned char> >(vtkXMLDataElement*, vtkXMLDataParser*, long long, vtkArrayIteratorTemplate<unsigned char>*, long long, long long) (in /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8.0) ==26083== by 0x985A286: vtkXMLDataReader::ReadArrayValues(vtkXMLDataElement*, long long, vtkAbstractArray*, long long, long long) (in /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8.0) ==26083== by 0x988E2AA: vtkXMLStructuredDataReader::ReadSubExtent(int*, int*, long long*, int*, int*, long long*, int*, int*, vtkXMLDataElement*, vtkAbstractArray*) (in /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8.0) ==26083== by 0x988C22E: vtkXMLStructuredDataReader::ReadArrayForPoints(vtkXMLDataElement*, vtkAbstractArray*) (in /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8.0) ==26083== by 0x985846F: vtkXMLDataReader::ReadPieceData() (in /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8.0) ==26083== by 0x988C96D: vtkXMLStructuredDataReader::ReadXMLData() (in /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8.0) ==26083== by 0x988408C: vtkXMLReader::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) (in /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8.0) ==26083== by 0x9882D6C: vtkXMLReader::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) (in /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkIO.so.5.8.0) ==26083== by 0x8A17973: vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*) (in /home/paulmlocal/software/vtk-5.8.0/lib/vtk-5.8/libvtkFiltering.so.5.8.0) ==26083== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==26083== ==26083== | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | ||||||||||
Tags | hackaton | |||||||||
Relationships |
| |||||||||
Attached Files | ![]() https://www.vtk.org/Bug/file/9078/buggy_vti.py ![]() https://www.vtk.org/Bug/file/9487/buggy_vti6.py ![]() https://www.vtk.org/Bug/file/9582/12753_stacktrace.txt | |||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2011-11-29 04:41 | Paul Melis | New Issue | ||||||||
2011-11-29 04:41 | Paul Melis | File Added: buggy_vti.py | ||||||||
2011-11-29 05:09 | Paul Melis | Note Added: 0027743 | ||||||||
2011-11-29 08:32 | Paul Melis | Note Added: 0027744 | ||||||||
2011-11-29 08:33 | Paul Melis | Note Edited: 0027744 | bug_revision_view_page.php?bugnote_id=27744#r402 | |||||||
2011-11-29 08:33 | Paul Melis | Note Edited: 0027744 | bug_revision_view_page.php?bugnote_id=27744#r403 | |||||||
2011-11-29 08:34 | Paul Melis | Note Edited: 0027744 | bug_revision_view_page.php?bugnote_id=27744#r404 | |||||||
2013-07-22 12:45 | Dave DeMarle | Note Added: 0031154 | ||||||||
2013-07-22 12:45 | Dave DeMarle | Status | backlog => expired | |||||||
2013-07-22 12:45 | Dave DeMarle | Resolution | open => fixed | |||||||
2013-07-22 12:45 | Dave DeMarle | Assigned To | => Dave DeMarle | |||||||
2013-07-29 05:00 | Paul Melis | Note Added: 0031354 | ||||||||
2013-07-29 05:00 | Paul Melis | File Added: buggy_vti6.py | ||||||||
2013-07-29 05:01 | Paul Melis | Note Added: 0031355 | ||||||||
2013-07-29 05:01 | Paul Melis | Note Added: 0031356 | ||||||||
2013-07-29 05:01 | Paul Melis | Status | expired => backlog | |||||||
2013-07-29 05:01 | Paul Melis | Resolution | fixed => reopened | |||||||
2013-12-31 11:11 | Sankhesh Jhaveri | File Added: 12753_stacktrace.txt | ||||||||
2013-12-31 11:11 | Sankhesh Jhaveri | File Added: backtrace.PNG | ||||||||
2013-12-31 11:12 | Sankhesh Jhaveri | File Deleted: backtrace.PNG | ||||||||
2013-12-31 11:13 | Sankhesh Jhaveri | Note Added: 0032099 | ||||||||
2014-09-30 10:51 | Dave DeMarle | Assigned To | Dave DeMarle => | |||||||
2014-10-01 20:25 | Berk Geveci | Tag Attached: hackaton | ||||||||
2014-10-02 09:25 | Utkarsh Ayachit | Assigned To | => Utkarsh Ayachit | |||||||
2014-10-02 13:16 | Utkarsh Ayachit | Note Added: 0033488 | ||||||||
2014-10-02 13:17 | Utkarsh Ayachit | Status | backlog => gerrit review | |||||||
2014-10-02 15:06 | Utkarsh Ayachit | Relationship added | related to 0011607 | |||||||
2014-10-02 15:50 | Utkarsh Ayachit | Note Added: 0033533 | ||||||||
2014-10-02 15:50 | Utkarsh Ayachit | Status | gerrit review => closed | |||||||
2014-10-02 15:50 | Utkarsh Ayachit | Resolution | reopened => fixed | |||||||
2014-10-02 15:50 | Utkarsh Ayachit | Fixed in Version | => 6.2.0 | |||||||
2015-01-09 13:42 | Utkarsh Ayachit | Source_changeset_attached | => VTK master 82085ea8 | |||||||
2015-01-09 13:43 | Utkarsh Ayachit | Source_changeset_attached | => VTK master 51996a64 | |||||||
2015-01-09 13:43 | Utkarsh Ayachit | Source_changeset_attached | => VTK master 4087b625 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|