Crash on changing fillet radius

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!
chrisb
Posts: 33789
Joined: Tue Mar 17, 2015 9:14 am

Crash on changing fillet radius

Postby chrisb » Fri Nov 06, 2020 4:55 pm

With the model from this post: https://forum.freecadweb.org/viewtopic. ... 64#p445631 FreeCAD crashes when I edit Fillet004.
Please confirm.

To reproduce:
- open the file Fertig.FCStd
- double click Fillet004
- change radius to 13mm

-> silent crash of FreeCAD.

OS: macOS 10.15
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22846 (Git)
Build type: Release
Branch: master
Hash: 1f46b72491a0008384a6db4f2615a656249f6f08
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Bei3lay
Posts: 34
Joined: Wed Aug 28, 2019 6:48 am

Re: Crash on changing fillet radius

Postby Bei3lay » Fri Nov 06, 2020 5:51 pm

Confirm. I get segmentation fault on Linux Mint.

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22845 (Git)
Build type: Debug
Branch: master
Hash: bc2d3e9d2b60ffa32888da422f091c5e51a216c3
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
User avatar
GlouGlou
Posts: 2962
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Crash on changing fillet radius

Postby GlouGlou » Fri Nov 06, 2020 7:42 pm

comfirm.
...
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22846 (Git)
Build type: Release
Branch: master
Hash: 1f46b72491a0008384a6db4f2615a656249f6f08
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
Bei3lay
Posts: 34
Joined: Wed Aug 28, 2019 6:48 am

Re: Crash on changing fillet radius

Postby Bei3lay » Fri Nov 06, 2020 8:18 pm

It seems that the problem appears when

Code: Select all

mkFillet.Build();
is executed from https://github.com/FreeCAD/FreeCAD/blob ... t.cpp#L100

The whole thing is inside try..catch statement, but I guess the exception is not OpenCascade's Standard_Failure.
openBrain
Posts: 5654
Joined: Fri Nov 09, 2018 5:38 pm

Re: Crash on changing fillet radius

Postby openBrain » Fri Nov 06, 2020 8:40 pm

Confirmed. Here is the call trace :

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x3efd0) [0x7fdc999b7fd0]
#1  0x7fdc5046d0ca in BRep_Tool::Curve(TopoDS_Edge const&, TopLoc_Location&, double&, double&) from /usr/lib/x86_64-linux-gnu/libTKBRep.so.7+0x2a
#2  0x7fdc50470556 in BRep_Tool::Curve(TopoDS_Edge const&, double&, double&) from /usr/lib/x86_64-linux-gnu/libTKBRep.so.7+0x46
#3  0x7fdc533b0ef5 in ChFi3d_Builder::PerformIntersectionAtEnd(int) from /usr/lib/x86_64-linux-gnu/libTKFillet.so.7+0x3b05
#4  0x7fdc533b9307 in ChFi3d_Builder::PerformOneCorner(int, bool) from /usr/lib/x86_64-linux-gnu/libTKFillet.so.7+0x1097
#5  0x7fdc53357218 in ChFi3d_Builder::PerformFilletOnVertex(int) from /usr/lib/x86_64-linux-gnu/libTKFillet.so.7+0x4e8
#6  0x7fdc533581d1 in ChFi3d_Builder::Compute() from /usr/lib/x86_64-linux-gnu/libTKFillet.so.7+0xe31
#7  0x7fdc53510283 in BRepFilletAPI_MakeFillet::Build() from /usr/lib/x86_64-linux-gnu/libTKFillet.so.7+0x33
#8  0x7fdbf6576c00 in PartDesign::Fillet::execute() from /home/OB/dev/FCOB/FCOBBuild/Mod/PartDesign/_PartDesign.so+0x34e
#9  0x7fdc9cfb34ef in App::DocumentObject::recompute() from /home/OB/dev/FCOB/FCOBBuild/lib/libFreeCADApp.so+0xd1
#10  0x7fdc53b21601 in Part::Feature::recompute() from /home/OB/dev/FCOB/FCOBBuild/Mod/Part/Part.so+0x1b
#11  0x7fdc9cebde06 in App::Document::_recomputeFeature(App::DocumentObject*) from /home/OB/dev/FCOB/FCOBBuild/lib/libFreeCADApp.so+0x1e0
#12  0x7fdc9cebeb03 in App::Document::recomputeFeature(App::DocumentObject*, bool) from /home/OB/dev/FCOB/FCOBBuild/lib/libFreeCADApp.so+0x107
#13  0x7fdbf5ec2faf in PartDesignGui::TaskFilletParameters::onLengthChanged(double) from /home/OB/dev/FCOB/FCOBBuild/Mod/PartDesign/PartDesignGui.so+0x95
#14  /home/OB/dev/FCOB/FCOBBuild/Mod/PartDesign/PartDesignGui.so(+0x379457) [0x7fdbf5ec3457]
#15  0x7fdc9a5c4555 in QMetaObject::activate(QObject*, int, int, void**) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x865
#16  0x7fdc9ece7ecf in Gui::QuantitySpinBox::valueChanged(double) from /home/OB/dev/FCOB/FCOBBuild/lib/libFreeCADGui.so+0x57
#17  0x7fdc9ece58ee in Gui::QuantitySpinBox::updateFromCache(bool) from /home/OB/dev/FCOB/FCOBBuild/lib/libFreeCADGui.so+0xe6
#18  0x7fdc9ece6266 in Gui::QuantitySpinBox::stepBy(int) from /home/OB/dev/FCOB/FCOBBuild/lib/libFreeCADGui.so+0x1bc
#19  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x2f13dd) [0x7fdc9b4b03dd]
#20  0x7fdc9b4b07f7 in QAbstractSpinBox::mousePressEvent(QMouseEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x187
#21  0x7fdc9b35299f in QWidget::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0xb4f
#22  0x7fdc9b4b3cb5 in QAbstractSpinBox::event(QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0xc5
#23  0x7fdc9ece6af3 in Gui::QuantitySpinBox::event(QEvent*) from /home/OB/dev/FCOB/FCOBBuild/lib/libFreeCADGui.so+0x23
#24  0x7fdc9b31383c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x9c
#25  0x7fdc9b31b65f in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x7ff
#26  0x7fdc9e74e25a in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/OB/dev/FCOB/FCOBBuild/lib/libFreeCADGui.so+0x10e
#27  0x7fdc9a5958d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x118
#28  0x7fdc9b31a632 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1d2
#29  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1ae16b) [0x7fdc9b36d16b]
#30  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1b07da) [0x7fdc9b36f7da]
#31  0x7fdc9b31383c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x9c
#32  0x7fdc9b31b104 in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2a4
#33  0x7fdc9e74e25a in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/OB/dev/FCOB/FCOBBuild/lib/libFreeCADGui.so+0x10e
#34  0x7fdc9a5958d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x118
#35  0x7fdc9ab57583 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0x6f3
#36  0x7fdc9ab59055 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0x135
#37  0x7fdc9ab302eb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0xab
#38  /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5(+0x9f260) [0x7fdc8ac02260]
#39  /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2e7) [0x7fdc94edd417]
#40  /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4c650) [0x7fdc94edd650]
#41  /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7fdc94edd6dc]
#42  0x7fdc9a5ee88f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x5f
#43  0x7fdc9a59390a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x13a
#44  0x7fdc9a59c9b4 in QCoreApplication::exec() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x94
#45  0x7fdc9e613560 in Gui::Application::runApplication() from /home/OB/dev/FCOB/FCOBBuild/lib/libFreeCADGui.so+0x23f6
#46  bin/FreeCAD(+0x889d) [0x55b910d4a89d]
#47  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fdc9999ab97]
#48  bin/FreeCAD(+0x7b6a) [0x55b910d49b6a]
User avatar
papyblaise
Posts: 3323
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Crash on changing fillet radius

