MantisBT - Community
View Issue Details
0029694Community[OCCT] OCCT:Modeling Algorithmspublic2018-04-12 19:262018-06-23 13:56
sraymond 
bugmaster 
normalcrash 
closedfixed 
WindowsVC++ 201564 bit
[OCCT] 7.2.0 
[OCCT] 7.4.0[OCCT] 7.4.0 
lowalgos 2dgcc bug29694, lowalgos 2dgcc doc001
0029694: Geom2dGcc_Circ2dTanCenGeo crash
At line 63 of Geom2dGcc_Circ2dTanCenGeo.cxx
Extrema_ExtPC2d distmin(Pcenter,curve,Geom2dGcc_CurveTool::NbSamples(curve),
    Geom2dGcc_CurveTool::EpsX(curve,Tol),Tol);

Extrema_ExtPC2d is called using
Extrema_ExtPC2d (const gp_Pnt2d &P, const Adaptor2d_Curve2d &C, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real TolF=1.0e-10)
but arguments in Geom2dGcc_Circ2dTanCenGeo.cxx don't make sens and as NbSamples > EpsX it leads to crash.

I'm trying to fix it making the following modification:

Extrema_ExtPC2d distmin(Pcenter,curve,Tol);
 
Test case has already been created and pushed to the branch.
No tags attached.
related to 0024773closed apn Open CASCADE Convertation of the generic classes to the non-generic. Part 7 
Issue History
2018-04-12 19:26sraymondNew Issue
2018-04-12 19:26sraymondAssigned To => msv
2018-05-22 09:53msvAssigned Tomsv => nbv
2018-05-22 09:53msvStatusnew => assigned
2018-05-22 10:28nbvRelationship addedrelated to 0024773
2018-05-22 10:31nbvNote Added: 0076092
2018-05-22 16:05gitNote Added: 0076101
2018-05-23 09:31gitNote Added: 0076122
2018-05-23 11:15gitNote Added: 0076143
2018-05-23 17:11nbvNote Added: 0076193
2018-05-23 17:11nbvAssigned Tonbv => msv
2018-05-23 17:11nbvStatusassigned => resolved
2018-05-23 17:11nbvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=19143#r19143
2018-05-25 16:48msvNote Added: 0076336
2018-05-25 16:48msvAssigned Tomsv => nbv
2018-05-25 16:48msvStatusresolved => assigned
2018-05-25 17:39msvNote Edited: 0076336bug_revision_view_page.php?bugnote_id=76336#r19171
2018-05-25 18:18gitNote Added: 0076345
2018-05-28 13:33nbvNote Added: 0076364
2018-05-28 13:33nbvAssigned Tonbv => msv
2018-05-28 13:33nbvStatusassigned => resolved
2018-05-29 11:08msvNote Added: 0076388
2018-05-29 11:08msvAssigned Tomsv => nbv
2018-05-29 11:08msvStatusresolved => assigned
2018-05-29 12:26gitNote Added: 0076392
2018-05-29 15:55nbvNote Added: 0076399
2018-05-29 15:55nbvAssigned Tonbv => msv
2018-05-29 15:55nbvStatusassigned => resolved
2018-05-29 17:58msvNote Added: 0076416
2018-05-29 17:58msvAssigned Tomsv => bugmaster
2018-05-29 17:58msvStatusresolved => reviewed
2018-05-30 13:19bugmasterTest case number => lowalgos 2dgcc bug29694, lowalgos 2dgcc doc001
2018-05-30 13:38bugmasterNote Added: 0076435
2018-05-30 13:38bugmasterStatusreviewed => tested
2018-06-14 18:20bugmasterChangeset attached => occt master 894dba72
2018-06-14 18:20bugmasterStatustested => verified
2018-06-14 18:20bugmasterResolutionopen => fixed
2018-06-23 13:56gitNote Added: 0076918
2018-06-23 13:56gitNote Added: 0076919
2018-06-23 13:56gitNote Added: 0076920

Notes
(0076092)
nbv   
2018-05-22 10:31   
The reason of this issue is in incorrectly interpreted the generic class "TheExtPC" (eliminated after the fix 0024773) as Extrema_ExtPC2d. Correct interpretation must be "Extrema_EPCOfExtPC2d" class.
(0076101)
git   
2018-05-22 16:05   
Branch CR29694 has been created by nbv.

SHA-1: db083aecd3367cb18ed354ec2681cdca03d3644d


Detailed log of new commits:

Author: nbv
Date: Tue May 22 12:15:27 2018 +0300

    0029694: Geom2dGcc_Circ2dTanCenGeo crash
    
    The reason of this issue is in incorrectly interpreted the generic class "TheExtPC" (eliminated after the fix 0024773) as Extrema_ExtPC2d. Correct interpretation must be "Extrema_EPCOfExtPC2d" class.
    
    Now this problem has been fixed in the class Geom2dGcc_Circ2dTanCenGeo.
    
    New testgrid "lowalgos tangentcommands" has been created.
(0076122)
git   
2018-05-23 09:31   
Branch CR29694 has been updated by nbv.

SHA-1: e85c7f734e519e1306b8a6e23f62d8da015a0506


Detailed log of new commits:

Author: nbv
Date: Wed May 23 09:23:13 2018 +0300

    # Some correction in the documentation.

(0076143)
git   
2018-05-23 11:15   
Branch CR29694 has been updated forcibly by nbv.

SHA-1: 1462404bec79c0ef4d65b28f33d37d6bd7f19459
(0076193)
nbv   
2018-05-23 17:11   
Dear Mikhail,

Please review the current state of CR29694 branch.

Test results are here: http://jenkins-test-11.nnov.opencascade.com/view/CR29694-master_NBV/. [^]
(0076336)
msv   
2018-05-25 16:48   
(edited on: 2018-05-25 17:39)
src/GeometryTest/GeometryTest_ConstraintCommands.cxx
- 141: there is no sense any more in add temporary variable. Use solname directly. And the same in upper codes.
- it is not good to check only first two letters in the argument. It is better to compare the full string like "strcmp(theArgVals[anArgID],"-c") == 0". And the code will be changed to use if.. else if.. instead of switch.
- for better understanding, it is needed to change names of variables aCurveIdx and aPntIdx to aNbCurves and aNbPnts, and change their setting (initially 0) and behavior.

Rename the folder tangentcommands to 2dgcc (stands for geometric 2d curve constraints).

tests/lowalgos/tangentcommands/bug29694
- For new test cases, let's put the bug name in output instead of comment.

tests/lowalgos/tangentcommands/doc001
- Avoid usage of 'v2d' command, bacuse the snapshot is created unjustified big. Use the command smallview with proper parameters.

(0076345)
git   
2018-05-25 18:18   
Branch CR29694_1 has been created by nbv.

SHA-1: eb2376dd38451fad5df3e93cea8cb2c34991ddd1


Detailed log of new commits:

Author: nbv
Date: Tue May 22 12:15:27 2018 +0300

    0029694: Geom2dGcc_Circ2dTanCenGeo crash
    
    The reason of this issue is in incorrectly interpreted the generic class "TheExtPC" (eliminated after the fix 0024773) as Extrema_ExtPC2d. Correct interpretation must be "Extrema_EPCOfExtPC2d" class.
    
    Now this problem has been fixed in the class Geom2dGcc_Circ2dTanCenGeo.
    
    New testgrid "lowalgos 2dgcc" has been created.
(0076364)
nbv   
2018-05-28 13:33   
Dear Mikhail,

Please review the current state of CR29694_1 branch.

Test results are here: http://jenkins-test-11.nnov.opencascade.com/view/CR29694-master_NBV/ [^]
(0076388)
msv   
2018-05-29 11:08   
src/GeometryTest/GeometryTest_ConstraintCommands.cxx
- I prefer using constructions like this:
  if (/* some condition */)
  {
     // a code
  }
  else if (/* other condition */)
  {
     // other code
  }

instead of the following:
  if (/* some condition */)
  {
     // a code
     continue;
  }
  if (/* other condition */)
  {
     // other code
     continue;
  }

This makes the code more compact, and reduces usage of operators of unconditional jumping.
(0076392)
git   
2018-05-29 12:26   
Branch CR29694_2 has been created by nbv.

SHA-1: 753270577f6055ced8655a5b8df1cb10d0d0ed44


Detailed log of new commits:

Author: nbv
Date: Tue May 22 12:15:27 2018 +0300

    0029694: Geom2dGcc_Circ2dTanCenGeo crash
    
    The reason of this issue is in incorrectly interpreted the generic class "TheExtPC" (eliminated after the fix 0024773) as Extrema_ExtPC2d. Correct interpretation must be "Extrema_EPCOfExtPC2d" class.
    
    Now this problem has been fixed in the class Geom2dGcc_Circ2dTanCenGeo.
    
    New testgrid "lowalgos 2dgcc" has been created.
(0076399)
nbv   
2018-05-29 15:55   
Dear Mikhail,

Please review the current state of CR29694_2 branch.

Test results are here: http://jenkins-test-11.nnov.opencascade.com/view/CR29694-master_NBV/ [^]
(0076416)
msv   
2018-05-29 17:58   
Reviewed.
(0076435)
bugmaster   
2018-05-30 13:38   
Combination -
OCCT branch : CR29694_2 SHA - 753270577f6055ced8655a5b8df1cb10d0d0ed44
Products branch : master SHA - 0503d2e80bad20c78461c45f990db7f47ea81501
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:
Debian70-64:
OCCT
Total CPU difference: 18164.679999999946 / 17003.629999999863 [+6.83%]
Products
Total CPU difference: 7457.520000000047 / 7351.93000000003 [+1.44%]
Windows-64-VC10:
OCCT
Total CPU difference: 17968.023578898486 / 16814.645785498535 [+6.86%]
Products
Total CPU difference: 8204.248590999867 / 8072.068943699895 [+1.64%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0076918)
git   
2018-06-23 13:56   
Branch CR29694 has been deleted by kgv.

SHA-1: 1462404bec79c0ef4d65b28f33d37d6bd7f19459
(0076919)
git   
2018-06-23 13:56   
Branch CR29694_1 has been deleted by kgv.

SHA-1: eb2376dd38451fad5df3e93cea8cb2c34991ddd1
(0076920)
git   
2018-06-23 13:56   
Branch CR29694_2 has been deleted by kgv.

SHA-1: 753270577f6055ced8655a5b8df1cb10d0d0ed44