MantisBT - Community
View Issue Details
0026270Community[OCCT] OCCT:Modeling Algorithmspublic2015-05-26 13:532016-12-09 16:38
sraymond 
bugmaster 
normalminor 
closedfixed 
MacOSX
[OCCT] 6.9.0 
[OCCT] 7.1.0[OCCT] 7.1.0 
bugs modalg_6 bug26270
0026270: GeomFill_NSections constructor crash
The 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.

Call GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC) with any sequence of curve.
No tags attached.
Issue History
2015-05-26 13:53sraymondNew Issue
2015-05-26 13:53sraymondAssigned To => msv
2015-05-26 14:57msvTarget Version7.0.0 => 7.1.0
2016-07-06 17:12msvAssigned Tomsv => aka
2016-07-06 17:12msvStatusnew => assigned
2016-07-06 17:38msvAssigned Toaka => ema
2016-07-08 14:14gitNote Added: 0055757
2016-07-08 14:56emaNote Added: 0055759
2016-07-08 14:56emaAssigned Toema => msv
2016-07-08 14:56emaStatusassigned => resolved
2016-07-11 09:50msvNote Added: 0055789
2016-07-11 09:50msvAssigned Tomsv => ifv
2016-07-11 10:36ifvNote Added: 0055790
2016-07-11 10:36ifvAssigned Toifv => msv
2016-07-11 10:36ifvStatusresolved => feedback
2016-07-11 11:16msvNote Added: 0055798
2016-07-11 11:16msvAssigned Tomsv => ema
2016-07-11 11:16msvStatusfeedback => assigned
2016-07-11 15:40ifvNote Added: 0055824
2016-07-18 14:25gitNote Added: 0055991
2016-07-18 14:30emaNote Added: 0055994
2016-07-18 14:30emaAssigned Toema => msv
2016-07-18 14:30emaStatusassigned => resolved
2016-07-18 15:16gitNote Added: 0055996
2016-07-18 15:57gitNote Added: 0056002
2016-07-18 16:40gitNote Added: 0056007
2016-07-18 16:52msvNote Added: 0056009
2016-07-18 16:52msvAssigned Tomsv => bugmaster
2016-07-18 16:52msvStatusresolved => reviewed
2016-07-18 17:52apvAssigned Tobugmaster => apv
2016-07-19 14:14apvTest case number => bugs modalg_6 bug26270
2016-07-19 15:36apvNote Added: 0056035
2016-07-19 15:36apvAssigned Toapv => bugmaster
2016-07-19 15:36apvStatusreviewed => tested
2016-07-22 10:23bugmasterChangeset attached => occt master 05607219
2016-07-22 10:23bugmasterStatustested => verified
2016-07-22 10:23bugmasterResolutionopen => fixed
2016-07-22 10:43gitNote Added: 0056099
2016-12-09 16:31aivStatusverified => closed
2016-12-09 16:38aivFixed in Version => 7.1.0

Notes
(0055757)
git   
2016-07-08 14:14   
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
(0055759)
ema   
2016-07-08 14:56   
Dear Mikhail

Could you please review my changes in CR26270 branch.
(0055789)
msv   
2016-07-11 09:50   
Dear IFV, please review the fix. It seems we should fill in myParams with some different way.
(0055790)
ifv   
2016-07-11 10:36   
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.
(0055798)
msv   
2016-07-11 11:16   
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.
(0055824)
ifv   
2016-07-11 15:40   
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.
(0055991)
git   
2016-07-18 14:25   
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

(0055994)
ema   
2016-07-18 14:30   
Please review updated branch CR26270
(0055996)
git   
2016-07-18 15:16   
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

(0056002)
git   
2016-07-18 15:57   
Branch CR26270 has been updated forcibly by ema.

SHA-1: e3cb48694fba890d5c8d298dbac0719aaf998ea4
(0056007)
git   
2016-07-18 16:40   
Branch CR26270 has been updated forcibly by ema.

SHA-1: 168b1fb6d5eceba6f5c1cd0779dd919b791c250e
(0056009)
msv   
2016-07-18 16:52   
Reviewed.
(0056035)
apv   
2016-07-19 15:36   
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%]
(0056099)
git   
2016-07-22 10:43   
Branch CR26270 has been deleted by inv.

SHA-1: 168b1fb6d5eceba6f5c1cd0779dd919b791c250e