Potential Bug: Crash when increasing a dimension on a model

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
electro707
Posts: 2
Joined: Wed Oct 13, 2021 11:51 pm

Potential Bug: Crash when increasing a dimension on a model

Post by electro707 »

As the title states, if a certain dimension is increased from 3mm to 5mm for example in the attached file (Sketch001), FreeCAD (both 0.19 and the most recent git master build) crashes. This is due to the Fillet fillet. Posted on the bug tracker as bug issue #4760.

Steps to reproduce:
  • * Open at the attached file
    * Edit Sketch001
    * Change the 3mm dimension to 5mm
    * Exit out of editing the sketch
Crash debug log:

Code: Select all

	
Program received signal SIGSEGV, Segmentation fault.
#0 /usr/lib/libc.so.6(+0x3cda0) [0x7f8b333aeda0]
#1 0x7f8a7913bae8 in Geom2d_Curve::Value(double) const from /usr/lib/libTKG2d.so.7+0x18
0000002 0x7f8a7b5ba94d in ChFi3d_Builder::PerformMoreThreeCorner(int, int) from /usr/lib/libTKFillet.so.7+0xb73d
0000003 0x7f8a7b59db6f in ChFi3d_Builder::PerformIntersectionAtEnd(int) from /usr/lib/libTKFillet.so.7+0x80bf
0000004 0x7f8a7b5a28ac in ChFi3d_Builder::PerformOneCorner(int, bool) from /usr/lib/libTKFillet.so.7+0x2d2c
0000005 0x7f8a7b53fa59 in ChFi3d_Builder::PerformFilletOnVertex(int) from /usr/lib/libTKFillet.so.7+0x499
0000006 0x7f8a7b540ad3 in ChFi3d_Builder::Compute() from /usr/lib/libTKFillet.so.7+0xfa3
0000007 0x7f8a7b6d52ce in BRepFilletAPI_MakeFillet::Build() from /usr/lib/libTKFillet.so.7+0x2e
0000008 0x7f89dc5a7479 in PartDesign::Fillet::execute() from /usr/lib/freecad/lib/_PartDesign.so+0x3e9
0000009 0x7f8b352e3f62 in App::DocumentObject::recompute() from /usr/lib/freecad/lib/libFreeCADApp.so+0x122
0000010 0x7f8a8c76bdea in Part::Feature::recompute() from /usr/lib/freecad/lib/Part.so+0xa
0000011 0x7f8b3525fead in App::Document::_recomputeFeature(App::DocumentObject*) from /usr/lib/freecad/lib/libFreeCADApp.so+0x33d
0000012 0x7f8b3527b314 in App::Document::recompute(std::vector<App::DocumentObject*, std::allocator<App::DocumentObject*> > const&, bool, bool*, int) from /usr/lib/freecad/lib/libFreeCADApp.so+0x8f4
0000013 0x7f8b35335eed in App::DocumentPy::recompute(_object*) from /usr/lib/freecad/lib/libFreeCADApp.so+0x2dd
0000014 0x7f8b353360b9 in App::DocumentPy::staticCallback_recompute(_object*, _object*) from /usr/lib/freecad/lib/libFreeCADApp.so+0x29
0000015 /usr/lib/libpython3.9.so.1.0(+0x148f08) [0x7f8b34ba2f08]
0000016 /usr/lib/libpython3.9.so.1.0(_PyObject_MakeTpCall+0x2e3) [0x7f8b34b8b333]
0000017 /usr/lib/libpython3.9.so.1.0(_PyEval_EvalFrameDefault+0x52a8) [0x7f8b34b87218]
0000018 /usr/lib/libpython3.9.so.1.0(+0x126fd9) [0x7f8b34b80fd9]
0000019 /usr/lib/libpython3.9.so.1.0(_PyEval_EvalCodeWithName+0x51) [0x7f8b34b80c41]
0000020 /usr/lib/libpython3.9.so.1.0(PyEval_EvalCode+0x23) [0x7f8b34c37ae3]
0000021 /usr/lib/libpython3.9.so.1.0(+0x1ed9f4) [0x7f8b34c479f4]
0000022 /usr/lib/libpython3.9.so.1.0(+0x1e96cb) [0x7f8b34c436cb]
0000023 /usr/lib/libpython3.9.so.1.0(PyRun_StringFlags+0xa0) [0x7f8b34c3c330]
0000024 0x7f8b34f48cfc in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /usr/lib/freecad/lib/libFreeCADBase.so+0x6c
0000025 0x7f8b35b23656 in Gui::Command::_runCommand(char const*, int, Gui::Command::DoCmd_Type, char const*) from /usr/lib/freecad/lib/libFreeCADGui.so+0x96
0000026 0x7f8b35b237e6 in Gui::Command::_doCommand(char const*, int, Gui::Command::DoCmd_Type, char const*, ...) from /usr/lib/freecad/lib/libFreeCADGui.so+0xe6
0000027 0x7f8b35b23915 in Gui::Command::updateActive() from /usr/lib/freecad/lib/libFreeCADGui.so+0x45
0000028 0x7f89d902e583 in SketcherGui::ViewProviderSketch::unsetEdit(int) from /usr/lib/freecad/lib/SketcherGui.so+0x1f3
0000029 0x7f8b35e5d773 in Gui::ViewProvider::finishEditing() from /usr/lib/freecad/lib/libFreeCADGui.so+0x13
0000030 0x7f8b35aa781d in Gui::Document::_resetEdit() from /usr/lib/freecad/lib/libFreeCADGui.so+0x9d
0000031 0x7f8b35a39dda in Gui::Application::setEditDocument(Gui::Document*) from /usr/lib/freecad/lib/libFreeCADGui.so+0x3a
0000032 0x7f8b35ad2522 in Gui::DocumentPy::resetEdit(_object*) from /usr/lib/freecad/lib/libFreeCADGui.so+0x32
0000033 0x7f8b35ad2559 in Gui::DocumentPy::staticCallback_resetEdit(_object*, _object*) from /usr/lib/freecad/lib/libFreeCADGui.so+0x29
0000034 /usr/lib/libpython3.9.so.1.0(+0x148f08) [0x7f8b34ba2f08]
0000035 /usr/lib/libpython3.9.so.1.0(_PyObject_MakeTpCall+0x2e3) [0x7f8b34b8b333]
0000036 /usr/lib/libpython3.9.so.1.0(_PyEval_EvalFrameDefault+0x52a8) [0x7f8b34b87218]
0000037 /usr/lib/libpython3.9.so.1.0(+0x126fd9) [0x7f8b34b80fd9]
0000038 /usr/lib/libpython3.9.so.1.0(_PyEval_EvalCodeWithName+0x51) [0x7f8b34b80c41]
#39 /usr/lib/libpython3.9.so.1.0(PyEval_EvalCode+0x23) [0x7f8b34c37ae3]
#40 /usr/lib/libpython3.9.so.1.0(+0x1ed9f4) [0x7f8b34c479f4]
0000041 /usr/lib/libpython3.9.so.1.0(+0x1e96cb) [0x7f8b34c436cb]
0000042 /usr/lib/libpython3.9.so.1.0(PyRun_StringFlags+0xa0) [0x7f8b34c3c330]
0000043 0x7f8b34f48cfc in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /usr/lib/freecad/lib/libFreeCADBase.so+0x6c
0000044 0x7f8b35b23656 in Gui::Command::_runCommand(char const*, int, Gui::Command::DoCmd_Type, char const*) from /usr/lib/freecad/lib/libFreeCADGui.so+0x96
0000045 0x7f8b35b237e6 in Gui::Command::_doCommand(char const*, int, Gui::Command::DoCmd_Type, char const*, ...) from /usr/lib/freecad/lib/libFreeCADGui.so+0xe6
0000046 0x7f89d905f529 in SketcherGui::TaskDlgEditSketch::reject() from /usr/lib/freecad/lib/SketcherGui.so+0x159
0000047 0x7f8b35dd5979 in Gui::TaskView::TaskView::reject() from /usr/lib/freecad/lib/libFreeCADGui.so+0x69
0000048 /usr/lib/libQt5Core.so.5(+0x2f07a0) [0x7f8b33a5f7a0]
0000049 /usr/lib/libQt5Widgets.so.5(+0x2ff761) [0x7f8b346a4761]
0000050 /usr/lib/libQt5Core.so.5(+0x2f07a0) [0x7f8b33a5f7a0]
0000051 0x7f8b345f74e3 in QAbstractButton::clicked(bool) from /usr/lib/libQt5Widgets.so.5+0x43
0000052 /usr/lib/libQt5Widgets.so.5(+0x25276c) [0x7f8b345f776c]
0000053 /usr/lib/libQt5Widgets.so.5(+0x254374) [0x7f8b345f9374]
0000054 0x7f8b345f9595 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /usr/lib/libQt5Widgets.so.5+0xf5
0000055 0x7f8b345430be in QWidget::event(QEvent*) from /usr/lib/libQt5Widgets.so.5+0x20e
0000056 0x7f8b344ffd62 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/libQt5Widgets.so.5+0x82
0000057 0x7f8b34507ac9 in QApplication::notify(QObject*, QEvent*) from /usr/lib/libQt5Widgets.so.5+0xaa9
0000058 0x7f8b35af2ab9 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad/lib/libFreeCADGui.so+0x89
0000059 0x7f8b33a283ba in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/libQt5Core.so.5+0x13a
0000060 0x7f8b3450657b in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) from /usr/lib/libQt5Widgets.so.5+0x1bb
0000061 /usr/lib/libQt5Widgets.so.5(+0x1b7a84) [0x7f8b3455ca84]
0000062 /usr/lib/libQt5Widgets.so.5(+0x1badb5) [0x7f8b3455fdb5]
0000063 0x7f8b344ffd62 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/libQt5Widgets.so.5+0x82
0000064 0x7f8b35af2ab9 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad/lib/libFreeCADGui.so+0x89
0000065 0x7f8b33a283ba in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/libQt5Core.so.5+0x13a
0000066 0x7f8b33e031f0 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /usr/lib/libQt5Gui.so.5+0x6b0
0000067 0x7f8b33dd87d5 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/libQt5Gui.so.5+0xb5
0000068 /usr/lib/libQt5XcbQpa.so.5(+0x62fcc) [0x7f8b2df7ffcc]
0000069 /usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x26c) [0x7f8b317a44dc]
0000070 /usr/lib/libglib-2.0.so.0(+0xa8749) [0x7f8b317f8749]
0000071 /usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x31) [0x7f8b317a1bc1]
0000072 0x7f8b33a80fe6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/libQt5Core.so.5+0x66
0000073 0x7f8b33a26d2c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/libQt5Core.so.5+0x12c
0000074 0x7f8b33a2f294 in QCoreApplication::exec() from /usr/lib/libQt5Core.so.5+0x94
0000075 0x7f8b35a4482e in Gui::Application::runApplication() from /usr/lib/freecad/lib/libFreeCADGui.so+0x1b9e
0000076 freecad(+0x4858) [0x560a8a909858]
0000077 /usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7f8b33399b25]
0000078 freecad(+0x4b8e) [0x560a8a909b8e]
Attachments
bench_meter.FCStd
The CAD file which crashes when changing Sketch001's 3mm dimension to 5mm
(67.64 KiB) Downloaded 31 times
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Potential Bug: Crash when increasing a dimension on a model

