View Issue Details

IDProjectCategoryView StatusLast Update
0033421CommunityOCCT:Modeling Algorithmspublic2023-08-08 14:47
Reporterdipts Assigned Toakaftasev  
PrioritynormalSeveritycrash 
Status verifiedResolutionfixed 
PlatformWindowsOSVC++ 2022 
Product Version7.7.0 
Target Version7.7.3 
Summary0033421: Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception
DescriptionShapeUpgrade_UnifySameDomain throws an access violation exception when accessing an empty edge.
It can happen with certain shapes that none is found when searching for the next edge in the wire. This case is not checked.

My proposed solution is to finally check if the edge is not empty before accessing it, and otherwise abort the algorithm. This at least prevents the exception.
Steps To Reproduce
pcylinder c1 10 10
copy c1 c2
tmirror c2 0 0 10 0 0 1
bop c1 c2
bopfuse c3

unifysamedom result c3

checkshape result

checknbshapes result -t -solid 1 -shell 1 -face 4 -wire 4 -edge 5 -vertex 3
TagsNo tags attached.
Test case number bugs heal bug33421

Attached Files

  • ResultShape_with_break.PNG (16,593 bytes)

Relationships

related to 0033439 new Modeling Algorithms - ShapeUpgrade_UnifySameDomain gives wrong result 

Activities

git

2023-07-04 21:53

administrator   ~0113715

Branch CR33421 has been created by dipts.

SHA-1: 1fe79a9669fd6cdadb90276b25d152e4f56eb64f


Detailed log of new commits:

Author: dipts
Date: Tue Jul 4 20:53:37 2023 +0200

    0033421: Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception
    
    In method ShapeUpgrade_UnifySameDomain::IntUnifyFaces() the searched edge is finally checked that it is not empty before accessing it.

dpasukhi

2023-07-05 00:42

administrator   ~0113716

Dear @akaftasev,
please check the commit and start tests if code is valid.
But I think there is a incorrect behavior - just to return(stop the algorithm). I think just break the loop in this case will be better(null nextEdge probably means end of the wire)

dipts

2023-07-09 17:18

developer   ~0113731

I also tried breaking the loop. The result is an invalid shape. Checkshape also reports some errors (UnorientableShape and NotClosed). I suspect that the input shape contains a constellation that is not handled in the algorithm at all. Although it would be nice if the two cylinder faces would merge, I would like to turn off the crash as a first measure.
ResultShape_with_break.PNG (16,593 bytes)

git

2023-08-01 15:10

administrator   ~0113819

Branch CR33421_1 has been created by andrey.kaftasev_159541.

SHA-1: 0d6a5f0b44bb9b15aacaed2a2641714dfe96d2e3


Detailed log of new commits:

Author: akaftasev
Date: Tue Aug 1 13:10:47 2023 +0100

    0033421: Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception
    
    In method ShapeUpgrade_UnifySameDomain::IntUnifyFaces() the searched edge is finally checked that it is not empty before accessing it.

akaftasev

2023-08-01 17:15

developer   ~0113822

Last edited: 2023-08-02 11:21

Please, integrate branch:
OCCT - CR33421_1
Products - NONE

Results of testing:
http://jenkins-test-10.nnov.opencascade.com/view/CR33421-master-akaftasev/view/COMPARE/

jokwajeb

2023-08-08 13:59

administrator   ~0113931

Combination -
OCCT branch : SHA - IR-2023-08-04
Products branch : SHA - master
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:
Ubuntu2004-64:
OCCT
Total CPU difference: 18344.600000000195 / 18390.260000000217 [-0.25%]
Products
Total CPU difference: 12102.810000000003 / 12161.439999999999 [-0.48%]
Windows-64-VC142:
OCCT
Total CPU difference: 20332.1875 / 20298.859375 [+0.16%]
Products
Total CPU difference: 14548.515625 / 14604.578125 [-0.38%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2023-08-08 14:47

administrator   ~0113941

Branch CR33421 has been deleted by mnt.

SHA-1: 1fe79a9669fd6cdadb90276b25d152e4f56eb64f

git

2023-08-08 14:47

administrator   ~0113942

Branch CR33421_1 has been deleted by mnt.

SHA-1: 0d6a5f0b44bb9b15aacaed2a2641714dfe96d2e3

Related Changesets

occt: master eb2be8bb

2023-08-01 15:10:47

akaftasev


Committer: jokwajeb Details Diff
0033421: Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception

In method ShapeUpgrade_UnifySameDomain::IntUnifyFaces() the searched edge is finally checked that it is not empty before accessing it.
Affected Issues
0033421
mod - src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx Diff File
add - tests/bugs/heal/bug33421 Diff File

Issue History

Date Modified Username Field Change
2023-07-04 21:46 dipts New Issue
2023-07-04 21:46 dipts Assigned To => dipts
2023-07-04 21:53 git Note Added: 0113715
2023-07-04 21:55 dipts Assigned To dipts => oan
2023-07-04 21:55 dipts Status new => resolved
2023-07-04 21:55 dipts Steps to Reproduce Updated
2023-07-05 00:39 dpasukhi Assigned To oan => akaftasev
2023-07-05 00:42 dpasukhi Note Added: 0113716
2023-07-05 00:42 dpasukhi Steps to Reproduce Updated
2023-07-05 00:42 dpasukhi Test case number => bugs heal bug33421
2023-07-05 00:44 dpasukhi Steps to Reproduce Updated
2023-07-09 17:18 dipts Note Added: 0113731
2023-07-09 17:18 dipts File Added: ResultShape_with_break.PNG
2023-08-01 14:46 akaftasev Status resolved => assigned
2023-08-01 14:53 akaftasev Relationship added related to 0033439
2023-08-01 14:55 dpasukhi Target Version 7.7.2 => 7.7.3
2023-08-01 15:10 git Note Added: 0113819
2023-08-01 17:14 akaftasev Status assigned => resolved
2023-08-01 17:15 akaftasev Assigned To akaftasev => bugmaster
2023-08-01 17:15 akaftasev Status resolved => reviewed
2023-08-01 17:15 akaftasev Note Added: 0113822
2023-08-02 11:21 akaftasev Note Edited: 0113822
2023-08-08 13:59 jokwajeb Note Added: 0113931
2023-08-08 14:23 jokwajeb Changeset attached => occt master eb2be8bb
2023-08-08 14:23 akaftasev Assigned To bugmaster => akaftasev
2023-08-08 14:23 akaftasev Status reviewed => verified
2023-08-08 14:23 akaftasev Resolution open => fixed
2023-08-08 14:47 git Note Added: 0113941
2023-08-08 14:47 git Note Added: 0113942