Archived issue #0029694
Geom2dGcc_Circ2dTanCenGeo crash
Description
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);
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);
Steps to reproduce
Test case has already been created and pushed to the branch.
Public activity
16 archived notes
Participants are labeled by their role within this record.
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.
Branch [archived branch] has been created by Participant.
[revision removed]
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.
[revision removed]
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.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: nbv
Date: Wed May 23 09:23:13 2018 +0300
# Some correction in the documentation.
[revision removed]
Detailed log of new commits:
Author: nbv
Date: Wed May 23 09:23:13 2018 +0300
# Some correction in the documentation.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
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/.
Please review the current state of CR29694 branch.
Test results are here: http://jenkins-test-11.nnov.opencascade.com/view/CR29694-master_NBV/.
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.
- 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.
Branch [archived branch] has been created by Participant.
[revision removed]
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.
[revision removed]
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.
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/
Please review the current state of CR29694_1 branch.
Test results are here: http://jenkins-test-11.nnov.opencascade.com/view/CR29694-master_NBV/
src/GeometryTest/GeometryTest_ConstraintCommands.cxx
- I prefer using constructions like this:
instead of the following:
This makes the code more compact, and reduces usage of operators of unconditional jumping.
- 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.
Branch [archived branch] has been created by Participant.
[revision removed]
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.
[revision removed]
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.
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/
Please review the current state of CR29694_2 branch.
Test results are here: http://jenkins-test-11.nnov.opencascade.com/view/CR29694-master_NBV/
Reviewed.
Combination -
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
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
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
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
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records