Segfault when using part desgin fillet

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!
patn
Posts: 27
Joined: Fri Sep 21, 2018 10:59 pm

Segfault when using part desgin fillet

Postby patn » Fri Oct 26, 2018 12:22 am

Problem:Use part design fillet on edge (highlighted in photo), program immediately seg faults
info:
  • edge is offset by ~0.16mm to edge below
  • edge below fillets with no issue
Solution: ?
Using FreeCAD on Debian Testing, version info in log
Log:
FreeCAD 0.18, Libs: 0.18R14784 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2018
##### #### ### ####
# # # # # #
# ## #### #### # # # # #
#### # # # # # # # ##### # #
# # #### #### # # # # #
# # # # # # # # # ## ## ##
# # #### #### ### # # #### ## ## ##

Thread size out of range
Program received signal SIGSEGV, Segmentation fault.
#0 /lib/x86_64-linux-gnu/libc.so.6(+0x35fc0) [0x7fe19d732fc0]
#1 0x7fe1280c8d8d in BRep_Tool::Curve(TopoDS_Edge const&, TopLoc_Location&, double&, double&) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libTKBRep.so.7+0x1d
#2 0x7fe1280cbf74 in BRep_Tool::Curve(TopoDS_Edge const&, double&, double&) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libTKBRep.so.7+0x34
#3 0x7fe12a061777 in ChFi3d_Builder::PerformIntersectionAtEnd(int) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libTKFillet.so.7+0x2147
#4 0x7fe12a06b5c5 in ChFi3d_Builder::PerformOneCorner(int, bool) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libTKFillet.so.7+0x1195
#5 0x7fe12a00b564 in ChFi3d_Builder::PerformFilletOnVertex(int) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libTKFillet.so.7+0x504
#6 0x7fe12a00bc31 in ChFi3d_Builder::Compute() from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libTKFillet.so.7+0x5e1
#7 0x7fe12a1be5e0 in BRepFilletAPI_MakeFillet::Build() from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libTKFillet.so.7+0x20
#8 0x7fe12a4c00b8 in PartDesign::Fillet::execute() from /tmp/.mount_FreeCALrn89s/usr/lib/freecad-daily/lib/_PartDesign.so+0x3d8
#9 0x7fe19f630f19 in App::DocumentObject::recompute() from ././/lib/freecad-daily/lib/libFreeCADApp.so+0x69
#10 0x7fe125ef563b in Part::Feature::recompute() from ././/lib/freecad-daily/lib/Part.so+0xb
#11 0x7fe19f5ff2bc in App::Document::_recomputeFeature(App::DocumentObject*) from ././/lib/freecad-daily/lib/libFreeCADApp.so+0x9c
#12 0x7fe19f604903 in App::Document::recompute() from ././/lib/freecad-daily/lib/libFreeCADApp.so+0x1c3
#13 0x7fe19f65a0b4 in App::DocumentPy::recompute(_object*) from ././/lib/freecad-daily/lib/libFreeCADApp.so+0x34
#14 0x7fe19f65a217 in App::DocumentPy::staticCallback_recompute(_object*, _object*) from ././/lib/freecad-daily/lib/libFreeCADApp.so+0x27
#15 /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x4bd4) [0x7fe19ed8a0d4]
#16 /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80d) [0x7fe19ed8c17d]
#17 /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCode+0x32) [0x7fe19ed8c462]
#18 /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyRun_StringFlags+0x79) [0x7fe19ecd0ac9]
#19 0x7fe19f23e0c4 in Base::InterpreterSingleton::runString(char const*) from ././/lib/freecad-daily/lib/libFreeCADBase.so+0x54
#20 0x7fe19fd387a9 in Gui::Command::doCommand(Gui::Command::DoCmd_Type, char const*, ...) from ././/lib/freecad-daily/lib/libFreeCADGui.so+0x129
#21 0x7fe19fd38c44 in Gui::Command::updateActive() from ././/lib/freecad-daily/lib/libFreeCADGui.so+0x24
#22 0x7fe12334cc05 in finishFeature(Gui::Command const*, std::string const&, App::DocumentObject*, bool, bool) from /tmp/.mount_FreeCALrn89s/usr/lib/freecad-daily/lib/PartDesignGui.so+0x125
#23 0x7fe12334d3d0 in finishDressupFeature(Gui::Command const*, std::string const&, Part::Feature*, std::vector<std::string, std::allocator<std::string> > const&) from /tmp/.mount_FreeCALrn89s/usr/lib/freecad-daily/lib/PartDesignGui.so+0x2e0
#24 0x7fe12334f383 in makeChamferOrFillet(Gui::Command*, std::string const&) from /tmp/.mount_FreeCALrn89s/usr/lib/freecad-daily/lib/PartDesignGui.so+0xe3
#25 0x7fe12334f52d in CmdPartDesignFillet::activated(int) from /tmp/.mount_FreeCALrn89s/usr/lib/freecad-daily/lib/PartDesignGui.so+0x2d
#26 0x7fe19fd3cb4c in Gui::Command::invoke(int) from ././/lib/freecad-daily/lib/libFreeCADGui.so+0x4c
#27 0x7fe19dc2187a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x2da
#28 0x7fe19e138a62 in QAction::triggered(bool) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x32
#29 0x7fe19e13a433 in QAction::activate(QAction::ActionEvent) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x63
#30 /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x57cb02) [0x7fe19e4f1b02]
#31 0x7fe19e4f1c2c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x6c
#32 0x7fe19e5a8a4a in QToolButton::mouseReleaseEvent(QMouseEvent*) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0xa
#33 0x7fe19e18e50a in QWidget::event(QEvent*) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0xaca
#34 0x7fe19e13ee2c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x8c
#35 0x7fe19e1455dd in QApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x3ad
#36 0x7fe19fd19e51 in Gui::GUIApplication::notify(QObject*, QEvent*) from ././/lib/freecad-daily/lib/libFreeCADGui.so+0x41
#37 0x7fe19dc0d4dd in QCoreApplication::notifyInternal(QObject*, QEvent*) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x6d
#38 0x7fe19e144d93 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x153
#39 /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x2449cb) [0x7fe19e1b99cb]
#40 0x7fe19e1b9269 in QApplication::x11ProcessEvent(_XEvent*) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x1559
#41 /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x26bb02) [0x7fe19e1e0b02]
#42 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2e7) [0x7fe197b33287]
#43 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4c4c0) [0x7fe197b334c0]
#44 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7fe197b3354c]
#45 0x7fe19dc3a7a1 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x71
#46 /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x26bbb6) [0x7fe19e1e0bb6]
#47 0x7fe19dc0c0af in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x2f
#48 0x7fe19dc0c3a5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x175
#49 0x7fe19dc11b79 in QCoreApplication::exec() from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x89
#50 0x7fe19fcd6f57 in Gui::Application::runApplication() from ././/lib/freecad-daily/lib/libFreeCADGui.so+0x1697
#51 /tmp/.mount_FreeCALrn89s/usr/bin/freecad-daily(main+0x74b) [0x40348b]
#52 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fe19d71fb17]
#53 /tmp/.mount_FreeCALrn89s/usr/bin/freecad-daily() [0x4043f7]
Attachments
Screenshot at 2018-10-25 17-19-43.png
Screenshot at 2018-10-25 17-19-43.png (125.46 KiB) Viewed 396 times
holder.fcstd
(89.14 KiB) Downloaded 12 times
chrisb
Posts: 18767
Joined: Tue Mar 17, 2015 9:14 am

Re: Segfault when using part desgin fillet

Postby chrisb » Fri Oct 26, 2018 6:33 am

We had this recently here. The problem is, that the fillet always starts with a radius of 1mm. That fillet would fail anyway, so the problem is in fact the crash.
A fillet of 0.15mm is possible, but you cannot enter it, because your model crashes before you can do so. To avoid this you can set "Refine" to true in the properties of "Pocket" and then apply the fillet.
vocx
Posts: 1578
Joined: Thu Oct 18, 2018 9:18 pm

Re: Segfault when using part desgin fillet

Postby vocx » Fri Oct 26, 2018 3:05 pm

chrisb wrote:
Fri Oct 26, 2018 6:33 am
...That fillet would fail anyway, so the problem is in fact the crash.
...
But you should explain why the crash happens. Basically, it's a limitation of the underlying modelling kernel, Open Cascade Technology (OCCT), as indicated by the backtrace.

Code: Select all

#1 0x7fe1280c8d8d in BRep_Tool::Curve(TopoDS_Edge const&, TopLoc_Location&, double&, double&) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libTKBRep.so.7+0x1d
#2 0x7fe1280cbf74 in BRep_Tool::Curve(TopoDS_Edge const&, double&, double&) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libTKBRep.so.7+0x34
#3 0x7fe12a061777 in ChFi3d_Builder::PerformIntersectionAtEnd(int) from /tmp/.mount_FreeCALrn89s/usr/lib/x86_64-linux-gnu/libTKFillet.so.7+0x2147
BRep_Tool::Curve(), ChFi3d_Builder::PerformIntersectionAtEnd(), etc., are OCCT functions that fail, and it makes FreeCAD crash.

