View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032279 | Open CASCADE | OCCT:DRAW | public | 2021-04-02 19:16 | 2021-05-29 13:12 |
Reporter | kgv | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.5.0 | ||||
Target Version | 7.6.0 | Fixed in Version | 7.6.0 | ||
Summary | 0032279: Draw Harness - protect incmesh from hanging on syntax error | ||||
Description | Passing the following input to incmesh:psphere s 1 incmesh s 0.008 -a 0 and psphere s1 1 psphere s2 1 psphere s3 1 incmesh s1 s2 s3 0.008 doesn't raise any errors and instead leads to infinite loop due to passing 0 as deflection parameters. It is desired improving BRepMesh to raise exception on obviously invalid input parameters (<=0, though alternative might be clamping too small values to some reasonable lower limit), as well as incmesh to better validate input parameters. | ||||
Steps To Reproduce | Not required | ||||
Tags | No tags attached. | ||||
Test case number | Not required | ||||
|
Solution elaboration, Testing |
|
Branch CR32279 has been created by mkrylova. SHA-1: 87d3d391d071ac0139b5360609bbe545824f97ba Detailed log of new commits: Author: mkrylova Date: Tue May 18 13:51:22 2021 +0300 0032279: Draw Harness - protect incmesh from hanging on syntax error - improved incmesh to raise exception on obviously invalid input parameters - added possibility to operate multiple objects |
|
TCollection_AsciiString aName = aNamesOfShapes.Value (anIter); TopoDS_Shape aShape = DBRep::Get (aName); if (aShape.IsNull()) { di << " Null shapes are not allowed here\n"; continue; } Please move this code to "for (Standard_Integer anArgIter = 1; anArgIter < nbarg; ++anArgIter)" loop, so that NCollection_Sequence<TCollection_AsciiString> aNamesOfShapes could be replaced by TopoDS_ListOfShape. for (Standard_Integer anIter = 1; anIter <= aNamesOfShapes.Length(); ++anIter) { Please don't call meshing tool for each shape individually - make a TopoDS_Compound instead if there are more than 1 shape in input. di << " Null shapes are not allowed here\n"; continue; This should be an error within "return 1" result. if (aVal <= Precision::Confusion()) { di << "Syntax error: invalid input parameter '" << argv[anArgIter] << "'"; return 1; } Please try also embedding such checks into the algorithm itself (throwing Standard_NumericError or similar). |
|
Branch CR32279 has been updated by mkrylova. SHA-1: 822f12a1b163460e33d652b0843f7a927ac87042 Detailed log of new commits: Author: mkrylova Date: Wed May 19 19:42:13 2021 +0300 # kgv remarks - fixed remarks - added checking for too small values in BrepMesh algorithm |
|
Branch CR32279_1 has been created by mkrylova. SHA-1: 7c18980f0667f178d20be67e77f9e03e9478acc0 Detailed log of new commits: Author: mkrylova Date: Tue May 18 13:51:22 2021 +0300 0032279: Draw Harness - protect incmesh from hanging on syntax error - improved incmesh to raise exception on invalid input parameters - added possibility to operate multiple objects - added checking for too small values in BrepMesh algorithm |
|
Fixing remarks, Testing |
|
Branch CR32279_1 has been updated by mkrylova. SHA-1: b5618780a09a6eef0c7216b41453bbafeff519aa Detailed log of new commits: Author: mkrylova Date: Thu May 20 12:59:28 2021 +0300 # kgv remarks - fixed remarks |
|
Branch CR32279_2 has been created by mkrylova. SHA-1: cae9667d198ac0518e452d6f4b02b22275ed99ea Detailed log of new commits: Author: mkrylova Date: Tue May 18 13:51:22 2021 +0300 0032279: Draw Harness - protect incmesh from hanging on syntax error - improved incmesh to raise exception on invalid input parameters - added possibility to operate multiple objects - added checking for too small values in BrepMesh algorithm |
|
Branch CR32279_2 has been updated by mkrylova. SHA-1: 608c527a3cb81613579f5fa490abdc259efbf412 Detailed log of new commits: Author: mkrylova Date: Thu May 20 16:16:15 2021 +0300 # kgv remarks - moved converting values to radians |
|
Branch CR32279_3 has been created by mkrylova. SHA-1: 7a2b4e01c0454cd00a2ef4469e2b68b5ff6b6465 Detailed log of new commits: Author: mkrylova Date: Tue May 18 13:51:22 2021 +0300 0032279: Draw Harness - protect incmesh from hanging on syntax error - improved incmesh to raise exception on invalid input parameters - added possibility to operate multiple objects - added checking for too small values in BrepMesh algorithm |
|
Solution implementation |
|
Branch CR32279_3 has been updated forcibly by mkrylova. SHA-1: a230498076e1a2550280eea127876e6c7c3b7488 |
|
Branch CR32279_4 has been created by mkrylova. SHA-1: bc7e8fcb183852ca29f4814d9930c08b344db5e6 Detailed log of new commits: Author: mkrylova Date: Tue May 18 13:51:22 2021 +0300 0032279: Draw Harness - protect incmesh from hanging on syntax error - improved incmesh to raise exception on invalid input parameters - added possibility to operate multiple objects - added checking for too small values in BrepMesh algorithm |
|
Solution implementation, Testing |
|
http://jenkins-test-occt/view/CR32279_4-master-MKRYLOVA/view/ALL/ |
|
- const Standard_Real aDeflection = GetDeflection (theShape, theDrawer); + const Standard_Real aDeflection = Max (GetDeflection (theShape, theDrawer), Precision::Confusion()); Could you please share a specific test case (preferably localized) which triggers this issue? Does GetDeflection() returns 0.0 in this case of value between 0 and Precision::Confusion()? In the latter case, I guess that it would be better clamping computed within GetDeflection() method, or change Incmesh checks to protect from 0.0 instead of Precision::Confusion(). |
|
It triggered in the bugs/caf/bug26293_2 test http://occt-tests/CR32279_3-master-MKRYLOVA-OCCT/Windows-64-VC14/bugs/caf/bug26293_2.html. The GetDeflection() method returned a value much less than Precision::Confusion (), so an error was triggered from BRepMesh_IncrementalMesh |
|
Please update method Prs3d::GetDeflection() to clamp output value instead of currently modified place:static Standard_Real GetDeflection (const Graphic3d_Vec3d& theBndMin, const Graphic3d_Vec3d& theBndMax, const Standard_Real theDeviationCoefficient) { const Graphic3d_Vec3d aDiag = theBndMax - theBndMin; return Max (aDiag.maxComp() * theDeviationCoefficient * 4.0, Precision::Confusion()); } |
|
Branch CR32279_4 has been updated by mkrylova. SHA-1: f2962f70d2012bb4d1c6a8e86dd8fc2cd03c9d27 Detailed log of new commits: Author: mkrylova Date: Fri May 28 14:22:37 2021 +0300 # kgv remarks |
|
Branch CR32279_5 has been created by mkrylova. SHA-1: 84c723db83b193fc663cbb6fedb303492714ebb4 Detailed log of new commits: Author: mkrylova Date: Tue May 18 13:51:22 2021 +0300 0032279: Draw Harness - protect incmesh from hanging on syntax error - improved incmesh to raise exception on invalid input parameters - added possibility to operate multiple objects - added checking for too small values in BrepMesh algorithm |
|
Please raise corrected patch - OCCT: branch CR32279_5. |
|
Solution implementation |
|
Combination - OCCT branch : IR-2021-05-28 master SHA - 2315a044240803013da63dd2f5209c739ab03727 a87b7ddc8cb44606b91e3f37113847c3f5f50fdc Products branch : IR-2021-05-28 SHA - 2131ac830b9e3c707d427f2aac9c50dcfa5c74db 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: 17574.5700000004 / 17867.41000000037 [-1.64%] Products Total CPU difference: 11533.700000000124 / 11535.680000000108 [-0.02%] Windows-64-VC14: OCCT Total CPU difference: 19393.5625 / 19367.75 [+0.13%] Products Total CPU difference: 12891.8125 / 12920.9375 [-0.23%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR32279 has been deleted by mnt. SHA-1: 822f12a1b163460e33d652b0843f7a927ac87042 |
|
Branch CR32279_1 has been deleted by mnt. SHA-1: b5618780a09a6eef0c7216b41453bbafeff519aa |
|
Branch CR32279_2 has been deleted by mnt. SHA-1: 608c527a3cb81613579f5fa490abdc259efbf412 |
|
Branch CR32279_3 has been deleted by mnt. SHA-1: a230498076e1a2550280eea127876e6c7c3b7488 |
|
Branch CR32279_4 has been deleted by mnt. SHA-1: f2962f70d2012bb4d1c6a8e86dd8fc2cd03c9d27 |
|
Branch CR32279_5 has been deleted by mnt. SHA-1: 84c723db83b193fc663cbb6fedb303492714ebb4 |
occt: master 2315a044 2021-05-18 10:51:22
Committer: bugmaster Details Diff |
0032279: Draw Harness - protect incmesh from hanging on syntax error - improved incmesh to raise exception on invalid input parameters - added possibility to operate multiple objects - added checking for too small values in BrepMesh algorithm |
Affected Issues 0032279 |
|
mod - src/BRepMesh/BRepMesh_IncrementalMesh.hxx | Diff File | ||
mod - src/MeshTest/MeshTest.cxx | Diff File | ||
mod - src/Prs3d/Prs3d.hxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-04-02 19:16 | kgv | New Issue | |
2021-04-02 19:16 | kgv | Assigned To | => abv |
2021-04-02 19:17 | kgv | Assigned To | abv => mkrylova |
2021-04-02 19:17 | kgv | Status | new => assigned |
2021-05-18 12:10 | kgv | Description Updated | |
2021-05-18 17:59 |
|
Note Added: 0101155 | |
2021-05-19 13:40 | git | Note Added: 0101174 | |
2021-05-19 13:41 |
|
Assigned To | mkrylova => kgv |
2021-05-19 13:41 |
|
Status | assigned => resolved |
2021-05-19 13:41 |
|
Steps to Reproduce Updated | |
2021-05-19 14:53 | kgv | Note Added: 0101177 | |
2021-05-19 14:53 | kgv | Assigned To | kgv => mkrylova |
2021-05-19 14:53 | kgv | Status | resolved => assigned |
2021-05-20 11:08 | git | Note Added: 0101196 | |
2021-05-20 11:13 | git | Note Added: 0101197 | |
2021-05-20 11:15 |
|
Assigned To | mkrylova => kgv |
2021-05-20 11:15 |
|
Status | assigned => resolved |
2021-05-20 11:16 |
|
Note Added: 0101198 | |
2021-05-20 12:03 | kgv | Assigned To | kgv => mkrylova |
2021-05-20 12:03 | kgv | Status | resolved => assigned |
2021-05-20 12:59 | git | Note Added: 0101201 | |
2021-05-20 13:02 | git | Note Added: 0101202 | |
2021-05-20 13:12 |
|
Assigned To | mkrylova => kgv |
2021-05-20 13:12 |
|
Status | assigned => resolved |
2021-05-20 13:55 | kgv | Assigned To | kgv => mkrylova |
2021-05-20 13:55 | kgv | Status | resolved => assigned |
2021-05-20 16:15 | git | Note Added: 0101213 | |
2021-05-20 16:17 | git | Note Added: 0101214 | |
2021-05-21 11:30 |
|
Note Added: 0101228 | |
2021-05-24 12:07 |
|
Note Edited: 0101228 | |
2021-05-24 17:50 | git | Note Added: 0101332 | |
2021-05-24 17:51 | git | Note Added: 0101333 | |
2021-05-24 18:42 |
|
Note Added: 0101336 | |
2021-05-25 18:34 |
|
Note Added: 0101362 | |
2021-05-25 18:34 |
|
Assigned To | mkrylova => kgv |
2021-05-25 18:34 |
|
Status | assigned => resolved |
2021-05-26 11:44 | kgv | Note Added: 0101381 | |
2021-05-26 11:44 | kgv | Assigned To | kgv => mkrylova |
2021-05-26 11:44 | kgv | Status | resolved => assigned |
2021-05-27 11:27 |
|
Note Added: 0101419 | |
2021-05-27 17:45 | kgv | Note Added: 0101430 | |
2021-05-28 14:22 | git | Note Added: 0101447 | |
2021-05-28 14:23 | git | Note Added: 0101448 | |
2021-05-28 16:28 | kgv | Note Added: 0101453 | |
2021-05-28 16:28 | kgv | Assigned To | mkrylova => bugmaster |
2021-05-28 16:28 | kgv | Status | assigned => resolved |
2021-05-28 16:28 | kgv | Status | resolved => reviewed |
2021-05-28 18:15 |
|
Note Added: 0101462 | |
2021-05-29 12:03 | bugmaster | Note Added: 0101478 | |
2021-05-29 12:03 | bugmaster | Status | reviewed => tested |
2021-05-29 12:09 | bugmaster | Test case number | => Not required |
2021-05-29 12:12 | bugmaster | Changeset attached | => occt master 2315a044 |
2021-05-29 12:12 | bugmaster | Status | tested => verified |
2021-05-29 12:12 | bugmaster | Resolution | open => fixed |
2021-05-29 13:12 | git | Note Added: 0101487 | |
2021-05-29 13:12 | git | Note Added: 0101488 | |
2021-05-29 13:12 | git | Note Added: 0101489 | |
2021-05-29 13:12 | git | Note Added: 0101490 | |
2021-05-29 13:12 | git | Note Added: 0101491 | |
2021-05-29 13:12 | git | Note Added: 0101492 |