MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0028118Community[OCCT] OCCT:Meshpublic2016-11-17 04:272016-12-09 16:39
Reporterthomhong 
Assigned Toabv 
PriorityhighSeveritymajor 
StatusclosedResolutionfixed 
PlatformWindowsOSVC++ 2015OS Version64 bit
Product Version[OCCT] 6.6.0 
Target Version[OCCT] 7.1.0Fixed in Version[OCCT] 7.1.0 
Summary0028118: Mesh generation hangs then crashes
DescriptionCould be a STEP importer issue - mesh generation hangs when generating a mesh for a particular STEP file.
Steps To ReproduceOpen attached STEP file in Windows ImportExport sample (tested with 6.9.1) - display tessalation hangs until application crashes.


pload MODELING VISUALIZATION DATAEXCHANGE
testreadstep 18547.stp s
vclear
vinit View1
vdefaults -autoTriang off
vdisplay s
vfit
incmesh s 0.1 -relative
vsetdispmode 1
trinfo s

TagsNo tags attached.
Test case numberbugs mesh bug28118
Attached Files? file icon 18547.stp (491,547 bytes) 2016-11-17 04:27
png file icon occt_654.png (25,622 bytes) 2016-11-17 10:03
png file icon face_128.png (23,943 bytes) 2016-11-22 19:24
? file icon face_128.brep (48,042 bytes) 2016-11-22 19:25

- Relationships
parent of 0028144newgka Open CASCADE Step reader - regression in comparison of version OCCT654 
Not all the children of this issue are yet resolved or closed.

-  Notes
(0060475)
abv (manager)
2016-11-17 08:28

The problem is reproduced in latest CAD Assistant 0.8 and in OCCT 7.1.0.beta DRAW:

pload DATAEXCHANGE MODELING
stepread 18547.stp a *
incmesh a_1 0.1

Note that both applications exited without any error message...

Please investigate
(0060684)
epa (developer)
2016-11-22 16:48

The described problem contains two parts:
* not correct reading of data from step file(see bug28144)
* stack overflow in the Mesh caused incorrect reading of data from file( will be investigated in the frame of the current bug and fixed, if possible)
(0060687)
gka (developer)
2016-11-22 19:23

Face 128 read from entity 507 is valid. But AXON viewer shows this face as invalid. Please see attached image.
This due to that first edge in the face based on the periodic curve has range -1.31441524331422e-011 0.214529066155427.
(0060740)
epa (developer)
2016-11-23 17:25

It looks that main problem is caused by incorrect intervals method on periodic bspline curve. The parameters of intervals are incorrect. See BRepMesh_EdgeTessellator::BRepMesh_EdgeTessellator->BRepMesh_GeomTool(for intervals)

During the tessellation of incorrect curve we obtain 90K points which causes stack overflow in UBTree selector.

Concerning the BRepMesh, the following issues found:
1) it looks tessellation of Bspline curve called twice. See BRepMesh_EdgeTessellator::BRepMesh_EdgeTessellator.

2) when we check 2d-3d triangulation on edge it can add number of points for (split interval between points up to 10 iterations). It is proposed to limit to 8 (to have not more than 256*original number of points). See the function BRepMesh_EdgeTessellator::splitSegment
(0060741)
oan (developer)
2016-11-23 17:50

DC,

I suggest to avoid such solutions and magic numbers (why 8? why 256?). It is supposed that this functionality was being added in order to fix some troubles of GCPnts_TangentialDeflection in the past. Please note that at this moment, GCPnts_TangentialDeflection implements more intelligent approach to process BSpline curves. Like this, there is a possiblity that we can use it directly without extra patches and try to remove redundant code thus simplify the component.

Note that it is already done in context of #26106 and the problem is not reproduced anymore using that patch without limitation to 8. I suggest to finalize the patch instead of making suspicious solutions.
(0060742)
git (administrator)
2016-11-23 17:59

Branch CR28118 has been created by gka.

SHA-1: c321fc078c700cdd93954d31a294ed3bede8c5e0


Detailed log of new commits:

Author: gka
Date: Wed Nov 23 17:58:45 2016 +0300

    0028118: Mesh generation hangs then crashes
    
    Protection against hangs of mesh and crash(made by epa)
(0060743)
epa (developer)
2016-11-23 18:03

Branch CR28118 is ready for review
(0060744)
pdn (developer)
2016-11-23 18:07

The protection is OK, but I agree, that double tessellation of BSplines to be removed (to create dedicated issue).
(0060748)
git (administrator)
2016-11-23 19:28

Branch CR28118 has been updated by apn.

SHA-1: f5b4805e04835c8f97dda2f93ef091f86a3c0574


Detailed log of new commits:

Author: apn
Date: Wed Nov 23 19:28:46 2016 +0300

    Added test case bugs/mesh/bug28118

(0061300)
git (administrator)
2016-12-07 11:31

Branch CR28118 has been deleted by kgv.

SHA-1: f5b4805e04835c8f97dda2f93ef091f86a3c0574

- Related Changesets
occt: master cde381c4
Timestamp: 2016-11-23 16:31:02
Author: abv
Committer: abv
Details ] Diff ]
0028118: Mesh generation hangs then crashes

Protection against hangs of mesh and crash(made by epa)
Added test case bugs/mesh/bug28118
Tests mesh* standard_* W7 are corrected (TODO removed)
mod - src/BRepMesh/BRepMesh_EdgeTessellator.cxx Diff ] File ]
add - tests/bugs/mesh/bug28118 Diff ] File ]
mod - tests/mesh/data/standard/W7 Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-11-17 04:27 thomhong New Issue
2016-11-17 04:27 thomhong Assigned To => oan
2016-11-17 04:27 thomhong File Added: 18547.stp
2016-11-17 08:28 abv Note Added: 0060475
2016-11-17 08:28 abv Status new => assigned
2016-11-17 08:28 abv Target Version => 7.1.0
2016-11-17 08:29 abv Priority normal => high
2016-11-17 09:59 kgv Steps to Reproduce Updated View Revisions
2016-11-17 10:03 kgv Product Version 6.9.1 => 6.6.0
2016-11-17 10:03 kgv File Added: occt_654.png
2016-11-21 17:56 abv Assigned To oan => epa
2016-11-22 16:48 epa Note Added: 0060684
2016-11-22 19:23 gka Note Added: 0060687
2016-11-22 19:23 gka Assigned To epa => kgv
2016-11-22 19:24 gka File Added: face_128.png
2016-11-22 19:25 gka File Added: face_128.brep
2016-11-22 19:25 gka Assigned To kgv => epa
2016-11-22 23:25 abv Relationship added parent of 0028144
2016-11-23 13:49 abv Target Version 7.1.0 => 7.2.0
2016-11-23 17:25 epa Note Added: 0060740
2016-11-23 17:50 oan Note Added: 0060741
2016-11-23 17:59 git Note Added: 0060742
2016-11-23 18:03 epa Note Added: 0060743
2016-11-23 18:03 epa Assigned To epa => pdn
2016-11-23 18:03 epa Status assigned => resolved
2016-11-23 18:07 pdn Note Added: 0060744
2016-11-23 18:07 pdn Status resolved => reviewed
2016-11-23 18:07 pdn Target Version 7.2.0 => 7.1.0
2016-11-23 19:28 git Note Added: 0060748
2016-11-23 19:49 apn Test case number => bugs mesh bug28118
2016-11-24 15:52 abv Changeset attached => occt master cde381c4
2016-11-24 15:52 abv Assigned To pdn => abv
2016-11-24 15:52 abv Status reviewed => verified
2016-11-24 15:52 abv Resolution open => fixed
2016-12-07 11:31 git Note Added: 0061300
2016-12-09 16:29 user533 Status verified => closed
2016-12-09 16:39 user533 Fixed in Version => 7.1.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker