MantisBT - VTK
View Issue Details
0012819VTK(No Category)public2011-12-21 11:242016-08-12 09:55
Tobias Maier 
Dave DeMarle 
normalminorhave not tried
closedmoved 
5.8.0 
 
TBD
incorrect functionality
0012819: Wrong byte order for long (64bit) in vtkDataReader/vtkDataWriter
When a vtkLongArray is written with the vtkDataWriter on a system where sizeof(long) = 8 the byte order is changed within a block of 8 bytes [0 1 2 3 4 5 6 7] -> [7 6 5 4 3 2 1 0]. But when the data is read back with vtkDataReader it uses a block size of 4 for swapping the byte order for long. This results when writing and reading (as in marshalling/unmarshalling in vtkCommunicator) in an ordering of [4 5 6 7 0 1 2 3].
I do not know if the behaviour of the reader or writer is correct and if an exchange between systems with 32bit and 64bit is even possible.
The attached file is an example that should reproduce the explained bug on 64bit systems.
No tags attached.
cxx vtkWriterReaderBug.cxx (2,308) 2011-12-21 11:24
https://www.vtk.org/Bug/file/9094/vtkWriterReaderBug.cxx
Issue History
2011-12-21 11:24Tobias MaierNew Issue
2011-12-21 11:24Tobias MaierFile Added: vtkWriterReaderBug.cxx
2013-07-22 16:46Dave DeMarleNote Added: 0031174
2013-07-22 16:46Dave DeMarleStatusbacklog => expired
2013-07-22 16:46Dave DeMarleResolutionopen => fixed
2013-07-22 16:46Dave DeMarleAssigned To => Dave DeMarle
2016-08-12 09:55Kitware RobotNote Added: 0037265
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionfixed => moved

Notes
(0031174)
Dave DeMarle   
2013-07-22 16:46   
Please reopen this report if the bug is still present in 6.0.0.
(0037265)
Kitware Robot   
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.