Parsing error when reading STEP file

Hi,

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:

#896683=DESCRIPTIVE_REPRESENTATION_ITEM(”,
‘FINAL_PART=13791,26341,26353,26365,26377,26389,26401,26413,26425,2643
7,26449,26461,26473,26485,26497,26509,26521,26533,26545,26557,26569,26
581,26593,26605,26617,26629,26641,26653,26665,26677,26689,26701,26713,



6280,20270,11805,15576,1240’);

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