MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031029Community[OCCT] OCCT:Modeling Algorithmspublic2019-10-03 21:322019-10-15 14:22
Reportergalbramc 
Assigned Tobugmaster 
PriorityhighSeveritymajor 
StatusreviewedResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 7.4.0 
Target Version[OCCT] 7.5.0*Fixed in Version 
Summary0031029: BRepLib::SameParameter regression in OCCT 7.4 from OCCT 7.3
DescriptionIn the attached example the underlying spline surface is not consistent with the curves that define the face (I'm working on making them consistent). However, the attached example generates an santizie error (throws Standard_RangeError if compiled with Debug flags) using 7.4 but succeeds without error with 7.3.

The sanitize backtrace is:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==42404==ERROR: AddressSanitizer: FPE on unknown address 0x00010e5d5e12 (pc 0x00010e5d5e12 bp 0x7ffee455b070 sp 0x7ffee455af20 T0)
    #0 0x10e5d5e11 in Copy(int, int&, NCollection_Array1<double> const&, int&, NCollection_Array1<double>&) BSplCLib.cxx:1858
    0000001 0x10e5d6f47 in BSplCLib::RemoveKnot(int, int, int, bool, int, NCollection_Array1<double> const&, NCollection_Array1<double> const&, NCollection_Array1<int> const&, NCollection_Array1<double>&, NCollection_Array1<double>&, NCollection_Array1<int>&, double) BSplCLib.cxx:2230
    0000002 0x10e5ec321 in BSplCLib::RemoveKnot(int, int, int, bool, NCollection_Array1<gp_Pnt2d> const&, NCollection_Array1<double> const*, NCollection_Array1<double> const&, NCollection_Array1<int> const&, NCollection_Array1<gp_Pnt2d>&, NCollection_Array1<double>*, NCollection_Array1<double>&, NCollection_Array1<int>&, double) BSplCLib_CurveComputation.gxx:107
    #3 0x10d2855de in Geom2d_BSplineCurve::RemoveKnot(int, int, double) Geom2d_BSplineCurve.cxx:432
    #4 0x1106270ce in Geom2dConvert::ConcatC1(NCollection_Array1<opencascade::handle<Geom2d_BSplineCurve> >&, NCollection_Array1<double> const&, opencascade::handle<TColStd_HArray1OfInteger>&, opencascade::handle<TColGeom2d_HArray1OfBSplineCurve>&, bool&, double, double) Geom2dConvert.cxx:1382
    #5 0x110623832 in Geom2dConvert::ConcatC1(NCollection_Array1<opencascade::handle<Geom2d_BSplineCurve> >&, NCollection_Array1<double> const&, opencascade::handle<TColStd_HArray1OfInteger>&, opencascade::handle<TColGeom2d_HArray1OfBSplineCurve>&, bool&, double) Geom2dConvert.cxx:1173
    #6 0x11062cdc4 in Geom2dConvert::C0BSplineToC1BSplineCurve(opencascade::handle<Geom2d_BSplineCurve>&, double) Geom2dConvert.cxx:1489
    0000007 0x10f4a7e51 in BRepLib::SameParameter(TopoDS_Edge const&, double, double&, bool) BRepLib.cxx:1384
    0000008 0x10f4a4022 in InternalSameParameter(TopoDS_Shape const&, BRepTools_ReShape&, double, bool, bool) BRepLib.cxx:963
    0000009 0x10f4a335c in BRepLib::SameParameter(TopoDS_Shape const&, double, bool) BRepLib.cxx:1015
    #10 0x10b6a08f5 in main sameParameter.cpp:14
    0000011 0x7fff68a3c3d4 in start (libdyld.dylib:x86_64+0x163d4)

==42404==Register values:
rax = 0x0000000000000000 rbx = 0x00007ffee455b0c0 rcx = 0x0000000000000000 rdx = 0x0000000000000000
rdi = 0x00007ffee455b520 rsi = 0x0000100000000000 rbp = 0x00007ffee455b070 rsp = 0x00007ffee455af20
 r8 = 0x0000100000000004 r9 = 0x00007ffee455b004 r10 = 0x0000000000000001 r11 = 0x0000000000000010
r12 = 0x0000604000016d20 r13 = 0x00007ffee455b520 r14 = 0x0000000000000002 r15 = 0x0000604000016ce0
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: FPE BSplCLib.cxx:1858 in Copy(int, int&, NCollection_Array1<double> const&, int&, NCollection_Array1<double>&)
==42404==ABORTING
Steps To ReproduceTest case

bugs modalg_7 bug31029

The case is not regression, bug is reproduced for 7.3.0
TagsNo tags attached.
Test case number
Attached Filestgz file icon sameParameter.tgz (296,667 bytes) 2019-10-03 21:32
? file icon bug31029.brep (697,880 bytes) 2019-10-15 13:25

- Relationships

-  Notes
(0088104)
ifv (developer)
2019-10-14 14:43

It is not reproducible on Windows and Linux (Debian) plateforms
(0088106)
msv (developer)
2019-10-14 15:42

There is inconsistence of default tolerance value of the draw command sameparameter and the method BRepLib::SameParameter.
The draw command has default value 1e-7. The method's default value is 1e-5.

The bug is reproduced with default value of the method 1e-5. So, the following draw script reproduces the bug:

restore face.brep f
sameparameter f 1e-5

The exception is different depending on the build mode release or debug, integer divide by zero or range error.
(0088110)
git (administrator)
2019-10-14 16:57

Branch CR31029 has been created by ifv.

SHA-1: 508eba84d10d718b40c0269b83bd152069c5ce39


Detailed log of new commits:

Author: ifv
Date: Mon Oct 14 16:51:52 2019 +0300

    0031029: BRepLib::SameParameter regression in OCCT 7.4 from OCCT 7.3
    
    1. BRepLib.cxx: calculation of 2d tolerance is changed in method BRepLib::SameParameter(Edge..)
    2. Geom2dConvert.cxx: incorrect comparing
    SquareDistance < tolerance
    is improved by
    SquareDistance < tolerance*tolerance.
    
    because tolerance is linear value.
(0088112)
git (administrator)
2019-10-14 17:08

Branch CR31029 has been updated forcibly by ifv.

SHA-1: 1f85a7fca39ff1103eade98ff5b703ad56684100
(0088132)
git (administrator)
2019-10-15 11:32

Branch CR31029 has been updated forcibly by ifv.

SHA-1: d73ed514495e8561e22aa4936e07a2f11653f7ca
(0088133)
ifv (developer)
2019-10-15 13:27

CR31029 is ready for review.
Test results are CR31029-master-ifv

Please, put file bug31029 in test database.
(0088134)
msv (developer)
2019-10-15 14:14

File added.
(0088135)
msv (developer)
2019-10-15 14:22

Reviewed.

- Issue History
Date Modified Username Field Change
2019-10-03 21:32 galbramc New Issue
2019-10-03 21:32 galbramc Assigned To => abv
2019-10-03 21:32 galbramc File Added: sameParameter.tgz
2019-10-04 09:10 msv Assigned To abv => ifv
2019-10-04 09:10 msv Status new => assigned
2019-10-04 09:10 msv Product Version => 7.4.0
2019-10-04 09:10 msv Target Version => 7.5.0*
2019-10-05 10:36 abv Priority normal => high
2019-10-14 14:43 ifv Note Added: 0088104
2019-10-14 14:43 ifv Assigned To ifv => abv
2019-10-14 14:43 ifv Status assigned => feedback
2019-10-14 15:42 msv Note Added: 0088106
2019-10-14 15:42 msv Assigned To abv => ifv
2019-10-14 15:42 msv Status feedback => assigned
2019-10-14 16:57 git Note Added: 0088110
2019-10-14 17:08 git Note Added: 0088112
2019-10-15 11:32 git Note Added: 0088132
2019-10-15 13:24 ifv Steps to Reproduce Updated View Revisions
2019-10-15 13:25 ifv File Added: bug31029.brep
2019-10-15 13:27 ifv Note Added: 0088133
2019-10-15 13:27 ifv Assigned To ifv => msv
2019-10-15 13:27 ifv Status assigned => resolved
2019-10-15 14:14 msv Note Added: 0088134
2019-10-15 14:22 msv Note Added: 0088135
2019-10-15 14:22 msv Assigned To msv => bugmaster
2019-10-15 14:22 msv Status resolved => reviewed


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker