# Error reading large VTK files in the Windows version

**URL:** https://discourse.paraview.org/t/error-reading-large-vtk-files-in-the-windows-version/8199
**Category:** ParaView Support
**Tags:** vtk
**Created:** [October 16, 2021, 6:39am UTC](https://discourse.paraview.org/t/error-reading-large-vtk-files-in-the-windows-version/8199 "2021-10-16T06:39:29Z")
**Posts on this page:** 3
**Page:** 2

<div class="post-metadata">

### Author: ![vmajor](https://discourse.paraview.org/user_avatar/discourse.paraview.org/vmajor/32/7775_2.png) [@vmajor](https://discourse.paraview.org/u/vmajor)
#### Post date: [December 21, 2021, 11:29am UTC](https://discourse.paraview.org/t/error-reading-large-vtk-files-in-the-windows-version/8199/21 "2021-12-21T11:29:44Z")

</div>

Thank you Todd!

Here is a fresh 6 day link: [https://velocite-public.s3.fr-par.scw.cloud/domain\_00010000.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=SCW7BRXPRJM3D3G7DZKG%2F20211221%2Ffr-par%2Fs3%2Faws4\_request&X-Amz-Date=20211221T112852Z&X-Amz-Expires=521990&X-Amz-Signature=713f4ebeaf7627ac9c3287dbba20a4287fc046d84846e358e3ee353ef7bef248&X-Amz-SignedHeaders=host](https://velocite-public.s3.fr-par.scw.cloud/domain_00010000.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=SCW7BRXPRJM3D3G7DZKG%2F20211221%2Ffr-par%2Fs3%2Faws4_request&X-Amz-Date=20211221T112852Z&X-Amz-Expires=521990&X-Amz-Signature=713f4ebeaf7627ac9c3287dbba20a4287fc046d84846e358e3ee353ef7bef248&X-Amz-SignedHeaders=host)

---

<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: [December 25, 2021, 11:37pm UTC](https://discourse.paraview.org/t/error-reading-large-vtk-files-in-the-windows-version/8199/22 "2021-12-25T23:37:22Z")

</div>

Hi @vmajor

A type conversion error is happening in the XML parser when the byte count passes 2^31 on Windows which results in a negative byte index. Here’s a quick and dirty fix for you to use, assuming you can do a local build, while a more rigorous solution is worked out. It won’t get you past the 4Gb file size limit on Windows but it will load past the 2Gb point. I hope that helps.

```auto
vtkTypeInt64 vtkXMLParser::GetXMLByteIndex()
{
  XML_Parser parser = static_cast<XML_Parser>(this->Parser);
#ifdef _WIN32
  unsigned long result = XML_GetCurrentByteIndex(parser);
  return result;
#else
  return XML_GetCurrentByteIndex(parser);
#endif 
}

```

---

<div class="post-metadata">

### Author: ![geo](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/f4b2a3/32.png) [@geo](https://discourse.paraview.org/u/geo)
#### Post date: [April 19, 2023, 12:39am UTC](https://discourse.paraview.org/t/error-reading-large-vtk-files-in-the-windows-version/8199/23 "2023-04-19T00:39:00Z")

</div>

Hello!  
how do I apply this change?

[Previous page](https://discourse.paraview.org/t/error-reading-large-vtk-files-in-the-windows-version/8199.md?page=1)
