Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029963Community[OCCT] OCCT:Modeling Algorithmspublic2018-07-16 15:152018-07-16 15:15
ReporterMatthias Leuenberger 
Assigned Tomsv 
PlatformWindowsOSVC++ 2012OS Version64 bit
Product Version[OCCT] 7.3.0 
Target VersionFixed in Version 
Summary0029963: BRepAlgo_NormalProjection not successful (even crashes in release)
DescriptionThe following function crashes on my side:

    STEPControl_Reader edgeReader;
    auto edge = edgeReader.OneShape();
    STEPControl_Reader shapeWriter;
    auto shape = shapeWriter.OneShape();

    BRepAlgo_NormalProjection projector(shape);
catch (Standard_Failure const& f){}

The crash happens in ProjLib_CompProjectedCurve.cxx at line 1938:

      const Extrema_POnSurf &aPOnS = theSplitDS.myExtPS->Point(aMinIdx);

aMinIdx is -1, and thus Point is throwing an exception. Surprisingly, the exception isn't caught, and the program crashes. I suspect that it could be a optimisation problem (Compiler VC12, release). In debug the exception is caught.

Additionally, I looked a bit into the projection algorithm, and I think that there should be something like

      const Standard_Integer aNbPext = theSplitDS.myExtPS->NbExt();
      if (aNbPext == 0)

some lines above (i.e. return; instead of throw). Because if aNbPext == 0, the input edge doesn't need the be split. I tested it and in that case the algorithm succeeds.
Steps To ReproduceThe files edge.step and shape.step are attached.
TagsNo tags attached.
Test case number
Attached Fileszip file icon (5,529 bytes) 2018-07-16 15:15

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2018-07-16 15:15 Matthias Leuenberger New Issue
2018-07-16 15:15 Matthias Leuenberger Assigned To => msv
2018-07-16 15:15 Matthias Leuenberger File Added:

Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker