View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023504 | Community | OCCT:Modeling Algorithms | public | 2012-11-01 15:06 | 2012-11-16 13:18 |
Reporter | Vitezslav Zajic | Assigned To | Vitezslav Zajic | ||
Priority | normal | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2010 | ||
Product Version | 6.5.3 | ||||
Target Version | 6.5.4 | Fixed in Version | 6.5.4 | ||
Summary | 0023504: The function Adaptor3d_TopolTool::BSplSamplePnts leaves uninitialized items in myUPars and myVPars arrays | ||||
Description | The function Adaptor3d_TopolTool::BSplSamplePnts leaves uninitialized items in myUPars and myVPars arrays, which are later used by IntPolyh_MaillageAffinage::FillArrayOfPnt function and this triggers an OuOfRange exception in Geom_BSplineSurface::ValidateCache (see attached screenshot of the debugger). The following code (part of Adaptor3d_TopolTool::BSplSamplePnts function) creates an array myUPars of the size myNbSamplesU, but if some item in anUFlg array is set to false, it does not initializes all of the items in myUPars: // // U bFlag=(myNbSamplesU < theNUmin); if (bFlag) { myNbSamplesU=nbsu; } // myUPars = new TColStd_HArray1OfReal(1, myNbSamplesU); // for(j = 0, i = 1; i <= nbsu; ++i) { if (bFlag) { myUPars->SetValue(i,anUPars(i)); } else { if(anUFlg(i)) { ++j; myUPars->SetValue(j,anUPars(i)); } } } // I've replaced this code with the following one that solved the problem for me: // // U myNbSamplesU = nbsu; if (bFlag) { myUPars = new TColStd_HArray1OfReal(1, myNbSamplesU); for (i = 1; i <= nbsu; ++i) { myUPars->SetValue(i,anUPars(i)); } } else { for (i = 1; i <= nbsu; ++i) { if (!anUFlg(i)) { --myNbSamplesU; } } myUPars = new TColStd_HArray1OfReal(1, myNbSamplesU); for(j = 0, i = 1; i <= nbsu; ++i) { if(anUFlg(i)) { ++j; myUPars->SetValue(j, anUPars(i)); } } } // The same applies for V parameters. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2012-11-01 15:06 | Vitezslav Zajic | New Issue | |
2012-11-01 15:06 | Vitezslav Zajic | Assigned To | => jgv |
2012-11-01 15:06 | Vitezslav Zajic | File Added: OCCT crash.png | |
2012-11-01 15:32 |
|
Target Version | => 6.5.4 |
2012-11-02 18:09 |
|
Note Added: 0022089 | |
2012-11-02 18:09 |
|
Status | new => resolved |
2012-11-02 18:09 |
|
Assigned To | jgv => abv |
2012-11-08 09:50 |
|
Assigned To | abv => Vitezslav Zajic |
2012-11-08 09:50 |
|
Status | resolved => reviewed |
2012-11-08 09:52 |
|
Status | reviewed => verified |
2012-11-08 09:52 |
|
Resolution | open => fixed |
2012-11-08 09:52 |
|
Changeset attached | => occt master 07782e0c |
2012-11-16 13:13 | bugmaster | Fixed in Version | => 6.5.4 |
2012-11-16 13:18 | bugmaster | Status | verified => closed |