MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026064Community[OCCT] OCCT:Modeling Algorithmspublic2015-04-13 13:192015-05-14 16:35
Reportershoogen 
Assigned Tobugmaster 
PriorityhighSeveritymajor 
StatusclosedResolutionfixed 
PlatformLinuxOSDebian 6.0OS Version64 bit
Product Version[OCCT] 6.8.0 
Target Version[OCCT] 6.9.0Fixed in Version[OCCT] 6.9.0 
Summary0026064: distmini of two edges locks up
DescriptionWhen 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 Reproducepload 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=...)
TagsNo tags attached.
Test case numberbugs modalg_6(011) bug26064
Attached Files? file icon dist1-s1.brep (664 bytes) 2015-04-13 13:19
? file icon dist1-s2.brep (1,610 bytes) 2015-04-13 13:19

- Relationships
related to 0026075closedbugmaster Open CASCADE Make Extrema_GenExtCC return IsParallel flag in case of parallel curves 

-  Notes
(0039658)
shoogen (reporter)
2015-04-13 20:44

I got problems to reproduce the problem in a release build.
(0039659)
git (administrator)
2015-04-14 06:31

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.
(0039660)
abv (manager)
2015-04-14 06:36

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
(0039691)
git (administrator)
2015-04-14 16:55

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.

(0039692)
msv (developer)
2015-04-14 16:56

I have made some more minor code optimizations.
Please review.
(0039695)
msv (developer)
2015-04-14 17:01

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.
(0039703)
msv (developer)
2015-04-14 17:58

Reviewed. Please test.
(0039729)
msv (developer)
2015-04-15 00:51

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.
(0039735)
abv (manager)
2015-04-15 10:21

Mikhail, I believe that default value of cpulimit (1000) is more appropriate, considering case of running Debug builds on slow machines
(0039743)
msv (developer)
2015-04-15 10:48

OK.
(0039811)
apv (tester)
2015-04-15 19:01

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%]
(0039817)
git (administrator)
2015-04-16 06:35

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.
(0039818)
abv (manager)
2015-04-16 06:37

It was my stupid error with wrong index variable used in the cycle...
(0039819)
abv (manager)
2015-04-16 06:37

Fix pushed to CR26064_1, please re-test
(0039968)
git (administrator)
2015-04-17 15:53

Branch CR26064_1 has been updated forcibly by apv.

SHA-1: edbb57b9b3e8e4cc222cd9da3b4efafba61c6961
(0039969)
apv (tester)
2015-04-17 15:54

Branch CR26064_1 has been rebased on the current master
(0040213)
git (administrator)
2015-04-24 16:04

Branch CR26064_1 has been updated forcibly by apv.

SHA-1: e02bfc0944e37ef28bc570d73e2df0e7b63b9d10
(0040214)
apv (tester)
2015-04-24 16:04

Branch CR26064_1 has been rebased on the current master
(0040271)
apv (tester)
2015-04-27 13:12

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%]
(0041084)
git (administrator)
2015-05-14 16:35

Branch CR26064 has been deleted by inv.

SHA-1: 4fcd0f9fbd5fae5d239bea1b6e652bf3551bf582
(0041085)
git (administrator)
2015-05-14 16:35

Branch CR26064_1 has been deleted by inv.

SHA-1: e02bfc0944e37ef28bc570d73e2df0e7b63b9d10

- Related Changesets
occt: master 6ca1fa70
Timestamp: 2015-04-15 19:40:58
Author: abv
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.
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 ]

- Issue History
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 abv Priority normal => high
2015-04-13 21:42 abv Status new => assigned
2015-04-13 21:42 abv Target Version => 6.9.0
2015-04-14 06:31 git Note Added: 0039659
2015-04-14 06:36 abv Note Added: 0039660
2015-04-14 06:36 abv Status assigned => resolved
2015-04-14 16:55 git Note Added: 0039691
2015-04-14 16:56 msv Note Added: 0039692
2015-04-14 16:56 msv Assigned To msv => abv
2015-04-14 17:01 msv Note Added: 0039695
2015-04-14 17:40 msv Relationship added related to 0026075
2015-04-14 17:58 msv Note Added: 0039703
2015-04-14 17:58 msv Assigned To abv => bugmaster
2015-04-14 17:58 msv Status resolved => reviewed
2015-04-14 19:05 apv Assigned To bugmaster => apv
2015-04-15 00:51 msv Note Added: 0039729
2015-04-15 10:21 abv Note Added: 0039735
2015-04-15 10:48 msv Note Added: 0039743
2015-04-15 19:01 apv Note Added: 0039811
2015-04-15 19:01 apv Assigned To apv => msv
2015-04-15 19:01 apv Status reviewed => assigned
2015-04-16 06:35 git Note Added: 0039817
2015-04-16 06:37 abv Note Added: 0039818
2015-04-16 06:37 abv Status assigned => resolved
2015-04-16 06:37 abv Note Added: 0039819
2015-04-16 06:37 abv Assigned To msv => bugmaster
2015-04-16 06:37 abv Status resolved => reviewed
2015-04-16 12:11 apv Assigned To bugmaster => apv
2015-04-17 15:53 git Note Added: 0039968
2015-04-17 15:54 apv Note Added: 0039969
2015-04-24 16:04 git Note Added: 0040213
2015-04-24 16:04 apv Note Added: 0040214
2015-04-27 13:12 apv Note Added: 0040271
2015-04-27 13:12 apv Assigned To apv => bugmaster
2015-04-27 13:12 apv Status reviewed => tested
2015-05-05 16:48 apv 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 user533 Status verified => closed
2015-05-14 15:30 user533 Fixed in Version => 6.9.0
2015-05-14 16:35 git Note Added: 0041084
2015-05-14 16:35 git Note Added: 0041085


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker