MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026270Community[OCCT] OCCT:Modeling Algorithmspublic2015-05-26 13:532016-12-09 16:38
Reportersraymond 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformMacOSOSOS VersionX
Product Version[OCCT] 6.9.0 
Target Version[OCCT] 7.1.0Fixed in Version[OCCT] 7.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
Attached Files

- Relationships

-  Notes
(0055757)
git (administrator)
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 (developer)
2016-07-08 14:56

Dear Mikhail

Could you please review my changes in CR26270 branch.
(0055789)
msv (developer)
2016-07-11 09:50

Dear IFV, please review the fix. It seems we should fill in myParams with some different way.
(0055790)
ifv (developer)
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 (developer)
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 (developer)
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 (administrator)
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 (developer)
2016-07-18 14:30

Please review updated branch CR26270
(0055996)
git (administrator)
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 (administrator)
2016-07-18 15:57

Branch CR26270 has been updated forcibly by ema.

SHA-1: e3cb48694fba890d5c8d298dbac0719aaf998ea4
(0056007)
git (administrator)
2016-07-18 16:40

Branch CR26270 has been updated forcibly by ema.

SHA-1: 168b1fb6d5eceba6f5c1cd0779dd919b791c250e
(0056009)
msv (developer)
2016-07-18 16:52

Reviewed.
(0056035)
apv (tester)
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 (administrator)
2016-07-22 10:43

Branch CR26270 has been deleted by inv.

SHA-1: 168b1fb6d5eceba6f5c1cd0779dd919b791c250e

- Related Changesets
occt: master 05607219
Timestamp: 2016-07-08 11:01:12
Author: 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
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 user533 Status verified => closed
2016-12-09 16:38 user533 Fixed in Version => 7.1.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker