# Problem reading big vtu file (\> int32)

**URL:** https://discourse.paraview.org/t/problem-reading-big-vtu-file-int32/13700
**Category:** ParaView Support
**Created:** [January 15, 2024, 11:30am UTC](https://discourse.paraview.org/t/problem-reading-big-vtu-file-int32/13700 "2024-01-15T11:30:18Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![stefan74xxx](https://discourse.paraview.org/user_avatar/discourse.paraview.org/stefan74xxx/32/13361_2.png) [@stefan74xxx](https://discourse.paraview.org/u/stefan74xxx)
#### Post date: [January 15, 2024, 11:30am UTC](https://discourse.paraview.org/t/problem-reading-big-vtu-file-int32/13700/1 "2024-01-15T11:30:18Z")

</div>

Hi,

if have a very large grid converted to vtu (binary and ASCII format) and tried to read with ParaView (e.g. v5\_12RC2 but does not matter - older versions have the same problem).

Reading the ASCII file with ParaView creates this error (with core dump):

_terminate called after throwing an instance of ‘std::bad\_array\_new\_length’_\* what(): std::bad\_array\_new\_length\*

The binary vtu creates this error (again with core dump):

\*[paraview]vtkXMLUnstructuredDataR:514 ERR| vtkXMLUnstructuredGridReader (0x6a6ab10): Cannot read points array from Points in piece 0. \*  
_The data array in the element may be too short._

The dataset consist of four parts where the “hexa” part creates the problem (removing this part from vtm and read again all is fine).

Element || NumberOfPoints | NumberOfCells  
Hexa || 382518494 | 367965864  
Prisms || 26561626 | 11889244  
Pyra || 32489753 | 16364502  
Tetra || 24493577 | 77533523

Element || SizeConnectivity | MinConnectivity | MaxConnectivity  
Hexa || 2943726912 \*\*\* | 0 | 382518493  
Prisms || 71335464 | 0 | 26561625  
Pyra || 81822510 | 0 | 32489752  
Tetra || 310134092 | 0 | 24493576

Element || SizeOffsets | MinOffsets | MaxOffsets  
Hexa || 367965864 | 8 | 2943726912 \*\*\*  
Prisms || 11889244 | 6 | 71335464  
Pyra || 16364502 | 5 | 81822510  
Tetra || 77533523 | 4 | 310134092

\*\*\* = bigger then INT32

So there are some fields larger then INT32 (and written in INT64 therefore). The file/function which creates the error is

o ./VTK/IO/XML/vtkXMLUnstructuredDataReader.cxx  
o Function ReadPieceData (line 456)  
o Loop for (int i = 0; (i \< ePoints-\>GetNumberOfNestedElements() && !this-\>AbortExecute); ++i) (line 496) **→ int?**

So maybe that “int” is already the problem here?

The testcase can be downloaded from this link:

[https://gigamove.rwth-aachen.de/de/download/26a7aff322d4aecec18f69bb7a5bab3c](https://gigamove.rwth-aachen.de/de/download/26a7aff322d4aecec18f69bb7a5bab3c)

Best regards and thank you for help already,

Stefan

---

<div class="post-metadata">

### Author: ![todoooo](https://discourse.paraview.org/user_avatar/discourse.paraview.org/todoooo/32/2819_2.png) [@todoooo](https://discourse.paraview.org/u/todoooo)
#### Post date: [January 15, 2024, 10:19pm UTC](https://discourse.paraview.org/t/problem-reading-big-vtu-file-int32/13700/2 "2024-01-15T22:19:05Z")

</div>

Are you using Windows?

I believe this has been fixed in VTK but is possibly not yet available in Paraview. Did you try building Paraview from the latest source?

> [@How to open Large vtu file in Paraview?](https://discourse.paraview.org/t/how-to-open-large-vtu-file-in-paraview/10675):
>
> My result file is vtu format file, and I try to open in using Paraview. If data file size is small ( ~2GB) it opened well. However if it’s size is more then 3 or 4 GB, I got some error message and can’t open it. How can I solve it? /////// ERROR: In vtkXMLDataParser.cxx, line 537 vtkXMLDataParser (00000178C355D9E0): Error reading beginning of compression header. Read 0 of 12 bytes. ERROR: In vtkXMLDataParser.cxx, line 881 vtkXMLDataParser (00000178C355D9E0): ReadCompressionHeader failed…

---

<div class="post-metadata">

### Author: ![stefan74xxx](https://discourse.paraview.org/user_avatar/discourse.paraview.org/stefan74xxx/32/13361_2.png) [@stefan74xxx](https://discourse.paraview.org/u/stefan74xxx)
#### Post date: [January 16, 2024, 5:33am UTC](https://discourse.paraview.org/t/problem-reading-big-vtu-file-int32/13700/3 "2024-01-16T05:33:53Z")

</div>

ParaView is from the last version - v5\_12RC2 and i run under Linux. Maybe it make sense to use the newest VTK from git together with Paraview then?

---

<div class="post-metadata">

### Author: ![todoooo](https://discourse.paraview.org/user_avatar/discourse.paraview.org/todoooo/32/2819_2.png) [@todoooo](https://discourse.paraview.org/u/todoooo)
#### Post date: [January 16, 2024, 5:35am UTC](https://discourse.paraview.org/t/problem-reading-big-vtu-file-int32/13700/4 "2024-01-16T05:35:37Z")

</div>

If you’re running under Linux you’ve discovered a new issue.

---

<div class="post-metadata">

### Author: ![stefan74xxx](https://discourse.paraview.org/user_avatar/discourse.paraview.org/stefan74xxx/32/13361_2.png) [@stefan74xxx](https://discourse.paraview.org/u/stefan74xxx)
#### Post date: [January 16, 2024, 5:40am UTC](https://discourse.paraview.org/t/problem-reading-big-vtu-file-int32/13700/5 "2024-01-16T05:40:14Z")

</div>

Bad for me - but good for the improvement of ParaView 😉

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 6, 2024, 1:20pm UTC](https://discourse.paraview.org/t/problem-reading-big-vtu-file-int32/13700/6 "2024-02-06T13:20:29Z")

</div>

The binary issue seems to be fixed with 5.12  
The ascii issue is indeed present.