Improving the OCCT code (a separate project from FreeCAD) may improve this issue. Although probably FreeCAD should do a better job of trapping the error and not crashing immediately.
patn
Posts: 27
Joined: Fri Sep 21, 2018 10:59 pm

Re: Segfault when using part desgin fillet

Postby patn » Fri Oct 26, 2018 7:58 pm

Known issue so probably don't need a bug report... Would it be good to add this to the wiki for part design fillet? Also, there should be something on that page about the issues that topological naming causes with filleting.
chrisb
Posts: 18767
Joined: Tue Mar 17, 2015 9:14 am

Re: Segfault when using part desgin fillet

Postby chrisb » Fri Oct 26, 2018 8:56 pm

patn wrote:
Fri Oct 26, 2018 7:58 pm
Also, there should be something on that page about the issues that topological naming causes with filleting.
You are right, especially as robustness of fillets (and chamfers) was not improved in the same way as the rest of PartDesign features - if you use them right. Would you mind extending the wiki?
patn
Posts: 27
Joined: Fri Sep 21, 2018 10:59 pm

Re: Segfault when using part desgin fillet

Postby patn » Fri Oct 26, 2018 10:02 pm

Sure, I'll add it once I get editing privleges to the wiki.
chrisb
Posts: 18767
Joined: Tue Mar 17, 2015 9:14 am

Re: Segfault when using part desgin fillet

Postby chrisb » Fri Oct 26, 2018 11:01 pm

patn wrote:
Fri Oct 26, 2018 10:02 pm
I'll add it once I get editing privleges to the wiki.
Thanks already for the offer. I guess you applied for access as described here: https://forum.freecadweb.org/viewtopic.php?f=21&t=6830.
patn
Posts: 27
Joined: Fri Sep 21, 2018 10:59 pm

Re: Segfault when using part desgin fillet

Postby patn » Sat Oct 27, 2018 7:35 pm

Yep, you can see the changes here. https://www.freecadweb.org/wiki/PartDes ... own_Issues

It's not perfect, but it should get the point across.
renatorivo
Posts: 2210
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Segfault when using part desgin fillet

Postby renatorivo » Sat Oct 27, 2018 9:35 pm

For me it works, no crashes
OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15019 (Git)
Build type: Release
Branch: master
Hash: be586d089ebaf7cba72fb5133ef89822e6cd184f
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Italian/Italy (it_IT)
fillet016.png
fillet016.png (19.8 KiB) Viewed 293 times
patn
Posts: 27
Joined: Fri Sep 21, 2018 10:59 pm

Re: Segfault when using part desgin fillet

Postby patn » Mon Oct 29, 2018 9:29 pm

That's a newer build, 15019 vs my 14784 with an older OCC library 7.2 vs my 7.3.
I'll try grabbing the newest daily to see if there's changes.

OS: Debian GNU/Linux testing (buster)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14784 (Git) AppImage
Build type: Release
Branch: master
Hash: ac21bcc35c56b360e03c646f5cfdcf15e5769717
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)