BRepBndLib::AddClose crashes

I am attaching 3d shape for which BRepBndLib::AddClose is crashing with following callstack -

My code -

Standard_Real xMin, yMin, zMin, xMax, yMax, zMax;
Bnd_Box bndBox;
BRepBndLib::AddClose(shape, bndBox);

Crash callstack:-

ntdll.dll!00007fffc59e9d88() Unknown
ntdll.dll!00007fffc59831f2() Unknown
ntdll.dll!00007fffc5a7fa1a() Unknown
ntdll.dll!00007fffc597de8b() Unknown
ntdll.dll!00007fffc59aae2f() Unknown
ntdll.dll!00007fffc597c20e() Unknown
ntdll.dll!00007fffc597be86() Unknown
ucrtbased.dll!00007ffec8701ba6() Unknown
ucrtbased.dll!00007ffec870194d() Unknown
ucrtbased.dll!00007ffec8704a0f() Unknown
ucrtbased.dll!00007ffec870546e() Unknown
TKernel.dll!Standard::AllocateOptimal(const unsigned __int64 theSize) Line 427 C++
TKG3d.dll!NCollection_Allocator<double>::allocate(const unsigned __int64 theSize, const void * __formal) Line 92 C++
TKG3d.dll!NCollection_Array1<double>::NCollection_Array1<double>(const int theLower, const int theUpper) Line 125 C++
TKG3d.dll!TColStd_HArray1OfReal::TColStd_HArray1OfReal(const int theLower, const int theUpper) Line 21 C++
TKG3d.dll!Geom_BSplineCurve::UpdateKnots() Line 1078 C++
TKG3d.dll!Geom_BSplineCurve::InsertKnots(const NCollection_Array1<double> & Knots, const NCollection_Array1<int> & Mults, const double Epsilon, const bool Add) Line 384 C++
TKG3d.dll!Geom_BSplineCurve::Segment(const double U1, const double U2, const double theTolerance) Line 538 C++
TKGeomBase.dll!BndLib_Add3dCurve::Add(const Adaptor3d_Curve & C, const double U1, const double U2, const double Tol, Bnd_Box & B) Line 224 C++
TKGeomBase.dll!BndLib_Add3dCurve::Add(const Adaptor3d_Curve & C, const double Tol, Bnd_Box & B) Line 116 C++
TKTopAlgo.dll!BRepBndLib::AddClose(const TopoDS_Shape & S, Bnd_Box & B) Line 215 C++
> OCCTViewer.exe!main(int argc, char * * argv) Line 141 C++
OCCTViewer.exe!invoke_main() Line 79 C++
OCCTViewer.exe!__scrt_common_main_seh() Line 288 C++
OCCTViewer.exe!__scrt_common_main() Line 331 C++
OCCTViewer.exe!mainCRTStartup(void * __formal) Line 17 C++
kernel32.dll!00007fffc424e8d7() Unknown
ntdll.dll!00007fffc5a1bf6c() Unknown

Attachments: 
Dmitrii Pasukhin's picture

Hello. Please report issue here: Issues · Open-Cascade-SAS/OCCT

I will assigne issue on me.

Direct link for issue registration: https://github.com/Open-Cascade-SAS/OCCT/issues/new/choose

Best regards, Dmitrii.

Rajendra Pardeshi's picture
Dmitrii Pasukhin's picture

Fix is merged.