FreeCAD / FreeCAD/FreeCAD

PartDesign: Errors (was: 'Segfault') when attempting a chamfer using "Use All Edges"

Open
#22,921 12 comments 0 reactions 0 assignees View on GitHub
Mod: Part Design Status: Confirmed Topic: Fillets
Dominant language
C++
Stars
33.6k
Forks
6k
Avg merge
3d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Problem description

I am following the tutorial at this link:
https://www.youtube.com/watch?v=jULWgMV9_TM

When I go to the part where I'm doing a chamfer I started playing around with the features (I'm moving from Fusion360 to Freecad) just to get familiar.

I put a 5mm chamfer on two edges and it worked fine. Out of curiosity I clicked "Use All Edges" and it segfaulted the program. I reopened, chamfered to 1mm and clicked Use All Edges and it worked fine. This is reproduceable. The chamfer size definitely exceeds geometric limits of some of the sides. It looks like the issue is coming from libTKFillet.so.7.8. The Issue persists in safe mode.

Image

Image

Running Ubuntu 22.04. Here's the dump:

```
Program received signal SIGSEGV, Segmentation fault.
#0 /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f42a4242520]
#1 0x7f4276f4bb94 in BRep_Tool::CurveOnSurface(TopoDS_Edge const&, opencascade::handle const&, TopLoc_Location const&, double&, double&, bool*) from /tmp/.mount_FreeCAcgaeCn/usr/lib/./libTKBRep.so.7.8+0x174
#2 0x7f4276f4bc6b in BRep_Tool::CurveOnSurface(TopoDS_Edge const&, TopoDS_Face const&, double&, double&, bool*) from /tmp/.mount_FreeCAcgaeCn/usr/lib/./libTKBRep.so.7.8+0xab
#3 0x7f4276f59fa4 in BRepAdaptor_Curve2d::Initialize(TopoDS_Edge const&, TopoDS_Face const&) from /tmp/.mount_FreeCAcgaeCn/usr/lib/./libTKBRep.so.7.8+0xf4
#4 0x7f4246d47f20 in ChFi3d_Builder::StartSol(opencascade::handle const&, opencascade::handle&, gp_Pnt2d&, opencascade::handle&, double&, opencascade::handle const&, bool, int, opencascade::handle&, opencascade::handle&, bool&, bool&, bool&, bool&, opencascade::handle&, gp_Pnt2d&, bool, TopoDS_Vertex const&) const from /tmp/.mount_FreeCAcgaeCn/usr/lib/././libTKFillet.so.7.8+0xd90
#5 0x7f4246d4c8f4 in ChFi3d_Builder::PerformSetOfSurfOnElSpine(opencascade::handle const&, opencascade::handle&, opencascade::handle&, opencascade::handle&, bool) from /tmp/.mount_FreeCAcgaeCn/usr/lib/././libTKFillet.so.7.8+0x624
#6 0x7f4246d51c71 in ChFi3d_Builder::PerformSetOfKGen(opencascade::handle&, bool) from /tmp/.mount_FreeCAcgaeCn/usr/lib/././libTKFillet.so.7.8+0xd1
#7 0x7f4246d55faa in ChFi3d_Builder::PerformSetOfSurf(opencascade::handle&, bool) from /tmp/.mount_FreeCAcgaeCn/usr/lib/././libTKFillet.so.7.8+0x6a
#8 0x7f4246d1a484 in ChFi3d_Builder::Compute() from /tmp/.mount_FreeCAcgaeCn/usr/lib/././libTKFillet.so.7.8+0x4a4
#9 0x7f4246e9abb6 in BRepFilletAPI_MakeChamfer::Build(Message_ProgressRange const&) from /tmp/.mount_FreeCAcgaeCn/usr/lib/././libTKFillet.so.7.8+0x36
#10 0x7f4275a69a4d in BRepBuilderAPI_MakeShape::Shape() from /tmp/.mount_FreeCAcgaeCn/usr/lib/./libTKTopAlgo.so.7.8+0x8d
#11 0x7f4276108cf6 in Part::TopoShape::makeElementShape(BRepBuilderAPI_MakeShape&, std::vector > const&, char const*) from /tmp/.mount_FreeCAcgaeCn/usr/lib/./Part.so+0x186
#12 0x7f4276108de3 in Part::TopoShape::makeElementShape(BRepBuilderAPI_MakeShape&, Part::TopoShape const&, char const*) from /tmp/.mount_FreeCAcgaeCn/usr/lib/./Part.so+0x83
#13 0x7f427610ac0b in Part::TopoShape::makeElementChamfer(Part::TopoShape const&, std::vector > const&, Part::ChamferType, double, double, char const*, Part::Flip) from /tmp/.mount_FreeCAcgaeCn/usr/lib/./Part.so+0x32b
#14 0x7f4244b96edd in PartDesign::Chamfer::execute() from /tmp/.mount_FreeCAcgaeCn/usr/lib/_PartDesign.so+0x2dd
#15 0x7f42a6074332 in App::DocumentObject::recompute() from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libFreeCADApp.so+0xc2
#16 0x7f4275ebfa5c in Part::Feature::recompute() from /tmp/.mount_FreeCAcgaeCn/usr/lib/./Part.so+0xc
#17 0x7f42a604927c in App::Document::_recomputeFeature(App::DocumentObject*) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libFreeCADApp.so+0x32c
#18 0x7f42a605985c in App::Document::recomputeFeature(App::DocumentObject*, bool) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libFreeCADApp.so+0xfc
#19 /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Core.so.5(+0x1dffbf) [0x7f42a49dffbf]
#20 0x7f42a56008c2 in QAbstractButton::toggled(bool) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Widgets.so.5+0x30
#21 /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Widgets.so.5(+0x20167a) [0x7f42a560167a]
#22 0x7f42a56020f1 in QAbstractButton::setChecked(bool) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Widgets.so.5+0xff
#23 0x7f42a560b9fc in QCheckBox::nextCheckState() from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Widgets.so.5+0x30
#24 /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Widgets.so.5(+0x201dc8) [0x7f42a5601dc8]
#25 0x7f42a5601ea7 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Widgets.so.5+0x7b
#26 0x7f42a55938fa in QWidget::event(QEvent*) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Widgets.so.5+0x122
#27 0x7f42a5569fca in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Widgets.so.5+0xd8
#28 0x7f42a556e300 in QApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Widgets.so.5+0x65e
#29 0x7f42a716a939 in Gui::GUIApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libFreeCADGui.so+0xc9
#30 0x7f42a49c3158 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Core.so.5+0x8e
#31 0x7f42a556d90f in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool, bool) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Widgets.so.5+0x28b
#32 /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Widgets.so.5(+0x1a2518) [0x7f42a55a2518]
#33 /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Widgets.so.5(+0x1a366f) [0x7f42a55a366f]
#34 0x7f42a5569fca in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Widgets.so.5+0xd8
#35 0x7f42a716a939 in Gui::GUIApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libFreeCADGui.so+0xc9
#36 0x7f42a49c3158 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Core.so.5+0x8e
#37 0x7f42a4f09e3e in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Gui.so.5+0x772
#38 0x7f42a4ef66bb in QWindowSystemInterface::sendWindowSystemEvents(QFlags) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Gui.so.5+0x57
#39 /tmp/.mount_FreeCAcgaeCn/usr/plugins/platforms/../../lib/libQt5XcbQpa.so.5(+0x56173) [0x7f429f279173]
#40 /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/./libglib-2.0.so.0(+0x5b5e6) [0x7f42a2f085e6]
#41 /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/./libglib-2.0.so.0(+0x5e7b7) [0x7f42a2f0b7b7]
#42 /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/./libglib-2.0.so.0(g_main_context_iteration+0x2e) [0x7f42a2f0bece]
#43 0x7f42a49f35af in QEventDispatcherGlib::processEvents(QFlags) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Core.so.5+0x59
#44 0x7f42a49c0dda in QEventLoop::exec(QFlags) from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Core.so.5+0x188
#45 0x7f42a49c4ea5 in QCoreApplication::exec() from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libQt5Core.so.5+0xfb
#46 0x7f42a70c96c4 in Gui::Application::runApplication() from /tmp/.mount_FreeCAcgaeCn/usr/bin/../lib/libFreeCADGui.so+0x8a4
#47 /tmp/.mount_FreeCAcgaeCn/usr/bin/freecad(+0x78b7) [0x5698543a88b7]
#48 /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f42a4229d90]
#49 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f42a4229e40]
#50 /tmp/.mount_FreeCAcgaeCn/usr/bin/freecad(+0x7c2a) [0x5698543a8c2a]
```

### Full version info

```shell
verion 1.0.1, rev number 39285, x86_64

```

### Subproject(s) affected?

None

### Anything else?

Thanks for everything you do guys

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.