Post by wmayer »

Yes, it's a bug but in the underlying CAD kernel, not in FreeCAD. The top seven function calls are from the kernel and afair the problem there is that a null handle is dereferenced.

At least with OCCT 7.6.0 beta it doesn't crash any more but raises an error that the fillet cannot be created.

Our forum member chennes has provided a patch that has been accepted by OCCT:
https://forum.freecadweb.org/viewtopic. ... 09#p471609
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Potential Bug: Crash when increasing a dimension on a model

Post by thomas-neemann »

wmayer wrote: Thu Oct 14, 2021 8:33 am
it works in realthunder
bench_meter-rt-ok.FCStd
(71.81 KiB) Downloaded 30 times
rt.jpg
rt.jpg (123.89 KiB) Viewed 1044 times


OS: Ubuntu 20.04.1 LTS (XFCE/xubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 2021.922.24301 +4188 (Git) AppImage
Build type: Release
Branch: LinkDaily
Hash: 3de879c7a2ba7111cc769d98636eb6d43189459d
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.1
OCC version: 7.5.2
Locale: German/Germany (de_DE)
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
user1234
Veteran
Posts: 3333
Joined: Mon Jul 11, 2016 5:08 pm

Re: Potential Bug: Crash when increasing a dimension on a model

Post by user1234 »

Some observation. I does not crash on with OCCT7.6.0, but creates an error, like the former writers wrote. But the main reason of the crash/error is, because the fillet get after the change the false edge input due the topological name issue. This is the reason while it works always on the branch of realthunder.

So the issue #4760 can be closed, because the reason is issue #922.

Greetings
user1234
Post Reply