View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013294VTK(No Category)public2012-07-04 11:392016-08-12 09:55
Reporterklaus triendl 
Assigned ToCory Quammen 
PriorityhighSeverityminorReproducibilityhave not tried
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version5.8.0 
Target VersionFixed in Version 
Summary0013294: string arrays may cause vtkXMLUnstructuredGridWriter to produce corrupt vtu-files, which are unreadable or cause crash
DescriptionWhen a string array is appended to the cell data of an unstructured grid, vtkXMLUnstructuredGridWriter may produce a corrupt vtu-file, depending on how long the strings are. I cannot tell at what length the issue shows up, but the longer the strings the sooner it happens.
Even very simple models with just 304 cells can be affected. It doesn't matter whether the cell data is compressed or not and whether the data is binary or appended. Only ascii works.

Please see attached zip file, which contains:
* a test cpp file displaying how I produce the vtu-files
* a test msvc2010 project
* the source and resulting vtu files

Notes worth to be mentioned:
* When loading the compressed vtu-files the following error is reported:
<error>
- ERROR: In ..\..\..\..\src\VTK\IO\vtkZLibDataCompressor.cxx, line 83
vtkZLibDataCompressor (00000000139D63E0): Decompression produced incorrect size.
Expected 27728 and got 27529


ERROR: In ..\..\..\..\src\VTK\IO\vtkXMLDataReader.cxx, line 545
vtkXMLUnstructuredGridReader (000000000B2F7ED0): Cannot read cell data array "strings" from PointData in piece 0. The data array in the element may be too short.
</error>
* when loading the uncompressed vtu-files then the reading application crashes in the template function vtkXMLDataReaderReadArrayValues<vtkArrayIteratorTemplate<vtkStdString>>


I detected the issue already in version 5.8.0, it's still active in 5.10.0 and in 6.0 (git #02aef09).
TagsNo tags attached.
ProjectRelease
Typecrash
Attached Fileszip file icon vtk-xmlwriter-bug.zip [^] (75,689 bytes) 2012-07-04 11:39
? file icon None.vtp [^] (516,242 bytes) 2013-08-22 04:35
? file icon Zlib.vtp [^] (164,049 bytes) 2013-08-22 04:35

 Relationships
related to 0013382closedT.J. Corona vtkXMLUnstructuredGridWriter: corrupted output for polyhedral cells in appended mode 
related to 0013860closedChuck Atkins the vtkXMLUnstructuredGridWriter crashes on MacOSX 10.6.8 
related to 0013295closedDave DeMarle vtkXMLUnstructuredGridReader cannot read vtu-files in ascii mode when a double data array contains INFINITE or MAX values 

  Notes
(0031491)
Emmanuel (reporter)
2013-08-22 04:34

Hi
It seems to be the same problem I have with vtkXMLPolyDataWriter.
For some string attached to cells, if I use the Zlib compression, it produces a corrupted file, which gives this error when reading with paraview:
"
ERROR: In /builddir/build/BUILD/ParaView-3.98.1-source/VTK/IO/Core/vtkZLibDataCompressor.cxx, line 85
vtkZLibDataCompressor (0x4459a90): Decompression produced incorrect size.
Expected 2696 and got 2693

ERROR: In /builddir/build/BUILD/ParaView-3.98.1-source/VTK/IO/XML/vtkXMLDataReader.cxx, line 545
vtkXMLPolyDataReader (0x4457860): Cannot read cell data array "Names" from PointData in piece 0. The data array in the element may be too short.
"
Most of the time it works without problem. It depends on the string attached.
In my case if I associate the string "5" it works fine, if I put a character or string (like "5s") it fails. Both works when not using Zlib compression.
Files using and not using compression are attached. (Zlib.vtp and None.vtp)

vtkSmartPointer<vtkXMLPolyDataWriter> writer = vtkSmartPointer<vtkXMLPolyDataWriter>::New();

writer->SetCompressorTypeToZLib();// using this generates Zlib.vtp
writer->SetCompressorTypeToNone();// using this generates None.vtp


thank you ;-)
(0035013)
T.J. Corona (developer)
2015-08-18 10:25

I cannot reproduce this problem in VTK6.3.
(0035573)
Cory Quammen (developer)
2015-12-16 09:23

I believe this is still a bug in VTK 7.0. I will follow up later.
(0037286)
Kitware Robot (administrator)
2016-08-12 09:55

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2012-07-04 11:39 klaus triendl New Issue
2012-07-04 11:39 klaus triendl File Added: vtk-xmlwriter-bug.zip
2013-06-25 14:22 Dave DeMarle Relationship added child of 0013860
2013-06-25 14:22 Dave DeMarle Relationship deleted child of 0013860
2013-06-25 14:22 Dave DeMarle Relationship added related to 0013860
2013-06-25 14:23 Dave DeMarle Relationship added related to 0013295
2013-06-25 14:24 Dave DeMarle Relationship added related to 0013382
2013-08-22 04:34 Emmanuel Note Added: 0031491
2013-08-22 04:35 Emmanuel File Added: None.vtp
2013-08-22 04:35 Emmanuel File Added: Zlib.vtp
2015-08-18 10:25 T.J. Corona Note Added: 0035013
2015-08-18 10:25 T.J. Corona Status backlog => closed
2015-08-18 10:25 T.J. Corona Assigned To => T.J. Corona
2015-08-18 10:25 T.J. Corona Resolution open => unable to reproduce
2015-08-18 10:25 T.J. Corona Fixed in Version => 6.3.0
2015-12-16 09:23 Cory Quammen Assigned To T.J. Corona => Cory Quammen
2015-12-16 09:23 Cory Quammen Note Added: 0035573
2015-12-16 09:23 Cory Quammen Status closed => backlog
2015-12-16 09:23 Cory Quammen Resolution unable to reproduce => reopened
2016-08-12 09:55 Kitware Robot Note Added: 0037286
2016-08-12 09:55 Kitware Robot Status backlog => closed
2016-08-12 09:55 Kitware Robot Fixed in Version 6.3.0 =>
2016-08-12 09:55 Kitware Robot Resolution reopened => moved


Copyright © 2000 - 2018 MantisBT Team