MantisBT - Community
View Issue Details
0031125Community[OCCT] OCCT:Meshpublic2019-11-04 13:302020-12-02 17:12
Knut 
bugmaster 
highcrash 
closedfixed 
Windows VC++ 2019 64bitWindows10
[OCCT] 7.4.0 
[OCCT] 7.5.0[OCCT] 7.5.0 
bugs/mesh/bug31125
0031125: BRepMesh_IncrementalMesh crash in constructor for empty compound shape
New bug in 7.4.0:

I have some unit tests that uses boolean operations to create an empty shape. (shape is completely clipped out, so the result should be empty)

The boolean operation then results in a TCompound with zero shapes.

When I try to run this through IncrementalMesh, it crashes on line 111 in BrepMesh_IncrementalMesh.cxx:

  for (Standard_Integer aFaceIt = 0; aFaceIt < aModel->FacesNb(); ++aFaceIt)

because aModel is null. There is missing some error checking or at least null checking in this function.

This worked in 7.3.0
compound c
incmesh c 1
Regression vs 7.3.0
No tags attached.
Issue History
2019-11-04 13:30KnutNew Issue
2019-11-04 13:30KnutAssigned To => oan
2019-11-04 16:45oanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22145#r22145
2019-11-04 17:10gitNote Added: 0088720
2019-11-04 17:15oanNote Added: 0088721
2019-11-04 17:52gitNote Added: 0088722
2019-11-04 17:53oanStatusnew => assigned
2019-11-05 07:54abvProduct Version => 7.4.0
2019-11-05 07:54abvTarget Version => 7.5.0
2019-11-05 07:54abvAdditional Information Updatedbug_revision_view_page.php?rev_id=22147#r22147
2019-11-05 07:54abvPrioritynormal => high
2019-11-05 12:59oanNote Added: 0088727
2019-11-05 12:59oanAssigned Tooan => msv
2019-11-05 12:59oanStatusassigned => resolved
2019-11-05 16:10msvNote Added: 0088731
2019-11-05 16:10msvAssigned Tomsv => bugmaster
2019-11-05 16:10msvStatusresolved => reviewed
2019-11-07 10:44bugmasterNote Added: 0088766
2019-11-07 10:44bugmasterStatusreviewed => tested
2019-11-07 10:57bugmasterTest case number => bugs/mesh/bug31125
2019-11-10 11:18bugmasterChangeset attached => occt master 7756fc59
2019-11-10 11:18bugmasterStatustested => verified
2019-11-10 11:18bugmasterResolutionopen => fixed
2019-11-10 11:41gitNote Added: 0088837
2020-12-02 16:40emoFixed in Version => 7.5.0
2020-12-02 17:12emoStatusverified => closed

Notes
(0088720)
git   
2019-11-04 17:10   
Branch CR31125_1 has been created by oan.

SHA-1: 79bba87961b423146a22310a03e0be4404ad1719


Detailed log of new commits:

Author: oan
Date: Mon Nov 4 17:09:09 2019 +0300

    0031125: BRepMesh_IncrementalMesh crash in constructor for empty compound shape
    Added check for cases of empty shapes producing null models
(0088721)
oan   
2019-11-04 17:15   
Hello Knut,

Thank you for reporting the issue.
Draft version of the patch is ready and will be integrated as soon as it pass certification procedure.
(0088722)
git   
2019-11-04 17:52   
Branch CR31125_1 has been updated forcibly by oan.

SHA-1: 04616bb4a334902f4701e10e7f9ec3f039c0bb43
(0088727)
oan   
2019-11-05 12:59   
Please review branch CR31125_1.

http://jenkins-test-12.nnov.opencascade.com/view/CR31125_1-master-OAN/view/COMPARE/ [^]
(0088731)
msv   
2019-11-05 16:10   
Reviewed.
(0088766)
bugmaster   
2019-11-07 10:44   
Tested in framework of WEEK-45

Combination -
OCCT branch : WEEK-45
master SHA - a1a9b249523438cf9b3d510fb4ff74bd4a5675b6
5f5b1aed1c6e139bbd34314eca77ae7abcd8895c
Products branch : WEEK-45 SHA - f88bc93e3637c4c42f3c154c0b0e167d4e297ae6
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 16844.70000000007 / 16848.430000000117 [-0.02%]
Products
Total CPU difference: 10837.970000000065 / 10873.690000000062 [-0.33%]
Windows-64-VC14:
OCCT
Total CPU difference: 18366.671875 / 18319.515625 [+0.26%]
Products
Total CPU difference: 12848.578125 / 12848.859375 [-0.00%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0088837)
git   
2019-11-10 11:41   
Branch CR31125_1 has been deleted by inv.

SHA-1: 04616bb4a334902f4701e10e7f9ec3f039c0bb43