View Issue Details

IDProjectCategoryView StatusLast Update
0027894CommunityOCCT:Shape Healingpublic2018-10-30 14:33
ReporterErnest Galbrun Assigned Toapn  
PrioritynormalSeveritymajor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2015 
Product Version7.1.0 
Target Version7.2.0Fixed in Version7.2.0 
Summary0027894: Crash when calling ShapeUpgrade_UnifySameDomain
DescriptionI frequently make the library fail by raising several kind of exceptions when trying to run the ShapeUpgrade_UnifySameDomain's functions.

I will try to give relevant examples with parts that fail and that I can share with you.

This example raises a Standard_NullObject exception after failing the test

  if ( UFirst > ULast) Standard_ConstructionError::Raise();

in Geom2dAdaptor_Curve.lxx


     
Steps To ReproduceI am importing my part from a step file, here is the full code:


    STEPControl_Reader stepReader;
    TopoDS_Shape shape;
    stepReader.ReadFile(Standard_CString(""));
    shape = stepReader.Shape();
        ShapeUpgrade_UnifySameDomain USD(shape, false, true, false); // UnifyEdges mode off, UnifyFaces mode on, ConcatBSplines mode off.
    USD.Build();
    shape = USD.Shape();

##### Draw script #############

stepread usd_raises_Standard_NullObject.STEP a *
renamevar a_1 a
unifysamedom r a
Additional information
and documentation updates
My full call stack:
     KernelBase.dll!RaiseException() Unknown
     vcruntime140d.dll!00007ffcf2987b60() Unknown
     TKBRep.dll!Standard_NullObject::Throw() Line 35 C++
     TKernel.dll!Standard_Failure::Reraise() Line 157 C++
     TKernel.dll!Standard_Failure::Reraise(const char * const AString) Line 140 C++
     TKBRep.dll!Standard_NullObject::Raise(const char * const theMessage) Line 35 C++
> TKBRep.dll!Geom2dAdaptor_Curve::Load(const opencascade::handle<Geom2d_Curve> & C, const double UFirst, const double ULast) Line 85 C++
     TKBRep.dll!BRepAdaptor_Curve2d::Initialize(const TopoDS_Edge & E, const TopoDS_Face & F) Line 57 C++
     TKBRep.dll!BRepAdaptor_Curve2d::BRepAdaptor_Curve2d(const TopoDS_Edge & E, const TopoDS_Face & F) Line 41 C++
     TKShHealing.dll!IsLikeSeam(const TopoDS_Edge & anEdge, const TopoDS_Face & aFace, const opencascade::handle<Geom_Surface> & aBaseSurface) Line 107 C++
     TKShHealing.dll!ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape & theInpShape, const NCollection_IndexedDataMap<TopoDS_Shape,NCollection_List<TopoDS_Shape>,TopTools_ShapeMapHasher> & theGMapEdgeFaces, bool IsCheckSharedEdgeOri) Line 1309 C++
     TKShHealing.dll!ShapeUpgrade_UnifySameDomain::UnifyFaces() Line 1218 C++
     TKShHealing.dll!ShapeUpgrade_UnifySameDomain::Build() Line 1950 C++
TagsNo tags attached.
Test case numberbugs heal bug27894

Attached Files

  • usd_raises_Standard_NullObject.STEP (35,350 bytes)

Relationships

parent of 0030320 closedbugmaster Open CASCADE ShapeUpgrade_UnifySameDomain produces invalid shape 

Activities

Ernest Galbrun

2016-09-22 15:53

developer  

usd_raises_Standard_NullObject.STEP (35,350 bytes)

gka

2016-10-26 17:03

developer   ~0059188

After reading from STEP shape is valid.
Exception is raised on the 7 face based on the Geom_RectangularTrimmedSurface.

git

2017-02-02 12:58

administrator   ~0063353

Branch CR27894 has been created by msv.

SHA-1: ba1fc08931a04e3d677c7bd7e287dfdffefb1b8a


Detailed log of new commits:

Author: msv
Date: Thu Feb 2 12:57:58 2017 +0300

    0027894: Crash when calling ShapeUpgrade_UnifySameDomain
    
    - Avoid getting pcurve of edge on not connected face.
    - Avoid building wire of empty set of edges.

msv

2017-02-02 12:59

developer   ~0063354

Dear Julia, please review the fix.

