Skip to content

BRepBndLib::AddClose crashes #466

@rajendrasing-pardeshi

Description

@rajendrasing-pardeshi

Description

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::allocate(const unsigned __int64 theSize, const void * __formal) Line 92 C++
TKG3d.dll!NCollection_Array1::NCollection_Array1(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 & Knots, const NCollection_Array1 & 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

Expected Behavior

Should return valid Bounding Box and not crash the app.

Actual Behavior

It crashes the app.

Sample Code or DRAW Tcl Script

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

Operating System

Windows

Compiler

MSVC

Bitness

64-bit

OCCT Version

7.7

Additional Files

cutCompound.zip

Metadata

Metadata

Assignees

Labels

0. NewThe issue was created, but not updated by maintainer. Waiting for updates labels and categories1. ModelingBoolean operations, offsets, primitives, any conversion, brep builders and etc...2. BugSomething isn't working

Type

No type

Projects

Status

Closed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions