View Issue Details

IDProjectCategoryView StatusLast Update
0023909Open CASCADEOCCT:Modeling Algorithmspublic2013-04-29 15:24
ReporterabvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2008 
Product Version6.6.0 
Target Version6.6.0Fixed in Version6.6.0 
Summary0023909: FPE in BSplSLib::RationalDerivative
DescriptionRunning OCCT tests in Debug mode on Windows reveals the problem with FPE exception in BSplSLib::RationalDerivative, due to using uninitialized floating point value.
Steps To ReproduceIn Debug mode:
Draw[]> test bugs modalg_4 bug8842_5 1
...
An exception was caught 00631B80 : Standard_Overflow: FLT OVERFLOW
** Exception ** 00631B80 : Standard_Overflow: FLT OVERFLOW
Tcl Exception: ** Exception ** 00631B80 : Standard_Overflow: FLT OVERFLOW
Additional information
and documentation updates
The problem is probably due to taking value of array HomogeneousArray (pointer to HDerivatives) out of his bounds on line 178.

Stack trace:

     TKMath.dll!BSplSLib::RationalDerivative(const int UDeg=1, const int VDeg=2, const int N=2, const int M=5, double & HDerivatives=0.00000000000000000, double & RDerivatives=0.00000000000000000, const unsigned int All=0) Line 225 + 0x9 bytes C++


> TKMath.dll!BSplSLib::DN(const double U=0.60643614955614122, const double V=1.0000000000000000, const int Nu=5, const int Nv=2, const int UIndex=0, const int VIndex=0, const TColgp_Array2OfPnt & Poles={...}, const TColStd_Array2OfReal & Weights={...}, const TColStd_Array1OfReal & UKnots={...}, const TColStd_Array1OfReal & VKnots={...}, const TColStd_Array1OfInteger & UMults={...}, const TColStd_Array1OfInteger & VMults={...}, const int UDegree=2, const int VDegree=1, const unsigned int URat=0, const unsigned int VRat=1, const unsigned int UPer=0, const unsigned int VPer=0, gp_Vec & Vn={...}) Line 1154 + 0x31 bytes C++
     TKG3d.dll!Geom_BSplineSurface::DN(const double U=0.60643614955614122, const double V=1.0000000000000000, const int Nu=5, const int Nv=2) Line 321 + 0x95 bytes C++
     TKG3d.dll!derivatives(int MaxOrder=3, int MinOrder=2, const double U=0.60643614955614122, const double V=1.0000000000000000, const Handle_Geom_Surface & basisSurf={...}, const int Nu=1, const int Nv=1, const unsigned int AlongU=0, const unsigned int AlongV=0, const Handle_Geom_BSplineSurface & L={...}, TColgp_Array2OfVec & DerNUV={...}, TColgp_Array2OfVec & DerSurf={...}) Line 195 + 0x5d bytes C++
     TKG3d.dll!Geom_OffsetSurface::SetD1(const double U=0.60643614955614122, const double V=1.0000000000000000, gp_Pnt & P={...}, gp_Vec & D1U={...}, gp_Vec & D1V={...}, const gp_Vec & d2u={...}, const gp_Vec & d2v={...}, const gp_Vec & d2uv={...}) Line 1728 + 0x45 bytes C++
     TKG3d.dll!Geom_OffsetSurface::LocalD1(const double U=0.60643614955614122, const double V=1.0000000000000000, const int USide=0, const int VSide=-1, gp_Pnt & P={...}, gp_Vec & D1U={...}, gp_Vec & D1V={...}) Line 803 C++
     TKG3d.dll!GeomAdaptor_Surface::D1(const double U=0.60643614955614122, const double V=1.0000000000000000, gp_Pnt & P={...}, gp_Vec & D1U={...}, gp_Vec & D1V={...}) Line 614 C++
     TKBRep.dll!BRepAdaptor_Surface::D1(const double U=0.60643614955614122, const double V=1.0000000000000000, gp_Pnt & P={...}, gp_Vec & D1U={...}, gp_Vec & D1V={...}) Line 219 C++
     TKTopAlgo.dll!BRepGProp_Face::Normal(const double U=0.60643614955614122, const double V=1.0000000000000000, gp_Pnt & P={...}, gp_Vec & VNor={...}) Line 216 C++
     TKTopAlgo.dll!Compute(BRepGProp_Face & S={...}, BRepGProp_Domain & D={...}, const gp_Pnt & loc={...}, double & dim=7395.5973752797281, gp_Pnt & g={...}, gp_Mat & inertia={...}) Line 513 C++
     TKTopAlgo.dll!BRepGProp_Sinert::Perform(BRepGProp_Face & S={...}, BRepGProp_Domain & D={...}) Line 710 + 0x26 bytes C++
     TKTopAlgo.dll!surfaceProperties(const TopoDS_Shape & S={...}, GProp_GProps & Props={...}, const double Eps=1.0000000000000000) Line 86 C++
     TKTopAlgo.dll!BRepGProp::SurfaceProperties(const TopoDS_Shape & S={...}, GProp_GProps & Props={...}) Line 101 + 0x15 bytes C++
     TKTopTest.dll!props(Draw_Interpretor & di={...}, int n=2, const char * * a=0x03c24450) Line 81 + 0x10 bytes C++
TagsNo tags attached.
Test case number

Activities

abv

2013-04-18 11:51

manager   ~0024200

The proposed fix is pushed to CR23909, please review

ifv

2013-04-18 13:24

developer   ~0024205

No remarks

Related Changesets

occt: master 174178b9

2013-04-18 07:39:40

abv


Committer: bugmaster Details Diff
0023909: FPE in BSplSLib::RationalDerivative

Avoid use of array out of its bounds in BSplSLib::RationalDerivative().

In addition, Resource_Manager is fixed to allow saving with empty resource map (test bugs fclasses bug181_1).
Affected Issues
0023909
mod - src/BSplSLib/BSplSLib.cxx Diff File
mod - src/Resource/Resource_Manager.cxx Diff File

Issue History

Date Modified Username Field Change
2013-04-18 10:01 abv New Issue
2013-04-18 10:01 abv Assigned To => jgv
2013-04-18 10:03 abv Description Updated
2013-04-18 10:03 abv Steps to Reproduce Updated
2013-04-18 11:51 abv Note Added: 0024200
2013-04-18 11:51 abv Assigned To jgv => ifv
2013-04-18 11:51 abv Status new => resolved
2013-04-18 13:24 ifv Note Added: 0024205
2013-04-18 13:24 ifv Status resolved => reviewed
2013-04-19 18:00 bugmaster Changeset attached => occt master 174178b9
2013-04-19 18:00 bugmaster Assigned To ifv => bugmaster
2013-04-19 18:00 bugmaster Status reviewed => verified
2013-04-19 18:00 bugmaster Resolution open => fixed
2013-04-22 09:25 abv Target Version 6.7.0 => 6.6.0
2013-04-23 13:34 aiv Status verified => closed
2013-04-29 15:24 aiv Fixed in Version => 6.6.0