MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025706Community[OCCT] OCCT:Modeling Datapublic2015-01-14 02:252015-05-14 15:32
Reportershoogen 
Assigned Tobugmaster 
PrioritynormalSeveritycrash 
StatusclosedResolutionfixed 
PlatformLinuxOSDebian 6.0OS Version64 bit
Product Version[OCCT] 6.8.0 
Target Version[OCCT] 6.9.0Fixed in Version[OCCT] 6.9.0 
Summary0025706: SIGSEGV after making existing BSplineCurve rational
Descriptionwhen a non-rational BSplineCurve of Degree 2 is made rational by changing a weight, rebuilding the cache fails resulting in a SIGSEGV when creating an edge.

It seems that Geom_BSplineCurve::ValidateCache does not account for a curve becoming rational. BSplCLib::BuildCache modifies the cacheweights which have not been initialized.
Steps To Reproducebugs moddata_3 bug25706_1
bugs moddata_3 bug25706_2
bugs moddata_3 bug25706_3
Additional information
and documentation updates
original report: http://forum.freecadweb.org/viewtopic.php?f=22&t=9312&p=75625#p75616 [^]

#0 0x00007fff7b804dad in TColStd_Array1OfReal::ChangeValue (this=0x10,
    Index=1) at occt/inc/TCollection_Array1.lxx:144
0000001 0x00007fff7b804cb2 in TColStd_Array1OfReal::operator() (this=0x10, Index=1)
    at occt/inc/TColStd_Array1OfReal.hxx:68
0000002 0x00007fff79fae298 in BSplCLib::BuildCache (U=0, SpanDomain=1, Periodic=0,
    Degree=2, FlatKnots=..., Poles=..., Weights=..., CachePoles=...,
    CacheWeights=...)
    at occt/inc/BSplCLib_CurveComputation.gxx:1071
#3 0x00007fff7a406a2a in Geom_BSplineCurve::ValidateCache (this=0x3833550,
    Parameter=0)
    at occt/src/Geom/Geom_BSplineCurve.cxx:1263
#4 0x00007fff7a408b06 in Geom_BSplineCurve::D0 (this=0x3833550, U=0, P=...)
    at occt/src/Geom/Geom_BSplineCurve_1.cxx:191
#5 0x00007fff7a431751 in Geom_Curve::Value (this=0x3833550, U=0)
    at occt/src/Geom/Geom_Curve.cxx:57
#6 0x00007fff77aef1fc in BRepLib_MakeEdge::Init (this=0x7fffffffae08, CC=...,
    VV1=..., VV2=..., pp1=0, pp2=1)
    at occt/src/BRepLib/BRepLib_MakeEdge.cxx:816
0000007 0x00007fff77aee929 in BRepLib_MakeEdge::Init (this=0x7fffffffae08, C=...,
    p1=0, p2=1)
    at occt/src/BRepLib/BRepLib_MakeEdge.cxx:666
0000008 0x00007fff77aedfc3 in BRepLib_MakeEdge::BRepLib_MakeEdge (this=
    0x7fffffffae08, L=..., p1=0, p2=1)
    at occt/src/BRepLib/BRepLib_MakeEdge.cxx:498
0000009 0x00007fff77b2b1a9 in BRepBuilderAPI_MakeEdge::BRepBuilderAPI_MakeEdge (
    this=0x7fffffffadd0, L=..., p1=0, p2=1)
    at occt/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge.cxx:412
TagsNo tags attached.
Test case numberbugs moddata_3 bug25706_1 bug25706_2 bug25706_3
Attached Files

- Relationships

-  Notes
(0036026)
git (administrator)
2015-01-14 10:00

Branch CR25706 has been created by azv.

SHA-1: ea5081f87fc0a34fdcefcd5413a5383019c24637


Detailed log of new commits:

Author: azv
Date: Wed Jan 14 10:00:06 2015 +0300

    0025706: SIGSEGV after making existing BSplineCurve rational
    
    1. Eliminated exception after conversion non-rational B-spline to rational
    2. Implemented DRAW command setweight to change weights of B-spline
    3. Test cases were added
(0036027)
azv (developer)
2015-01-14 10:02

Branch CR25706 is ready for review
(0036038)
msv (developer)
2015-01-14 12:45

- I think it is better to maintain cacheweights array in ValidateCache method.

- In the function of draw command setweight, please generate error (in cout) if index2 is not given but the object is of type surface, otherwise the user will get exception.
Also, generate error message at the end if the object is not of expected type, otherwise the user will not understand what happened.

