View Issue Details

IDProjectCategoryView StatusLast Update
0026064CommunityOCCT:Modeling Algorithmspublic2015-05-14 16:35
Reportershoogen Assigned Tobugmaster  
PriorityhighSeveritymajor 
Status closedResolutionfixed 
PlatformLinuxOSDebian 6.0 
Product Version6.8.0 
Target Version6.9.0Fixed in Version6.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

  • dist1-s1.brep (664 bytes)
  • dist1-s2.brep (1,610 bytes)

Relationships

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

Activities

shoogen

2015-04-13 13:19

reporter  

dist1-s1.brep (664 bytes)

shoogen

2015-04-13 13:19

reporter  

dist1-s2.brep (1,610 bytes)

shoogen

2015-04-13 20:44

reporter   ~0039658

I got problems to reproduce the problem in a release build.

git

2015-04-14 06:31

administrator   ~0039659

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.

abv

2015-04-14 06:36

manager   ~0039660

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

git

2015-04-14 16:55

administrator   ~0039691

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.

msv

2015-04-14 16:56

developer   ~0039692

I have made some more minor code optimizations.
Please review.

msv

2015-04-14 17:01

developer   ~0039695

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.

msv

2015-04-14 17:58

developer   ~0039703

Reviewed. Please test.

msv

2015-04-15 00:51

developer   ~0039729

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.

abv

2015-04-15 10:21

manager   ~0039735

Mikhail, I believe that default value of cpulimit (1000) is more appropriate, considering case of running Debug builds on slow machines

msv

2015-04-15 10:48

developer   ~0039743

OK.

apv

2015-04-15 19:01

tester   ~0039811

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%]

git

2015-04-16 06:35

administrator   ~0039817

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.

abv

2015-04-16 06:37

manager   ~0039818

It was my stupid error with wrong index variable used in the cycle...

abv

2015-04-16 06:37

manager   ~0039819

Fix pushed to CR26064_1, please re-test

git

2015-04-17 15:53

administrator   ~0039968

Branch CR26064_1 has been updated forcibly by apv.

SHA-1: edbb57b9b3e8e4cc222cd9da3b4efafba61c6961

apv

2015-04-17 15:54

tester   ~0039969

Branch CR26064_1 has been rebased on the current master

git

2015-04-24 16:04

administrator   ~0040213

Branch CR26064_1 has been updated forcibly by apv.

SHA-1: e02bfc0944e37ef28bc570d73e2df0e7b63b9d10

apv

2015-04-24 16:04

tester   ~0040214

Branch CR26064_1 has been rebased on the current master

apv

2015-04-27 13:12

tester   ~0040271

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%]

git

2015-05-14 16:35

administrator   ~0041084

Branch CR26064 has been deleted by inv.

SHA-1: 4fcd0f9fbd5fae5d239bea1b6e652bf3551bf582

git

2015-05-14 16:35

administrator   ~0041085

Branch CR26064_1 has been deleted by inv.

SHA-1: e02bfc0944e37ef28bc570d73e2df0e7b63b9d10

Related Changesets

occt: master 6ca1fa70

2015-04-15 19:40:58

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.
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

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 aiv Status verified => closed
2015-05-14 15:30 aiv Fixed in Version => 6.9.0
2015-05-14 16:35 git Note Added: 0041084
2015-05-14 16:35 git Note Added: 0041085