# Bug in vtkMultiBlockPLOT3DReader

**URL:** https://discourse.vtk.org/t/bug-in-vtkmultiblockplot3dreader/4650
**Category:** Support
**Created:** [November 12, 2020, 7:55pm UTC](https://discourse.vtk.org/t/bug-in-vtkmultiblockplot3dreader/4650 "2020-11-12T19:55:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![celynchgt](https://discourse.vtk.org/user_avatar/discourse.vtk.org/celynchgt/32/10526_2.png) [@celynchgt](https://discourse.vtk.org/u/celynchgt)
#### Post date: [November 12, 2020, 7:55pm UTC](https://discourse.vtk.org/t/bug-in-vtkmultiblockplot3dreader/4650/1 "2020-11-12T19:55:08Z")

</div>

There appears to be a bug in vtkMultiBlockPLOT3DReader, specifically in the way it guesses the format of the file. I’m using whatever version of VTK is distributed with ParaView 5.8.1.

First, I try to read the file with auto-detect turned on:

import vtk  
reader = vtk.vtkMultiBlockPLOT3DReader()  
reader.SetXYZFileName(‘CARTBody00001200.x’)  
reader.AutoDetectFormatOn()  
reader.Update()  
40.633s) [main thread]vtkMultiBlockPLOT3DRead:2504 ERR| vtkMultiBlockPLOT3DReader (0x1748090): Could not determine settings for file. Cannot read.

Since I know what “flavor” of Plot3d this is, I’ll try disabling auto-detect and specifying all the options myself:

reader = vtk.vtkMultiBlockPLOT3DReader()  
reader.SetXYZFileName(‘CARTBody00001200.x’)  
reader.BinaryFileOn()  
reader.MultiGridOn()  
reader.AutoDetectFormatOff()  
reader.BinaryFileOn()  
reader.MultiGridOn()  
reader.HasByteCountOff()  
reader.IBlankingOn()  
reader.DoublePrecisionOff()  
reader.SetByteOrderToBigEndian()  
reader.Update()  
( 324.724s) [main thread]vtkMultiBlockPLOT3DRead:2504 ERR| vtkMultiBlockPLOT3DReader (0x15a8590): Could not determine settings for file. Cannot read.

I’ve tried reading the file manually with a small Python script, and everything appears to be in order with it. It appears that VTK tries to do the auto-detect regardless of what the user asked for. I can supply an example data file on request, but Discourse won’t let me upload it since I’m a new user.

The specific issue with this file may be that it’s a C binary file with 512 blocks. If you byte-swap 512, you get 131072, which is a large but plausible number of blocks. That ends up confusing the endianness auto-detection.

---

<div class="post-metadata">

### Author: ![utkarshayachit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/utkarshayachit/32/379_2.png) [@utkarshayachit](https://discourse.vtk.org/u/utkarshayachit)
#### Post date: [November 20, 2020, 1:17pm UTC](https://discourse.vtk.org/t/bug-in-vtkmultiblockplot3dreader/4650/2 "2020-11-20T13:17:15Z")

</div>

Eric, can you report the issue on the [issue tracker](https://gitlab.kitware.com/paraview/paraview/-/issues) please? You should be able to attach the dataset there. I’m pointing here to the ParaView issues tracker, instead of VTK’s as this bug will impact ParaView and it’ll most likely get fixed faster if it’s there.

---

<div class="post-metadata">

### Author: ![celynchgt](https://discourse.vtk.org/user_avatar/discourse.vtk.org/celynchgt/32/10526_2.png) [@celynchgt](https://discourse.vtk.org/u/celynchgt)
#### Post date: [November 20, 2020, 4:26pm UTC](https://discourse.vtk.org/t/bug-in-vtkmultiblockplot3dreader/4650/3 "2020-11-20T16:26:24Z")

</div>

Reported [here](https://gitlab.kitware.com/paraview/paraview/-/issues/20341)

---

<div class="post-metadata">

### Author: ![utkarshayachit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/utkarshayachit/32/379_2.png) [@utkarshayachit](https://discourse.vtk.org/u/utkarshayachit)
#### Post date: [November 24, 2020, 1:36am UTC](https://discourse.vtk.org/t/bug-in-vtkmultiblockplot3dreader/4650/4 "2020-11-24T01:36:05Z")

</div>

A fix is available [here](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7436) and should make it in ParaView 5.9 release. Thanks for reporting.
