View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026064 | Community | OCCT:Modeling Algorithms | public | 2015-04-13 13:19 | 2015-05-14 16:35 |
Reporter | shoogen | Assigned To | bugmaster | ||
Priority | high | Severity | major | ||
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Debian 6.0 | ||
Product Version | 6.8.0 | ||||
Target Version | 6.9.0 | Fixed in Version | 6.9.0 | ||
Summary | 0026064: distmini of two edges locks up | ||||
Description | When requesting the distmini of the attached shapes, the application locks up. Form a user perspective this results in crashing the application. We use the function in the GUI to provide snapping on shape intersections. So (for us) it would be helpful to abort the extrema operation. | ||||
Steps To Reproduce | pload MODELING restore dist1-s1.brep s1 restore dist1-s2.brep s2 distmini d s1 s2 | ||||
Additional information and documentation updates | #0 0x00007fb9a2a06183 in TCollection_BaseSequence::Find (this=0x7ffebf3f0620, Index=9743) at occt/src/TCollection/TCollection_BaseSequence.cxx:351 0000001 0x00007fb9a29fc924 in TColStd_SequenceOfReal::ChangeValue (this= 0x7ffebf3f0620, Index=9743) at occt/inc/TCollection_Sequence.gxx:135 0000002 0x00007fb9a2ee96b6 in TColStd_SequenceOfReal::operator() (this= 0x7ffebf3f0620, Index=9743) at occt/inc/TColStd_SequenceOfReal.hxx:79 #3 0x00007fb996a4fa4b in Extrema_ECC::Perform (this=0x7ffebf3ee5d0) at occt/inc/Extrema_GenExtCC.gxx:190 #4 0x00007fb996a7530b in Extrema_ExtCC::Perform (this=0x7ffebf3ee5d0) at occt/src/Extrema/Extrema_ExtCC.cxx:255 #5 0x00007fb99794e570 in BRepExtrema_ExtCC::Perform (this=0x7ffebf3ee5d0, E1=...) at occt/src/BRepExtrema/BRepExtrema_ExtCC.cxx:68 #6 0x00007fb99794e103 in BRepExtrema_ExtCC::BRepExtrema_ExtCC (this= 0x7ffebf3ee5d0, E1=..., E2=...) at occt/src/BRepExtrema/BRepExtrema_ExtCC.cxx:33 0000007 0x00007fb997949261 in BRepExtrema_DistanceSS::Perform (this= 0x7ffebf3f0c40, S1=..., S2=..., B1=..., B2=...) | ||||
Tags | No tags attached. | ||||
Test case number | bugs modalg_6(011) bug26064 | ||||
|
dist1-s1.brep (664 bytes) |
|
dist1-s2.brep (1,610 bytes) |
|
I got problems to reproduce the problem in a release build. |
|
Branch CR26064 has been created by abv. SHA-1: 78d46f8c809cbb49a0a3a4b8db8d2cdb4a6f61ff Detailed log of new commits: Author: abv Date: Tue Apr 14 06:29:41 2015 +0300 0026064: distmini of two edges locks up Method Extrema_GenExtCC::Perform() refactored to avoid very inefficient (O(N^2)) algorithm of removal of duplicate points at the end. Instead, duplications are checked when new points are added. Fields are initialized in constructors of the class Extrema_GenExtCC; unused instances of generic classes (duplications) ELCC and ELCC2d removed. Test case bugs/modalg_6/bug26064 added. |
|
The reason of hang up is that on these two parallel edges algorithm finds 49377 extrema points, and then hangs in code intended to remove duplications in this sequence (O(N^3)). Partial fix integrated in CR26064 removes this inefficiency, however it is still very slow (46 sec on i7-4790) and still finds 49377 solutions... Please review and consider possible improvement to avoiod that many solutions |
|
Branch CR26064 has been updated by msv. SHA-1: 4fcd0f9fbd5fae5d239bea1b6e652bf3551bf582 Detailed log of new commits: Author: msv Date: Tue Apr 14 16:55:30 2015 +0300 Some more minor code optimizations. |
|
I have made some more minor code optimizations. Please review. |
|
This patch is just a quick solution. It is needed to review the code in order to not return a tons of solution points in the case of parallel curves, instead the algorithm must set the flag IsParallel and return only the distance. For this revision a new issue will be created. |
|
Reviewed. Please test. |
|
As for test case, I suggest inserting a cpulimit command to restrict the time of distmini for this case. A reasonable value of cpulimit is 120 sec. |
|
Mikhail, I believe that default value of cpulimit (1000) is more appropriate, considering case of running Debug builds on slow machines |
|
OK. |
|
Dear BugMaster, Branch CR26064 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested. SHA-1: 4fcd0f9fbd5fae5d239bea1b6e652bf3551bf582 Number of compiler warnings: occt component: Linux: 18 (18 on master) Windows: 0 (0 on master) products component: Linux: 4 (4 on master) Windows: 0 (0 on master) Regressions/Differences: http://occt-tests/CR26064-master-occt-64/Debian60-64/summary.html http://occt-tests/CR26064-master-occt-64/Windows-64-VC10/summary.html bugs modalg_1(006) buc60942 bugs modalg_5(010) bug23706_10, bug23706_11, bug23706_13 bugs moddata(012) buc60890 Testing on Linux: Total MEMORY difference: 94160450 / 94297594 [-0.15%] Total CPU difference: 50177.73999999968 / 56190.019999999706 [-10.70%] Testing on Windows: Total MEMORY difference: 57129384 / 57127079 [+0.00%] Total CPU difference: 16736.754486198774 / 15975.563206798899 [+4.76%] |
|
Branch CR26064_1 has been created by abv. SHA-1: 4f1549076d552ded9785b540114f522dd9011760 Detailed log of new commits: Author: abv Date: Wed Apr 15 22:40:58 2015 +0300 0026064: distmini of two edges locks up Method Extrema_GenExtCC::Perform() refactored to avoid very inefficient (O(N^2)) algorithm of removal of duplicate points at the end. Instead, duplications are checked when new points are added. Fields are initialized in constructors of the class Extrema_GenExtCC; unused instances of generic classes (duplications) ELCC and ELCC2d removed. Test case bugs/modalg_6/bug26064 added. |
|
It was my stupid error with wrong index variable used in the cycle... |
|
Fix pushed to CR26064_1, please re-test |
|
Branch CR26064_1 has been updated forcibly by apv. SHA-1: edbb57b9b3e8e4cc222cd9da3b4efafba61c6961 |
|
Branch CR26064_1 has been rebased on the current master |
|
Branch CR26064_1 has been updated forcibly by apv. SHA-1: e02bfc0944e37ef28bc570d73e2df0e7b63b9d10 |
|
Branch CR26064_1 has been rebased on the current master |
|
Dear BugMaster, Branch CR26041_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested. SHA-1: e02bfc0944e37ef28bc570d73e2df0e7b63b9d10 Number of compiler warnings: occt component: Linux: 18 (18 on master) Windows: 0 (0 on master) products component: Linux: 4 (4 on master) Windows: 0 (0 on master) Regressions/Differences: Not detected Testing cases: bugs modalg_6(011) bug26064 - OK http://occt-tests/CR26064-1-master-occt-64/Debian60-64/bugs/modalg_6/bug26064.html http://occt-tests/CR26064-1-master-occt-64/Windows-64-VC10/bugs/modalg_6/bug26064.html Testing on Linux: Total MEMORY difference: 94708137 / 94533326 [+0.18%] Total CPU difference: 52265.21999999937 / 51017.08999999946 [+2.45%] Testing on Windows: Total MEMORY difference: 57632861 / 57266778 [+0.64%] Total CPU difference: 16346.39318389897 / 15810.99775189897 [+3.39%] |
|
Branch CR26064 has been deleted by inv. SHA-1: 4fcd0f9fbd5fae5d239bea1b6e652bf3551bf582 |
|
Branch CR26064_1 has been deleted by inv. SHA-1: e02bfc0944e37ef28bc570d73e2df0e7b63b9d10 |
occt: master 6ca1fa70 2015-04-15 19:40:58
Committer: bugmaster Details Diff |
0026064: distmini of two edges locks up Method Extrema_GenExtCC::Perform() refactored to avoid very inefficient (O(N^2)) algorithm of removal of duplicate points at the end. Instead, duplications are checked when new points are added. Fields are initialized in constructors of the class Extrema_GenExtCC; unused instances of generic classes (duplications) ELCC and ELCC2d removed. Test case bugs/modalg_6/bug26064 added. |
Affected Issues 0026064 |
|
mod - src/Extrema/Extrema.cdl | Diff File | ||
mod - src/Extrema/Extrema_GenExtCC.cdl | Diff File | ||
mod - src/Extrema/Extrema_GenExtCC.gxx | Diff File | ||
add - tests/bugs/modalg_6/bug26064 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-04-13 13:19 | shoogen | New Issue | |
2015-04-13 13:19 | shoogen | Assigned To | => msv |
2015-04-13 13:19 | shoogen | File Added: dist1-s1.brep | |
2015-04-13 13:19 | shoogen | File Added: dist1-s2.brep | |
2015-04-13 20:44 | shoogen | Note Added: 0039658 | |
2015-04-13 21:42 |
|
Priority | normal => high |
2015-04-13 21:42 |
|
Status | new => assigned |
2015-04-13 21:42 |
|
Target Version | => 6.9.0 |
2015-04-14 06:31 | git | Note Added: 0039659 | |
2015-04-14 06:36 |
|
Note Added: 0039660 | |
2015-04-14 06:36 |
|
Status | assigned => resolved |
2015-04-14 16:55 | git | Note Added: 0039691 | |
2015-04-14 16:56 |
|
Note Added: 0039692 | |
2015-04-14 16:56 |
|
Assigned To | msv => abv |
2015-04-14 17:01 |
|
Note Added: 0039695 | |
2015-04-14 17:40 |
|
Relationship added | related to 0026075 |
2015-04-14 17:58 |
|
Note Added: 0039703 | |
2015-04-14 17:58 |
|
Assigned To | abv => bugmaster |
2015-04-14 17:58 |
|
Status | resolved => reviewed |
2015-04-14 19:05 |
|
Assigned To | bugmaster => apv |
2015-04-15 00:51 |
|
Note Added: 0039729 | |
2015-04-15 10:21 |
|
Note Added: 0039735 | |
2015-04-15 10:48 |
|
Note Added: 0039743 | |
2015-04-15 19:01 |
|
Note Added: 0039811 | |
2015-04-15 19:01 |
|
Assigned To | apv => msv |
2015-04-15 19:01 |
|
Status | reviewed => assigned |
2015-04-16 06:35 | git | Note Added: 0039817 | |
2015-04-16 06:37 |
|
Note Added: 0039818 | |
2015-04-16 06:37 |
|
Status | assigned => resolved |
2015-04-16 06:37 |
|
Note Added: 0039819 | |
2015-04-16 06:37 |
|
Assigned To | msv => bugmaster |
2015-04-16 06:37 |
|
Status | resolved => reviewed |
2015-04-16 12:11 |
|
Assigned To | bugmaster => apv |
2015-04-17 15:53 | git | Note Added: 0039968 | |
2015-04-17 15:54 |
|
Note Added: 0039969 | |
2015-04-24 16:04 | git | Note Added: 0040213 | |
2015-04-24 16:04 |
|
Note Added: 0040214 | |
2015-04-27 13:12 |
|
Note Added: 0040271 | |
2015-04-27 13:12 |
|
Assigned To | apv => bugmaster |
2015-04-27 13:12 |
|
Status | reviewed => tested |
2015-05-05 16:48 |
|
Test case number | => bugs modalg_6(011) bug26064 |
2015-05-07 11:18 | bugmaster | Changeset attached | => occt master 6ca1fa70 |
2015-05-07 11:18 | bugmaster | Status | tested => verified |
2015-05-07 11:18 | bugmaster | Resolution | open => fixed |
2015-05-14 15:28 |
|
Status | verified => closed |
2015-05-14 15:30 |
|
Fixed in Version | => 6.9.0 |
2015-05-14 16:35 | git | Note Added: 0041084 | |
2015-05-14 16:35 | git | Note Added: 0041085 |