# 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:** 1
**Showing post:** 22

<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 
}

```

---

_[View the full topic](https://discourse.paraview.org/t/error-reading-large-vtk-files-in-the-windows-version/8199)._