Postby papyblaise » Fri Nov 06, 2020 9:13 pm

I can do a R14 fillet , not whith Fillet but whith Sketch and Pocket
or more if you accept nonconcentric radiies
the problem is at the cross between the cylinder and the square
Attachments
R25.PNG
R25.PNG (22.84 KiB) Viewed 794 times
R14.PNG
R14.PNG (34.82 KiB) Viewed 797 times
rakela
Posts: 30
Joined: Fri Oct 16, 2020 12:43 am
Location: USA
Contact:

Re: Crash on changing fillet radius

Postby rakela » Sat Nov 07, 2020 12:23 am

confirmd

OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22894 (Git)
Build type: Release
Branch: master
Hash: 9eb080488d970d313c538473e7272117ea0a7cd1
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
chrisb
Posts: 33789
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash on changing fillet radius

Postby chrisb » Sat Nov 07, 2020 2:07 am

Thanks for all the reports back.
Uwe, you worked on the fillets, care to take a look?
uwestoehr wrote: pinged by pinger macro
wmayer wrote: pinged by pinger macro
Or should I create a ticket?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
uwestoehr
Posts: 2677
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany

Re: Crash on changing fillet radius

Postby uwestoehr » Sat Nov 07, 2020 2:13 am

chrisb wrote:
Sat Nov 07, 2020 2:07 am
Uwe, you worked on the fillets, care to take a look?
I would have a look but cannot promise I will find time soon. In any case please create a bug and CC me there.
wmayer
Site Admin
Posts: 17274
Joined: Thu Feb 19, 2009 10:32 am

Re: Crash on changing fillet radius

Postby wmayer » Sat Nov 07, 2020 10:02 am

chrisb wrote:
Sat Nov 07, 2020 2:07 am
Or should I create a ticket?
I don't think there is much we can do. When you look at the call stack you see that it crashes deep inside OCC code and IIRC I had a very similar call stack for another project and the reason was that a null handle was de-referenced.

So, it's OCC to blame for this crash and needs to be fixed upstream.

Since OCCT 7.5 has been officially released it might be worth to check with this version if the fillet operation still crashes.