jgv

2017-02-02 14:49

developer   ~0063364

Reviewed.

mkv

2017-02-07 16:18

tester   ~0063502

Dear BugMaster,
Branch CR27894 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: ba1fc08931a04e3d677c7bd7e287dfdffefb1b8a

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1145

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR27894-master-OCCT/Debian70-64/bugs/heal/bug27894.html
http://occt-tests/CR27894-master-OCCT/Windows-64-VC10/bugs/heal/bug27894.html
bugs heal bug27894: OK

Testing on Linux:
occt component :
Total MEMORY difference: 92719324 / 92301528 [+0.45%]
Total CPU difference: 19940.870000000195 / 19914.000000000215 [+0.13%]
products component :
Total MEMORY difference: 31503090 / 31477908 [+0.08%]
Total CPU difference: 5599.429999999981 / 5544.959999999981 [+0.98%]

Testing on Windows:
occt component :
Total MEMORY difference: 57620670 / 57618048 [+0.00%]
Total CPU difference: 18172.556489998602 / 18683.178963198647 [-2.73%]
products component :
Total MEMORY difference: 22659006 / 22621210 [+0.17%]
Total CPU difference: 5444.66890149997 / 5570.546108399986 [-2.26%]

There are no differences in images found by testdiff.

git

2017-02-07 16:19

administrator   ~0063503

Branch CR27894 has been updated by mkv.

SHA-1: 4bfc3544cf923dd7c75529b17b9abbc3bbe884f6


Detailed log of new commits:

Author: mkv
Date: Tue Feb 7 16:17:09 2017 +0300

    Small correction of test case for issue CR27894

mkv

2017-02-07 16:19

tester   ~0063504

Dear BugMaster,
Branch CR27894 is TESTED.

git

2017-03-20 14:35

administrator   ~0064494

Branch CR27894 has been deleted by inv.

SHA-1: 4bfc3544cf923dd7c75529b17b9abbc3bbe884f6

Related Changesets

occt: master d3dadd23

2017-02-09 12:44:06

msv


Committer: apn Details Diff
0027894: Crash when calling ShapeUpgrade_UnifySameDomain

- Avoid getting pcurve of edge on not connected face.
- Avoid building wire of empty set of edges.

Small correction of test case for issue CR27894
Affected Issues
0027894
mod - src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx Diff File
add - tests/bugs/heal/bug27894 Diff File

Issue History

Date Modified Username Field Change
2016-09-22 15:53 Ernest Galbrun New Issue
2016-09-22 15:53 Ernest Galbrun Assigned To => gka
2016-09-22 15:53 Ernest Galbrun File Added: usd_raises_Standard_NullObject.STEP
2016-10-26 17:01 gka Assigned To gka => msv
2016-10-26 17:03 gka Note Added: 0059188
2016-10-26 17:10 msv Target Version 7.1.0 => 7.2.0
2017-02-02 12:58 git Note Added: 0063353
2017-02-02 12:59 msv Note Added: 0063354
2017-02-02 12:59 msv Assigned To msv => jgv
2017-02-02 12:59 msv Status new => resolved
2017-02-02 13:00 msv Steps to Reproduce Updated
2017-02-02 14:49 jgv Note Added: 0063364
2017-02-02 14:49 jgv Assigned To jgv => bugmaster
2017-02-02 14:49 jgv Status resolved => reviewed
2017-02-02 14:51 mkv Assigned To bugmaster => mkv
2017-02-07 16:18 mkv Note Added: 0063502
2017-02-07 16:19 git Note Added: 0063503
2017-02-07 16:19 mkv Note Added: 0063504
2017-02-07 16:19 mkv Assigned To mkv => bugmaster
2017-02-07 16:19 mkv Status reviewed => tested
2017-02-07 16:19 mkv Test case number => bugs heal bug27894
2017-02-10 14:33 apn Changeset attached => occt master d3dadd23
2017-02-10 14:33 apn Assigned To bugmaster => apn
2017-02-10 14:33 apn Status tested => verified
2017-02-10 14:33 apn Resolution open => fixed
2017-03-20 14:35 git Note Added: 0064494
2017-09-29 16:20 aiv Fixed in Version => 7.2.0
2017-09-29 16:24 aiv Status verified => closed
2018-10-30 14:33 jgv Relationship added parent of 0030320