Fri, 09/13/2013 - 18:48
Hi,
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);
cutter.Approximation(true);
cutter.ComputePCurveOn1(true);
cutter.Build();
First-chance exception at 0x01d87cbc in RapidRepair.exe: 0xC0000005: Access violation reading location 0xfefd0000.
Unexpected exception occurred
Sat, 09/14/2013 - 01:36
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.
Sat, 09/14/2013 - 03:50
Shouldnt you check for BRepAlgoAPI_Section.IsDone() ?
Sat, 09/14/2013 - 14:42
The exception occurrs in build()
Sat, 09/14/2013 - 14:49
Context is only for debug purposes. Without it the error occurrs too. In "cutter.build()"