Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027330Community[OCCT] OCCT:Data Exchangepublic2016-03-31 20:132017-07-27 10:38
Assigned Toika 
PlatformOSOS Version
Product Version[OCCT] 6.8.0 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0027330: StepToTopoDS_TranslateEdgeLoop::Init() may crash with certain STEP files
DescriptionQuoted from OCE bugtracker:

I experienced a crash in StepToTopoDS_TranslateEdgeLoop::Init() with certain STEP files containing unusual geometry (mine was created using a CAD model containing a cosmetic feature). The crash occurred at line 330:

StepToTopoDS_TranslateVertex myTranVertex1(Vstart, aTool, NMTool);

It occurred because Vstart was undefined, and this was because curve C was null. To fix this, I added a else case to the existing test for a null curve and returned an error, instead of continuing. My new code looks like this (with commented-out code removed):

if (!C.IsNull()){
  if (C->IsKind(STANDARD_TYPE(StepGeom_SurfaceCurve))) {
    Handle(StepGeom_SurfaceCurve) Sc = Handle(StepGeom_SurfaceCurve)::DownCast(C);
    C = Sc->Curve3d();
else {
    TP->AddWarning(EL,"Null Curve.");
    done = Standard_False;
Please find attached a simple STEP file that demonstrates the crash.
TagsNo tags attached.
Test case number
Attached Fileszip file icon (14,696 bytes) 2016-03-31 20:13

- Relationships

-  Notes
broesdecatFM (reporter)
2017-01-10 18:20

I had a similar issue with a .step file on occt 7.1.0.
In some cases, either EC->EdgeStart or EC->EdgeEnd or both can apparently be NULL.
The above workaround did not solve all crashes following from it.
I now added the above escape, and additional escape if EdgeStart or EdgeEnd is null and apparently also the downcast to an EC edgeCurve fails in some cases...

Unfortunately, also my step file is proprietary. It is also quite large and not made by me. However, if there is some way to find out which part of the step file is causing the crashes, i could probably send it in its isolation.

- Issue History
Date Modified Username Field Change
2016-03-31 20:13 Epy New Issue
2016-03-31 20:13 Epy Assigned To => gka
2016-03-31 20:13 Epy File Added:
2016-06-15 15:48 abv Assigned To gka => ika
2016-06-15 15:48 abv Status new => assigned
2016-10-26 18:23 gka Target Version 7.1.0 => 7.2.0
2017-01-10 18:20 broesdecatFM Note Added: 0062466
2017-01-10 18:21 broesdecatFM Assigned To ika => broesdecatFM
2017-01-10 18:21 broesdecatFM Assigned To broesdecatFM => ika
2017-07-27 10:38 abv Target Version 7.2.0 => 7.4.0*

Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker