You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by celynchgt1 October 29, 2024
I believe I have found a bug in VisIt's Tecplot reader. I have an unstructured grid of 407^3 cells, for a total of about 67.4 million cells. When I try to read that into VisIt, I get an error in my terminal saying:
terminate called after throwing an instance of 'std::bad_array_new_length'
what(): std::bad_array_new_length
With 406^3 cells (about 66.9 million), I can read the grid in successfully and make plots. I believe the bug is on line 1839 of src/databases/Tecplot/TecplotFile.C. The zone connectivity size is stored in a long long there, but the right hand side of that expression is calculated as an int, potentially leading to an overflow. In my case, the Tecplot file uses the FEBRICK connectivity format, so all cells have 8 nodes. So numElements * nodesPerElem * sizeof(int) is numElements * 8 * 4, which will overflow an int when numElements > 67108863.
Since the data files required to debug this are rather large (about 3 GB), I've attached code for a program that will generate them. makeTestFile_cpp.txt
Use it like so:
I tested this with VisIt 3.4.1, installed from the rockylinux8 asset on Github. However, I originally found this bug in ParaView 5.13.0, which reads binary Tecplot files via the VisItBridge. The error message coming out of ParaView is:
ERROR: In vtkAvtSTMDFileFormatAlgorithm.cxx, line 550
vtkVisItTecplotBinaryReader (0x626c1f0): VisIt Exception caught.
The problematic data files can be used successfully in Tecplot itself, so I believe the underlying data is correct.
The text was updated successfully, but these errors were encountered:
Discussed in #19968
Originally posted by celynchgt1 October 29, 2024
I believe I have found a bug in VisIt's Tecplot reader. I have an unstructured grid of 407^3 cells, for a total of about 67.4 million cells. When I try to read that into VisIt, I get an error in my terminal saying:
With 406^3 cells (about 66.9 million), I can read the grid in successfully and make plots. I believe the bug is on line 1839 of src/databases/Tecplot/TecplotFile.C. The zone connectivity size is stored in a long long there, but the right hand side of that expression is calculated as an int, potentially leading to an overflow. In my case, the Tecplot file uses the FEBRICK connectivity format, so all cells have 8 nodes. So numElements * nodesPerElem * sizeof(int) is numElements * 8 * 4, which will overflow an int when numElements > 67108863.
Since the data files required to debug this are rather large (about 3 GB), I've attached code for a program that will generate them.
makeTestFile_cpp.txt
Use it like so:
I tested this with VisIt 3.4.1, installed from the rockylinux8 asset on Github. However, I originally found this bug in ParaView 5.13.0, which reads binary Tecplot files via the VisItBridge. The error message coming out of ParaView is:
The problematic data files can be used successfully in Tecplot itself, so I believe the underlying data is correct.
The text was updated successfully, but these errors were encountered: