View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032744 | Open CASCADE | OCCT:Modeling Algorithms | public | 2021-12-20 11:22 | 2023-03-19 19:18 |
Reporter | Assigned To | ||||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.6.3 | Fixed in Version | 7.6.3 | ||
Summary | 0032744: Modeling Algorithms - Endless loop in GCPnts_UniformDeflection | ||||
Description | To reproduce memory leak and endless loop inside GCPnts_UniformDeflection constructor it’s enough to read bad_edge.brep by BRepTools::Read() function. To find out why such “valid“ edges are produced by JTCAFControl_Reader converter, you can read JT file and transfer it to TDocStd_Documen document and then iterate through gotten shapes checking each edge by GCPnts_UniformDeflection algorithm. | ||||
Steps To Reproduce | TopoDS_Compound comp; BRep_Builder builder; BRepTools::Read(comp, "/path/to/bad_edge.brep", builder); BRepCheck_Analyzer analyzer(comp); if (analyzer.IsValid()) { TopTools_IndexedMapOfShape edges; TopExp::MapShapes(comp, TopAbs_EDGE, edges); for (auto edgeNum = 1; edgeNum <= edges.Extent(); ++edgeNum) { auto edge = TopoDS::Edge(edges(edgeNum)); Standard_Real firstParam = 0., lastParam = 0.; auto pCurve = BRep_Tool::Curve(edge, firstParam, lastParam); GeomAdaptor_Curve curveAdaptor(pCurve, firstParam, lastParam); GCPnts_UniformDeflection uniformAbs(curveAdaptor, 0.001, firstParam, lastParam); // <= endless loop and memory leak inside } } | ||||
Additional information and documentation updates | From TSYS-16-006 | ||||
Tags | No tags attached. | ||||
Test case number | bugs/modalg_7/bug32744 | ||||
2021-12-20 11:22 reporter |
bad_edge.brep (84,011 bytes) |
|
Branch CR32744 has been created by asuraven. SHA-1: c8316186a1ff7d7522d8290e2c130d9fe539ff3b Detailed log of new commits: Author: asuraven Date: Mon Dec 20 19:27:09 2021 +0300 0032744: Modeling Algorithms - Memory leak in GCPnts_UniformDeflection fixed CPnts_UniformDeflection::More() |
|
Branch CR32744 has been updated forcibly by asuraven. SHA-1: 15442d43d6694498158e418cce9f5256684d29c3 |
|
In this extremal case the parameter increment in CPnts_UniformDeflection::Perform() is less than the parameter's value precision. For this reason, the parameter value has not been changed, the loop becomes endless. Tests results are here: http://jenkins-test-occt.nnov.opencascade.com/view/CR32744-master-ASURAVEN/view/COMPARE/ Unstable cases are different for win & Linux platforms and seems like not related to this issue |
|
myFirstParam == myFirstParam + myDu; It is better using myDu < Epsilon (myFirstParam) |
|
About test case, it is better to read the shape using standard restore command and pass to the test command the shape instead of file name. |
|
Branch CR32744 has been updated forcibly by asuraven. SHA-1: 2c3909764ef20f326bc6381be49e181ed41f571f |
|
Branch CR32744 has been updated forcibly by asuraven. SHA-1: 29136f4b06af019f4b2d59b7fe33a27e0b98ccb1 |
|
remarks fixed. tests results: http://jenkins-test-occt.nnov.opencascade.com/view/CR32744-master-ASURAVEN/view/COMPARE/ |
|
Branch CR32744 has been updated forcibly by asuraven. SHA-1: ae66270d19dfd58b7218877127ca5546802d34fd |
|
myFirstParam += myDu; myFinish = myLastParam - myFirstParam < myTolCur || Abs(myDu) < myTolCur || // to avoid less than double precision endless increment myDu < Epsilon (myFirstParam); Please compute the value of Epsilon (myFirstParam) before entering the loop. It must be invariant. else if (aShape.ShapeType() != TopAbs_EDGE) { theDi << " Shape type must be EDGE\n"; return 1; } const TopoDS_Edge& anEdge = *(TopoDS_Edge*) &aShape; Use the method TopoDS:Edge() for safe downcasting of a shape to edge. After that just check the cast result for null shape. |
|
Branch CR32744 has been updated forcibly by asuraven. SHA-1: 273e94c8a30a9a4dd969adf55a11e1c5ab56e4a7 |
|
fixed |
|
Branch CR32744 has been updated forcibly by asuraven. SHA-1: c6c7b0b83c620e8473a1b22d65e8937fbc7d9dee |
|
For integration: occt - CR32744 products - none |
|
Combination - OCCT branch : IR-2021-12-30 master SHA - 16a263dc17600ac13a5110bd7028ba558d1a0700 49e51745631c52b6c452c65adae4d6dfa21a1b1e Products branch : IR-2021-12-30 SHA - fe496634abbd6a631b6f674703746ef8605cfe87 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: 18220.12000000046 / 18175.980000000385 [+0.24%] Products Total CPU difference: 11659.240000000125 / 11591.590000000113 [+0.58%] Windows-64-VC14: OCCT Total CPU difference: 19997.15625 / 19974.59375 [+0.11%] Products Total CPU difference: 13120.265625 / 13088.65625 [+0.24%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR32744 has been deleted by mnt. SHA-1: c6c7b0b83c620e8473a1b22d65e8937fbc7d9dee |
occt: master 2ac4e1be 2021-12-20 19:27:09
Committer: |
0032744: Modeling Algorithms - Endless loop in GCPnts_UniformDeflection fixed finish criteria in CPnts_UniformDeflection::Perform() |
Affected Issues 0032744 |
|
mod - src/CPnts/CPnts_UniformDeflection.cxx | Diff File | ||
mod - src/QABugs/QABugs_20.cxx | Diff File | ||
add - tests/bugs/modalg_7/bug32744 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-12-20 11:22 |
|
New Issue | |
2021-12-20 11:22 |
|
Assigned To | => asuraven |
2021-12-20 11:22 |
|
File Added: bad_edge.brep | |
2021-12-20 19:27 | git | Note Added: 0106116 | |
2021-12-20 19:35 |
|
Time allocated | 20.12.2021: 8 h. => set |
2021-12-21 12:00 |
|
Summary | Modeling Algorithms - Memory leak in GCPnts_UniformDeflection => Modeling Algorithms - Endless loop in GCPnts_UniformDeflection |
2021-12-21 12:00 |
|
Description Updated | |
2021-12-21 12:00 |
|
Steps to Reproduce Updated | |
2021-12-21 13:33 | git | Note Added: 0106126 | |
2021-12-21 14:30 |
|
Time allocated | 21.12.2021: 4 h. => set |
2021-12-21 16:20 |
|
Assigned To | asuraven => msv |
2021-12-21 16:20 |
|
Status | new => resolved |
2021-12-21 16:20 |
|
Note Added: 0106130 | |
2021-12-21 18:38 |
|
Note Added: 0106134 | |
2021-12-21 18:38 |
|
Assigned To | msv => asuraven |
2021-12-21 18:38 |
|
Status | resolved => assigned |
2021-12-21 18:43 |
|
Note Added: 0106135 | |
2021-12-22 12:52 | git | Note Added: 0106138 | |
2021-12-22 12:53 |
|
Time allocated | 22.12.2021: 2 h. => set |
2021-12-22 14:43 | git | Note Added: 0106148 | |
2021-12-22 19:04 |
|
Time allocated | 22.12.2021: 2 h. => set |
2021-12-22 20:18 |
|
Assigned To | asuraven => msv |
2021-12-22 20:18 |
|
Status | assigned => resolved |
2021-12-22 20:18 |
|
Note Added: 0106154 | |
2021-12-23 10:31 | git | Note Added: 0106162 | |
2021-12-27 15:17 |
|
Assigned To | msv => asuraven |
2021-12-27 15:17 |
|
Status | resolved => assigned |
2021-12-27 15:17 |
|
Note Added: 0106216 | |
2021-12-27 16:10 | git | Note Added: 0106217 | |
2021-12-27 16:11 |
|
Assigned To | asuraven => msv |
2021-12-27 16:11 |
|
Status | assigned => resolved |
2021-12-27 16:11 |
|
Note Added: 0106218 | |
2021-12-27 16:11 |
|
Time allocated | 27.12.2021: 1 h. => set |
2021-12-27 17:17 | git | Note Added: 0106219 | |
2021-12-27 17:20 |
|
Assigned To | msv => bugmaster |
2021-12-27 17:20 |
|
Status | resolved => reviewed |
2021-12-27 17:20 |
|
Note Added: 0106220 | |
2021-12-31 12:49 |
|
Status | reviewed => tested |
2021-12-31 12:49 |
|
Note Added: 0106252 | |
2021-12-31 12:50 |
|
Test case number | => bugs/modalg_7/bug32744 |
2022-01-02 13:24 |
|
Changeset attached | => occt master 2ac4e1be |
2022-01-02 13:24 |
|
Assigned To | bugmaster => asuraven |
2022-01-02 13:24 |
|
Status | tested => verified |
2022-01-02 13:24 |
|
Resolution | open => fixed |
2022-01-02 13:36 | git | Note Added: 0106258 | |
2022-06-19 16:23 |
|
Target Version | 7.7.0 => 7.6.3 |
2023-03-19 19:18 | vglukhik | Status | verified => closed |
2023-03-19 19:18 | vglukhik | Fixed in Version | => 7.6.3 |