[Paraview] Problems writing binary vtu file

Aleksejs Fomins aleksejs.fomins at lspr.swiss
Thu Jan 19 09:01:44 EST 2017


Dear Paraview,

I tried to extend my VTU writer to write into binary format. I have tried either writing floats using Float32 format and doubles using Float64 format, both fail the same way. I write into binary by using

file.write( (char*) &binarydata, sizeof(BinaryType));

In both cases, Paraview complains that there is an invalid token immediately at the beginning of binary output within the first DataArray clause.

Could someone please hint me as of what I am doing wrong.

Regards,
Aleksejs




ERROR: In /home/fomins/Downloads/ParaView-v5.0.1-source/VTK/IO/XMLParser/vtkXMLParser.cxx, line 397
vtkXMLDataParser (0x49f23f0): Error parsing XML in stream at line 7, column 0, byte index 379: not well-formed (invalid token)


ERROR: In /home/fomins/Downloads/ParaView-v5.0.1-source/VTK/IO/XML/vtkXMLReader.cxx, line 456
vtkXMLUnstructuredGridReader (0x49ff7d0): Error parsing input file.  ReadXMLInformation aborting.


ERROR: In /home/fomins/Downloads/ParaView-v5.0.1-source/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 784
vtkCompositeDataPipeline (0x4226820): Algorithm vtkXMLUnstructuredGridReader(0x49ff7d0) returned failure for request: vtkInformation (0x4c21eb0)
  Debug: Off
  Modified Time: 167613
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_INFORMATION
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0




ERROR: In /home/fomins/Downloads/ParaView-v5.0.1-source/VTK/IO/XMLParser/vtkXMLParser.cxx, line 397
vtkXMLDataParser (0x49aa790): Error parsing XML in stream at line 7, column 0, byte index 379: not well-formed (invalid token)


ERROR: In /home/fomins/Downloads/ParaView-v5.0.1-source/VTK/IO/XML/vtkXMLReader.cxx, line 456
vtkXMLUnstructuredGridReader (0x49ff7d0): Error parsing input file.  ReadXMLInformation aborting.


ERROR: In /home/fomins/Downloads/ParaView-v5.0.1-source/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 784
vtkCompositeDataPipeline (0x4226820): Algorithm vtkXMLUnstructuredGridReader(0x49ff7d0) returned failure for request: vtkInformation (0x4c21eb0)
  Debug: Off
  Modified Time: 167613
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_INFORMATION
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0




More information about the ParaView mailing list