View Issue Details

IDProjectCategoryView StatusLast Update
0022690CommunityOCCT:Modeling Algorithmspublic2012-04-02 18:04
ReporteratpAssigned Toabv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version6.5.3Fixed in Version6.5.3 
Summary0022690: Access violations in BRepLib.cxx
DescriptionReported by Markus Rhein in thread http://www.opencascade.org/org/forum/thread_21269/

I have some access violations due to corrupt/uninitialized? geometry objects in BRepLib.cxx during (XDE) STEP import (Win64Bit, OCC 6.3.1-6.5.1, default import parameters). Unfortunately, I cannot share the STEP file causing this.
The related code is in BRepLib.cxx starting from line 1508:

Handle(BRepAdaptor_HCurve2d) HC2d1 = new BRepAdaptor_HCurve2d();
HC2d1->ChangeCurve2d().Initialize(E,F1);
if(couture) E.Orientation(TopAbs_REVERSED);
Handle(BRepAdaptor_HCurve2d) HC2d2 = new BRepAdaptor_HCurve2d();
HC2d2->ChangeCurve2d().Initialize(E,F2);

Adaptor3d_CurveOnSurface C1(HC2d1,HS1);
Adaptor3d_CurveOnSurface C2(HC2d2,HS2);

The Geom2dAdaptor_Curve in HC2d2 does not get initialized properly. Seems that this exception is raised for cases when Pcurve from edge for given face is equal to NULL.

Following fix should be made:
In method Geom2dAdaptor_Curve::Load(const Handle(Geom2d_Curve)& C,

                       const Standard_Real UFirst,
                       const Standard_Real ULast) it is necessary to
   add check 2D curve on NULL
   {
        if ( C.IsNULL()) Standard_ConstructionError::Raise();
   }

   In the BRepLib::tgtfaces(const TopoDS_Edge& Ed,
                     const TopoDS_Face& F1,
                     const TopoDS_Face& F2,
                     const Standard_Real ta,
                     const Standard_Boolean couture
   {
        Standard_Real aFirst, aLast
         if( BRep_Tool::CurveOnSurface(Ed,F1,aFirt,aLast).IsNull() ||
   BRep_Tool::CurveOnSurface(Ed,F2,aFirt,aLast).IsNull())
           return Standard_False;
   ..............................

   }
TagsNo tags attached.
Test case number

Activities

abv

2012-02-09 09:19

manager   ~0019476

This problem is likely to be fixed by #22789, to be checked after the release of OCCT 6.5.3

Issue History

Date Modified Username Field Change
2011-08-01 11:39 atp New Issue
2011-08-01 11:39 atp Assigned To => gka
2011-08-02 11:31 bugmaster Category OCCT:MOA => OCCT:Modeling Algorithms
2011-09-21 11:12 bugmaster Target Version 6.5.2 => 6.5.3
2011-09-22 16:58 szy Assigned To gka => jgv
2011-09-22 16:58 szy Status new => assigned
2012-02-09 09:19 abv Note Added: 0019476
2012-03-12 07:30 abv Assigned To jgv => abv
2012-03-12 07:30 abv Status assigned => feedback
2012-04-02 18:04 bugmaster Status feedback => tested
2012-04-02 18:04 bugmaster Status tested => verified
2012-04-02 18:04 bugmaster Resolution open => fixed