- Split the long literal string:
"setweight curve/surf index1 [index2] weight\n changes a weight of a pole of B-spline curve/surface (index2 is useful for surfaces only)"
=>
"setweight curve/surf index1 [index2] weight"
"\n\t\tchanges a weight of a pole of B-spline curve/surface (index2 is useful for surfaces only)"
(0036043)
msv (developer)
2015-01-14 14:17

In the test scripts, you set the variable 2dviewer. In order it to work, it is needed to have a draw variable named "result". It is according to the logic of the file tests\bugs\end:
if { [isdraw result] } {
  if { [info exists 2dviewer] } {
...
(0036053)
git (administrator)
2015-01-14 16:00

Branch CR25706_1 has been created by azv.

SHA-1: 767592cf8b8c011f37c83180a5e29a614d85a96c


Detailed log of new commits:

Author: azv
Date: Wed Jan 14 10:00:06 2015 +0300

    0025706: SIGSEGV after making existing BSplineCurve rational
    
    1. Eliminated exception after conversion non-rational B-spline to rational
    2. Implemented DRAW command setweight to change weights of B-spline
    3. Test cases were added
(0036054)
azv (developer)
2015-01-14 16:00

Branch CR25706_1 is ready for review
(0036057)
msv (developer)
2015-01-14 16:32

Please in setweight command redirect error message to cout instead of di. The user must see the error message unconditionally.
(0036058)
git (administrator)
2015-01-14 16:41

Branch CR25706_1 has been updated forcibly by azv.

SHA-1: 6b8a8988eb40a0c617212b83a5560e779c5928d4
(0036064)
msv (developer)
2015-01-14 17:45

Reviewed.
(0036311)
git (administrator)
2015-01-21 13:04

Branch CR25706_2 has been created by apn.

SHA-1: b32f715e280fa88c13113db80027dcf1a2f45d15


Detailed log of new commits:

Author: azv
Date: Wed Jan 14 10:00:06 2015 +0300

    0025706: SIGSEGV after making existing BSplineCurve rational
    
    1. Eliminated exception after conversion non-rational B-spline to rational
    2. Implemented DRAW command setweight to change weights of B-spline
    3. Test cases were added

Author: azv
Date: Wed Jan 14 17:26:30 2015 +0300

    0025582: SIGSEGV in thrusections of circle segments
    
    1. Implemented using of trimmed circular curve
    2. Added test case

Author: azv
Date: Tue Jan 13 17:44:38 2015 +0300

    0025578: SIGSEGV in BRepSweep_Rotation in case of singularities
    
    Eliminating degenerated edges

Author: azv
Date: Fri Jan 16 10:32:51 2015 +0300

    0025711: Get rid of static variable islambdadefined in AppParCurves_BSpGradient.gxx
(0036312)
apn (administrator)
2015-01-21 13:06

Branch CR25706_2 contains commits from issues 25711, 25578, 25582, 25706.
(0036351)
apn (administrator)
2015-01-21 20:15

Dear BugMaster,
Branch CR25706_2 (contains CR25711, CR25578, CR25582, CR25706_1) from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested in Release mode.
SHA-1: b32f715e280fa88c13113db80027dcf1a2f45d15

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
bugs modalg_5 bug25210
thrusection not_solids Q1 Q2 Q4 Q5 Q7 Q8 R4 R8 S7 T2 U1 U5 V4 V8 W4 W5
thrusection specific A1 A2 A5 A6 A9 B1 E5 E6 E9 F1 G3 G4 G5 G6
http://occt-tests/CR25706-2-master-occt/Debian60-64/summary.html [^]
http://occt-tests/CR25706-2-master-occt/Windows-32-VC10/summary.html [^]

Testing cases:
bugs modalg_5 bug25578 - OK
http://occt-tests/CR25706-2-master-occt/Debian60-64/bugs/modalg_5/bug25578.html [^]
http://occt-tests/CR25706-2-master-occt/Windows-32-VC10/bugs/modalg_5/bug25578.html [^]

bugs modalg_5 bug25582 - OK
http://occt-tests/CR25706-2-master-occt/Debian60-64/bugs/modalg_5/bug25582.html [^]
http://occt-tests/CR25706-2-master-occt/Windows-32-VC10/bugs/modalg_5/bug25582.html [^]

bugs moddata_3 bug25706_1 - OK
http://occt-tests/CR25706-2-master-occt/Debian60-64/bugs/moddata_3/bug25706_1.html [^]
http://occt-tests/CR25706-2-master-occt/Windows-32-VC10/bugs/moddata_3/bug25706_1.html [^]

bugs moddata_3 bug25706_2 - OK
http://occt-tests/CR25706-2-master-occt/Debian60-64/bugs/moddata_3/bug25706_2.html [^]
http://occt-tests/CR25706-2-master-occt/Windows-32-VC10/bugs/moddata_3/bug25706_2.html [^]

bugs moddata_3 bug25706_3 - OK
http://occt-tests/CR25706-2-master-occt/Debian60-64/bugs/moddata_3/bug25706_3.html [^]
http://occt-tests/CR25706-2-master-occt/Windows-32-VC10/bugs/moddata_3/bug25706_3.html [^]

Testing on Linux:
Total MEMORY difference: 370019996 / 369608324
Total CPU difference: 48902.81000000011 / 46823.18000000004

Testing on Windows:
Total MEMORY difference: 275969040 / 276683660
Total CPU difference: 33355.984375 / 39959.984375

There are not differences in images found by testdiff.
(0036447)
git (administrator)
2015-01-23 15:56

Branch CR25706_2 has been updated by azv.

SHA-1: 60fc523aa649e45ea62632fa8ca0e711aba0022a


Detailed log of new commits:

Author: azv
Date: Fri Jan 23 15:55:56 2015 +0300

    0025582: SIGSEGV in thrusections of circle segments
    
    Eliminating regressions

(0036448)
azv (developer)
2015-01-23 15:57

Dear Mikhail,

The regressions were caused by the fix for issue 0025582. I have pushed my changes into CR25706_2. Could you, please, review it?
(0036459)
msv (developer)
2015-01-23 18:00

Reviewed.
(0036486)
git (administrator)
2015-01-23 19:58

Branch CR25706_2 has been updated forcibly by apn.

SHA-1: d43386c16764894f1af72c645dbe04747e12d684
(0036504)
git (administrator)
2015-01-26 12:20

Branch CR25706_2 has been updated by apn.

SHA-1: 10c6dd9023dc1d04c84aa16026f2b6e59ff9ae51


Detailed log of new commits:

Author: apn
Date: Mon Jan 26 12:19:58 2015 +0300

    Fixed compilation warning ('di' : unreferenced formal parameter).

(0036653)
apn (administrator)
2015-01-26 16:03
edited on: 2015-01-26 16:14

Dear BugMaster,
Branch CR25706_2(contains CR25711, CR25578, CR25582, CR25706_1) from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested in Release mode.
SHA-1: d43386c16764894f1af72c645dbe04747e12d684

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 1 (0 on master) - fixed

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions

Testing cases:
bugs modalg_5 bug25578 - OK

bugs modalg_5 bug25582 - OK
http://occt-tests/CR25706-2-master-occt/Debian60-64/bugs/modalg_5/bug25582.html [^] [^]
http://occt-tests/CR25706-2-master-occt/Windows-32-VC10/bugs/modalg_5/bug25582.html [^] [^]

bugs moddata_3 bug25706_1 - OK
http://occt-tests/CR25706-2-master-occt/Debian60-64/bugs/moddata_3/bug25706_1.html [^] [^]
http://occt-tests/CR25706-2-master-occt/Windows-32-VC10/bugs/moddata_3/bug25706_1.html [^] [^]

bugs moddata_3 bug25706_2 - OK
http://occt-tests/CR25706-2-master-occt/Debian60-64/bugs/moddata_3/bug25706_2.html [^] [^]
http://occt-tests/CR25706-2-master-occt/Windows-32-VC10/bugs/moddata_3/bug25706_2.html [^] [^]

bugs moddata_3 bug25706_3 - OK
http://occt-tests/CR25706-2-master-occt/Debian60-64/bugs/moddata_3/bug25706_3.html [^] [^]
http://occt-tests/CR25706-2-master-occt/Windows-32-VC10/bugs/moddata_3/bug25706_3.html [^] [^]

Testing on Linux:
Total MEMORY difference: 369759752 / 370114884
Total CPU difference: 53939.91000000013 / 51750.710000000094

Testing on Windows:
Total MEMORY difference: 276226856 / 275769192
Total CPU difference: 51231.875 / 38148.296875

There are not differences in images found by testdiff.

(0036654)
git (administrator)
2015-01-26 16:08

Branch CR25706_2 has been updated by apn.

SHA-1: 2a694ac62f14f1a876eb2285af1649eefee281c6


Detailed log of new commits:

Author: apn
Date: Mon Jan 26 16:07:52 2015 +0300

    Added test bugs/modalg_5/bug25578

(0038554)
git (administrator)
2015-03-18 13:35

Branch CR25706 has been deleted by inv.

SHA-1: ea5081f87fc0a34fdcefcd5413a5383019c24637
(0038555)
git (administrator)
2015-03-18 13:35

Branch CR25706_1 has been deleted by inv.

SHA-1: 6b8a8988eb40a0c617212b83a5560e779c5928d4
(0038556)
git (administrator)
2015-03-18 13:36

Branch CR25706_2 has been deleted by inv.

SHA-1: 2a694ac62f14f1a876eb2285af1649eefee281c6

- Related Changesets
occt: master 52ba6031
Timestamp: 2015-01-14 07:00:06
Author: azv
Committer: bugmaster
Details ] Diff ]
0025706: SIGSEGV after making existing BSplineCurve rational

1. Eliminated exception after conversion non-rational B-spline to rational
2. Implemented DRAW command setweight to change weights of B-spline
3. Test cases were added
mod - src/Geom/Geom_BSplineCurve.cxx Diff ] File ]
mod - src/Geom/Geom_BSplineSurface.cxx Diff ] File ]
mod - src/Geom2d/Geom2d_BSplineCurve.cxx Diff ] File ]
mod - src/GeomliteTest/GeomliteTest_ModificationCommands.cxx Diff ] File ]
add - tests/bugs/moddata_3/bug25706_1 Diff ] File ]
add - tests/bugs/moddata_3/bug25706_2 Diff ] File ]
add - tests/bugs/moddata_3/bug25706_3 Diff ] File ]

- Issue History
Date Modified Username Field Change
2015-01-14 02:25 shoogen New Issue
2015-01-14 02:25 shoogen Assigned To => msv
2015-01-14 07:14 azv Assigned To msv => azv
2015-01-14 07:14 azv Status new => assigned
2015-01-14 10:00 git Note Added: 0036026
2015-01-14 10:02 azv Note Added: 0036027
2015-01-14 10:02 azv Assigned To azv => msv
2015-01-14 10:02 azv Status assigned => resolved
2015-01-14 10:02 azv Steps to Reproduce Updated View Revisions
2015-01-14 12:45 msv Note Added: 0036038
2015-01-14 12:45 msv Assigned To msv => azv
2015-01-14 12:45 msv Status resolved => assigned
2015-01-14 14:17 msv Note Added: 0036043
2015-01-14 16:00 git Note Added: 0036053
2015-01-14 16:00 azv Note Added: 0036054
2015-01-14 16:00 azv Assigned To azv => msv
2015-01-14 16:00 azv Status assigned => resolved
2015-01-14 16:32 msv Note Added: 0036057
2015-01-14 16:32 msv Assigned To msv => azv
2015-01-14 16:32 msv Status resolved => assigned
2015-01-14 16:41 git Note Added: 0036058
2015-01-14 16:41 azv Assigned To azv => msv
2015-01-14 16:41 azv Status assigned => resolved
2015-01-14 17:45 msv Note Added: 0036064
2015-01-14 17:45 msv Assigned To msv => bugmaster
2015-01-14 17:45 msv Status resolved => reviewed
2015-01-21 11:50 apn Assigned To bugmaster => apn
2015-01-21 13:04 git Note Added: 0036311
2015-01-21 13:06 apn Note Added: 0036312
2015-01-21 18:54 apn Test case number => bugs moddata_3 bug25706_1 bug25706_2 bug25706_3
2015-01-21 20:15 apn Note Added: 0036351
2015-01-21 20:17 apn Assigned To apn => azv
2015-01-21 20:17 apn Status reviewed => assigned
2015-01-21 20:17 apn Target Version => 6.9.0
2015-01-23 15:56 git Note Added: 0036447
2015-01-23 15:57 azv Note Added: 0036448
2015-01-23 15:57 azv Assigned To azv => msv
2015-01-23 15:57 azv Status assigned => resolved
2015-01-23 18:00 msv Note Added: 0036459
2015-01-23 18:00 msv Assigned To msv => bugmaster
2015-01-23 18:00 msv Status resolved => reviewed
2015-01-23 19:58 git Note Added: 0036486
2015-01-26 12:20 git Note Added: 0036504
2015-01-26 16:03 apn Note Added: 0036653
2015-01-26 16:08 git Note Added: 0036654
2015-01-26 16:08 apn Note Edited: 0036653 View Revisions
2015-01-26 16:13 apn Status reviewed => tested
2015-01-26 16:14 apn Note Edited: 0036653 View Revisions
2015-01-30 14:00 bugmaster Changeset attached => occt master 52ba6031
2015-01-30 14:00 bugmaster Status tested => verified
2015-01-30 14:00 bugmaster Resolution open => fixed
2015-03-18 13:35 git Note Added: 0038554
2015-03-18 13:35 git Note Added: 0038555
2015-03-18 13:36 git Note Added: 0038556
2015-05-14 15:29 user533 Status verified => closed
2015-05-14 15:32 user533 Fixed in Version => 6.9.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker