View Issue Details

IDProjectCategoryView StatusLast Update
0026270CommunityOCCT:Modeling Algorithmspublic2016-12-09 16:38
Reportersraymond Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformMacOSOS 
Product Version6.9.0 
Target Version7.1.0Fixed in Version7.1.0 
Summary0026270: GeomFill_NSections constructor crash
DescriptionThe use of this constructor fails : GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC)
Inside the constructor, myParams is not initialized before calling :
void GeomFill_NSections::ComputeSurface()
Resulting in a faillure at line 567 :
    Standard_Integer Nbpar = myParams.Length();
    Handle(TColStd_HArray1OfReal) HPar
      = new TColStd_HArray1OfReal(1,Nbpar);
because NbPar is null

It's a bit confusing and make the user wondering what is wrong with its data.

Steps To ReproduceCall GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC) with any sequence of curve.
TagsNo tags attached.
Test case numberbugs modalg_6 bug26270

Activities

git

2016-07-08 14:14

administrator   ~0055757

Branch CR26270 has been created by ema.

SHA-1: 9a1a85d2d9666d3bf8e430d6f9070846b5923042


Detailed log of new commits:

Author: ema
Date: Fri Jul 8 14:01:12 2016 +0300

    0026270: GeomFill_NSections constructor crash
    Initialized several fields in constructor

ema

2016-07-08 14:56

developer   ~0055759

Dear Mikhail

Could you please review my changes in CR26270 branch.

msv

2016-07-11 09:50

developer   ~0055789

Dear IFV, please review the fix. It seems we should fill in myParams with some different way.

ifv

2016-07-11 10:36

developer   ~0055790

In my opinion, fix is wrong.
If myParams is not defined, most natural setting is equidistant parameters beetwin 0 and 1, in fact these parameters must be beetwin VFirst and VLast, because they correspond V direction of surface, otherwise, parameters of curves correspond U direction of surface, so myParams.Append((aC->LastParameter())) is very bad choice.

msv

2016-07-11 11:16

developer   ~0055798

Overall remarks:

src\GeomFill\GeomFill_NSections.cxx
- It is needed to compute parameters in the interval [0,1], for each curve proportionally to the path distance from the curve to the first curve.

src\QABugs\QABugs_20.cxx
- No need to read the additional argument of type curve. The list of curves got from the first argument is enough.

tests\bugs\modalg_6\bug26270
- No need to feed a curve as the second argument to the command.

ifv

2016-07-11 15:40

developer   ~0055824

Calculation of parameters according the distances between curves is better to perform in method ComputeSurface(), because this method reparametrises curves first in order to set parameters between UFirst, ULast. The same parametrisation makes easy calculating "distance" between curves.
But really it is not necessary to calculate parameters if they are undefined, it is enough to set (see method ComputeSurface())
    Standard_Boolean knownP = Standard_False;(currently knownP = Standard_True)
    GeomFill_AppSurf anApprox(degmin, degmax, myPres3d, myPres3d, nbIt, knownP);
When knownP = Standard_False, anApprox will be calculate parameters according to ChordLength type of parametrisation.

git

2016-07-18 14:25

administrator   ~0055991

Branch CR26270 has been updated by ema.

SHA-1: dcd9c4b07f8da4687c7d8e2b96b1e236bdc095dd


Detailed log of new commits:

Author: ema
Date: Mon Jul 18 14:23:24 2016 +0300

    Removed definition of myParams from constructor.
    Correction of ComputeSurface() method to avoid calculation of parameters if myParams is undefined.
    Correction of test case parameters

ema

2016-07-18 14:30

developer   ~0055994

Please review updated branch CR26270

git

2016-07-18 15:16

administrator   ~0055996

Branch CR26270 has been updated by ema.

SHA-1: 6f1df61c68636a434da384aa1944864fb0385716


Detailed log of new commits:

Author: ema
Date: Mon Jul 18 15:13:01 2016 +0300

    Corrected test case

git

2016-07-18 15:57

administrator   ~0056002

Branch CR26270 has been updated forcibly by ema.

SHA-1: e3cb48694fba890d5c8d298dbac0719aaf998ea4

git

2016-07-18 16:40

administrator   ~0056007

Branch CR26270 has been updated forcibly by ema.

SHA-1: 168b1fb6d5eceba6f5c1cd0779dd919b791c250e

msv

2016-07-18 16:52

developer   ~0056009

Reviewed.

apv

2016-07-19 15:36

tester   ~0056035

Dear BugMaster,

Branch CR26270 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 168b1fb6d5eceba6f5c1cd0779dd919b791c250e

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1155

Regressions/Differences:
Not detected

Testing cases:
bugs modalg_6 bug26270 - OK
http://occt-tests/CR26270-master-OCCT/Debian70-64/bugs/modalg_6/bug26270.html
http://occt-tests/CR26270-master-OCCT/Windows-64-VC10/bugs/modalg_6/bug26270.html

Testing on Linux:
Total MEMORY difference: 90303628 / 89992493 [+0.35%]
Total CPU difference: 19184.189999999893 / 19191.48999999992 [-0.04%]

Testing on Windows:
Total MEMORY difference: 57430552 / 57431602 [-0.00%]
Total CPU difference: 17942.11181279887 / 18076.974677298753 [-0.75%]

git

2016-07-22 10:43

administrator   ~0056099

Branch CR26270 has been deleted by inv.

SHA-1: 168b1fb6d5eceba6f5c1cd0779dd919b791c250e

Related Changesets

occt: master 05607219

2016-07-08 11:01:12

ema


Committer: bugmaster Details Diff
0026270: GeomFill_NSections constructor crash

Correction of code to avoid of usage of undefined associated parameters in order not to get exception in constructor.
Creation of test case for this issue
Affected Issues
0026270
mod - src/GeomFill/GeomFill_NSections.cxx Diff File
mod - src/QABugs/QABugs_20.cxx Diff File
add - tests/bugs/modalg_6/bug26270 Diff File

Issue History

Date Modified Username Field Change
2015-05-26 13:53 sraymond New Issue
2015-05-26 13:53 sraymond Assigned To => msv
2015-05-26 14:57 msv Target Version 7.0.0 => 7.1.0
2016-07-06 17:12 msv Assigned To msv => aka
2016-07-06 17:12 msv Status new => assigned
2016-07-06 17:38 msv Assigned To aka => ema
2016-07-08 14:14 git Note Added: 0055757
2016-07-08 14:56 ema Note Added: 0055759
2016-07-08 14:56 ema Assigned To ema => msv
2016-07-08 14:56 ema Status assigned => resolved
2016-07-11 09:50 msv Note Added: 0055789
2016-07-11 09:50 msv Assigned To msv => ifv
2016-07-11 10:36 ifv Note Added: 0055790
2016-07-11 10:36 ifv Assigned To ifv => msv
2016-07-11 10:36 ifv Status resolved => feedback
2016-07-11 11:16 msv Note Added: 0055798
2016-07-11 11:16 msv Assigned To msv => ema
2016-07-11 11:16 msv Status feedback => assigned
2016-07-11 15:40 ifv Note Added: 0055824
2016-07-18 14:25 git Note Added: 0055991
2016-07-18 14:30 ema Note Added: 0055994
2016-07-18 14:30 ema Assigned To ema => msv
2016-07-18 14:30 ema Status assigned => resolved
2016-07-18 15:16 git Note Added: 0055996
2016-07-18 15:57 git Note Added: 0056002
2016-07-18 16:40 git Note Added: 0056007
2016-07-18 16:52 msv Note Added: 0056009
2016-07-18 16:52 msv Assigned To msv => bugmaster
2016-07-18 16:52 msv Status resolved => reviewed
2016-07-18 17:52 apv Assigned To bugmaster => apv
2016-07-19 14:14 apv Test case number => bugs modalg_6 bug26270
2016-07-19 15:36 apv Note Added: 0056035
2016-07-19 15:36 apv Assigned To apv => bugmaster
2016-07-19 15:36 apv Status reviewed => tested
2016-07-22 10:23 bugmaster Changeset attached => occt master 05607219
2016-07-22 10:23 bugmaster Status tested => verified
2016-07-22 10:23 bugmaster Resolution open => fixed
2016-07-22 10:43 git Note Added: 0056099
2016-12-09 16:31 aiv Status verified => closed
2016-12-09 16:38 aiv Fixed in Version => 7.1.0