StepReader::TransferRoot(int) Access Violation

Hi, I'm getting an Access Violation error,
when I try to load a very huge model.

Code :

int status = stepReader.ReadFile(path);

if(status==IFSelect_RetDone)
{
int nbr = stepReader.NbRootsForTransfer();

for(Standard_Integer n = 1; n stepReader.TransferRoot(n); // Here comes the acces violation!!!!
}

And I can see any more, because the TransferRoot methide is in the .DLL, so I have no chance to get,why I'm getting this error.
The 3D Model that is causing this error, is too big to be attached here.(Its size is 5,42MB compressed).
There is any alternatice to handle the access violation problem?
I know that try,catch wont work.

LI Kevin's picture

I am facing the same problem as you, though my step file is smaller than 100KB. I wonder whether you have solved this problem yet and how?

Attachments: 
Benjamin Bihler's picture

To spot such errors you will have to compile OCCT and your code with debug flags and debug your program. The STEP file seems okay, I can load it without any problems.

LI Kevin's picture

Thank you! And I have rebuilded OCCT and then it worked! Maybe the previous libraries built several months ago have some unknown problems. Anyway, I can continue my work finally.