-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when measuring with 'Min Distance' and distance is 0 #288
Comments
Thanks for reporting, that's interesting to fix. |
Reproduced a crash with this unit test: void TestMeasure::BRepMinDistance_TwoConfusedFaces_test()
{
const TopoDS_Face face1 = BRepBuilderAPI_MakeFace(gp_Pln(gp::XOY()));
const TopoDS_Face face2 = BRepBuilderAPI_MakeFace(gp_Pln(gp::XOY()));
try {
const MeasureDistance minDist = MeasureToolBRep::brepMinDistance(face1, face2);
QCOMPARE(minDist.value.value(), 0.);
} catch (const IMeasureError& err) {
qDebug() << QString::fromUtf8(err.message().data(), err.message().length());
}
} In this case this is not crashing because of Standard_ConstructionError exception but by Mayo: after distance computation it checks if the OpenCascade tool used is in valid state(ie BRepExtrema_DistShapeShape::IsDone()) Anyway Mayo should take care of exceptions here and report any error instead of crashing |
Below a test file. Rename the extension Selecting two faces will work as long as they don't overlap, but selecting a face and an edge crashes. |
@Jopie01 |
Pulled the changes and rebuilded Mayo. Problem still exists. See attached video. distance_crash.mp4The error is still
When I open a STEP file, I also see in my terminal
I get the same message when using the AppImage (version 0.8.0) so I don't think it has something to do with this. So I think I'm also waiting here for the new AppImage to see what that one does. I'm starting to suspect some graphics library which is causing trouble. Which one? No idea. That Mayo crashes is not a huge problem (I'm just measuring things), but I wish there were an option to disable making a memory dump (is that even possible?). With bigger files this is taking quite some time and the whole PC is frozen. |
That would be great if you could provide here the callstack info in the memory dump |
Problem is that I don't have any idea where that memory dump is stored. It just tells me that the program is closed and a memory dump created. Do you have a clue where that dump possibly is stored? |
This page seems to provide very useful infos: |
@Jopie01 Try this command: # Enable core dump files
ulimit -c unlimited Then try to run Mayo, if it crashes it should create a core file into the same directory from where Mayo was called. |
I use Mayo to open a STEP file and do some measurements and sometimes when I measure for example two faces which are parallel and exactly (I mean exactly) on each other then Mayo crashes with
Mayo can also crash when you have a face and select an edge which lies on that face and therefore the measurement is also exactly zero. Manually offsetting just a little bit (0.000001) shows 0 and doesn't crash. The quality of the BREP mesh is 'Normal'
The text was updated successfully, but these errors were encountered: