Parsing error when reading STEP file


I am having trouble reading a specific STEP file using the C++ API. The function STEPCAFControl_Reader::ReadFile() is failing and returning IFSelect_RetFail. When I activate the DEBUG mode from OCCT I have the following error message when the ReadFile function is running:

“input buffer overflow, can’t enlarge buffer because scanner uses REJECT”

I found that an exception occurs inside the STEP parser when the scanner is reading the following entity in the STEP file:



This entity definition is very large, above I removed most of the lines, but in total it has 48675 characters!

I know very little about parsers, but it looks like some buffer is overflowing when reading this entity. I really need to read this file, is there any way to get around this problem?

Read more here: Source link