For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Access Violation in BRepAlgoAPI_Section::Build()

Thorsten's picture


I am getting an access violation in "BRepAlgoAPI_Section" and I really don't know why.
Can anybody reproduce this? Perhaps the brep shapes are invalid? Something else?
(VS2010 Pro, OCCT 6.6.0, Win32/Debug)

BRep_Builder builder;
bool ok;

TopoDS_Shape face;
ok = BRepTools::Read(face, "C:\\temp\\cutter\\face.brep", builder);
if (!ok ) throw std::exception("Cannot load face.brep");
context->Display(new AIS_Shape(face));

TopoDS_Shape tool;
ok = BRepTools::Read(tool, "C:\\temp\\cutter\\tool.brep", builder);
if (!ok ) throw std::exception("Cannot load tool.brep");
context->Display(new AIS_Shape(tool));

BRepAlgoAPI_Section cutter(face, tool, false);

First-chance exception at 0x01d87cbc in RapidRepair.exe: 0xC0000005: Access violation reading location 0xfefd0000.
Unexpected exception occurred

Vadim Mikhryutin's picture

Hi Thorsten,

0xfefd0000 is the standard null value for a handle.
The only handle in your code is context, so probably this is a bug in OCCT. Try posting this on bugtracker.

jelle's picture

Shouldnt you check for BRepAlgoAPI_Section.IsDone() ?

Thorsten's picture

The exception occurrs in build()

Thorsten's picture

Context is only for debug purposes. Without it the error occurrs too. In ""

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.