PD Chamfer is SegFaulting Freecad

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!
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

PD Chamfer is SegFaulting Freecad

Post by leoheck »

Hi, I am starting a PD Chamfer on an object that has a wall that is 1 mm thick.
I think that since the Chamfer starts with 1 mm, it is seg faulting Freecad.
It follows the crash if helps.

Link to the file
https://www.dropbox.com/s/jqewhorkvg71n ... FCStd?dl=0

Code: Select all

➜ freecad                    
Latest FreeCAD /home/lheck/Applications/FreeCAD_weekly-builds-32637-2023-03-30-conda-Linux-x86_64-py310.AppImage
FreeCAD 0.21.0, Libs: 0.21.0R32637 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2023
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Assembly4 workbench (v0.12.6) loaded
AttachEngine3D::calculateAttachedPlacement:InertialCS: inertia tensor has axis of symmetry. Second and third axes of inertia are undefined.
AttachEngine3D::calculateAttachedPlacement:InertialCS: inertia tensor has axis of symmetry. Second and third axes of inertia are undefined.
AttachEngine3D::calculateAttachedPlacement:InertialCS: inertia tensor has axis of symmetry. Second and third axes of inertia are undefined.
AttachEngine3D::calculateAttachedPlacement:InertialCS: inertia tensor has axis of symmetry. Second and third axes of inertia are undefined.
Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x3bcf0) [0x7f84d9a36cf0]
#1  0x7f84a4559654 in BRep_Tool::CurveOnSurface(TopoDS_Edge const&, opencascade::handle<Geom_Surface> const&, TopLoc_Location const&, double&, double&, bool*) from /tmp/.mount_FreeCAuhlVld/usr/lib/./libTKBRep.so.7+0x174
#2  0x7f84a4559733 in BRep_Tool::CurveOnSurface(TopoDS_Edge const&, TopoDS_Face const&, double&, double&, bool*) from /tmp/.mount_FreeCAuhlVld/usr/lib/./libTKBRep.so.7+0xb3
#3  0x7f84a4567bbe in BRepAdaptor_Curve2d::Initialize(TopoDS_Edge const&, TopoDS_Face const&) from /tmp/.mount_FreeCAuhlVld/usr/lib/./libTKBRep.so.7+0xde
#4  0x7f84a47339db in ChFi3d_Builder::StartSol(opencascade::handle<ChFiDS_Spine> const&, opencascade::handle<BRepAdaptor_Surface>&, gp_Pnt2d&, opencascade::handle<BRepAdaptor_Curve2d>&, double&, opencascade::handle<ChFiDS_SurfData> const&, bool, int, opencascade::handle<BRepAdaptor_Surface>&, opencascade::handle<BRepAdaptor_Curve2d>&, bool&, bool&, bool&, bool&, opencascade::handle<BRepAdaptor_Surface>&, gp_Pnt2d&, bool, TopoDS_Vertex const&) const from /tmp/.mount_FreeCAuhlVld/usr/lib/./libTKFillet.so.7+0xdcb
#5  0x7f84a47394a7 in ChFi3d_Builder::PerformSetOfSurfOnElSpine(opencascade::handle<ChFiDS_ElSpine> const&, opencascade::handle<ChFiDS_Stripe>&, opencascade::handle<BRepTopAdaptor_TopolTool>&, opencascade::handle<BRepTopAdaptor_TopolTool>&, bool) from /tmp/.mount_FreeCAuhlVld/usr/lib/./libTKFillet.so.7+0x637
#6  0x7f84a473bdd9 in ChFi3d_Builder::PerformSetOfKGen(opencascade::handle<ChFiDS_Stripe>&, bool) from /tmp/.mount_FreeCAuhlVld/usr/lib/./libTKFillet.so.7+0x109
#7  0x7f84a474147a in ChFi3d_Builder::PerformSetOfSurf(opencascade::handle<ChFiDS_Stripe>&, bool) from /tmp/.mount_FreeCAuhlVld/usr/lib/./libTKFillet.so.7+0x6a
#8  0x7f84a4704797 in ChFi3d_Builder::Compute() from /tmp/.mount_FreeCAuhlVld/usr/lib/./libTKFillet.so.7+0x437
#9  0x7f84a489530e in BRepFilletAPI_MakeChamfer::Build(Message_ProgressRange const&) from /tmp/.mount_FreeCAuhlVld/usr/lib/./libTKFillet.so.7+0x2e
#10  0x7f83c819d99a in PartDesign::Chamfer::execute() from /tmp/.mount_FreeCAuhlVld/usr/lib/_PartDesign.so+0xd1a
#11  0x7f84db433aa2 in App::DocumentObject::recompute() from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADApp.so+0xc2
#12  0x7f84b466bbaa in Part::Feature::recompute() from /tmp/.mount_FreeCAuhlVld/usr/lib/Part.so+0xa
#13  0x7f84db3c750d in App::Document::_recomputeFeature(App::DocumentObject*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADApp.so+0x41d
#14  0x7f84db41547a in App::Document::recompute(std::vector<App::DocumentObject*, std::allocator<App::DocumentObject*> > const&, bool, bool*, int) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADApp.so+0xb4a
#15  0x7f84db49cc5f in App::DocumentPy::recompute(_object*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADApp.so+0x2ff
#16  0x7f84db49cd89 in App::DocumentPy::staticCallback_recompute(_object*, _object*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADApp.so+0x29
#17  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libpython3.10.so.1.0(+0x1438a8) [0x7f84db9438a8]
#18  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libpython3.10.so.1.0(_PyObject_MakeTpCall+0x27b) [0x7f84db93cf2b]
#19  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libpython3.10.so.1.0(_PyEval_EvalFrameDefault+0x5828) [0x7f84db938d38]
#20  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libpython3.10.so.1.0(+0x1deaf2) [0x7f84db9deaf2]
#21  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libpython3.10.so.1.0(PyEval_EvalCode+0x8c) [0x7f84db9dea3c]
#22  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libpython3.10.so.1.0(+0x20fe94) [0x7f84dba0fe94]
#23  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libpython3.10.so.1.0(+0x20ad7b) [0x7f84dba0ad7b]
#24  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libpython3.10.so.1.0(PyRun_StringFlags+0x7d) [0x7f84dba02e8d]
#25  0x7f84daf1dd8c in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADBase.so+0x6c
#26  0x7f84dc12bdf3 in Gui::Command::_runCommand(char const*, int, Gui::Command::DoCmd_Type, char const*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADGui.so+0x93
#27  0x7f84dc12bf86 in Gui::Command::_doCommand(char const*, int, Gui::Command::DoCmd_Type, char const*, ...) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADGui.so+0xe6
#28  0x7f84dc12c0a5 in Gui::Command::updateActive() from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADGui.so+0x45
#29  0x7f83938f127e in finishFeature(Gui::Command const*, App::DocumentObject*, App::DocumentObject*, bool, bool) from /tmp/.mount_FreeCAuhlVld/usr/lib/PartDesignGui.so+0x4de
#30  0x7f83938f28c6 in finishDressupFeature(Gui::Command const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Part::Feature*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) from /tmp/.mount_FreeCAuhlVld/usr/lib/PartDesignGui.so+0x9c6
#31  0x7f8393904d9f in makeChamferOrFillet(Gui::Command*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) from /tmp/.mount_FreeCAuhlVld/usr/lib/PartDesignGui.so+0x1cf
#32  0x7f839390502d in CmdPartDesignChamfer::activated(int) from /tmp/.mount_FreeCAuhlVld/usr/lib/PartDesignGui.so+0x4d
#33  0x7f84dc134aa1 in Gui::Command::_invoke(int, bool) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADGui.so+0x271
#34  0x7f84dc134f57 in Gui::Command::invoke(int, Gui::Command::TriggerSource) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADGui.so+0x127
#35  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Core.so.5(+0x1dff9b) [0x7f84d9ddff9b]
#36  0x7f84da965136 in QAction::triggered(bool) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Widgets.so.5+0x32
#37  0x7f84da966c20 in QAction::activate(QAction::ActionEvent) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Widgets.so.5+0xc6
#38  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Widgets.so.5(+0x2036cb) [0x7f84daa036cb]
#39  0x7f84daa037a7 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Widgets.so.5+0x79
#40  0x7f84daa9c0d0 in QToolButton::mouseReleaseEvent(QMouseEvent*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Widgets.so.5+0xa
#41  0x7f84da994202 in QWidget::event(QEvent*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Widgets.so.5+0x134
#42  0x7f84da96a087 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Widgets.so.5+0xd9
#43  0x7f84da96e36d in QApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Widgets.so.5+0x663
#44  0x7f84dc0e6a29 in Gui::GUIApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADGui.so+0x99
#45  0x7f84d9dc2a18 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Core.so.5+0x8e
#46  0x7f84da96d981 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Widgets.so.5+0x283
#47  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Widgets.so.5(+0x1a338d) [0x7f84da9a338d]
#48  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Widgets.so.5(+0x1a4505) [0x7f84da9a4505]
#49  0x7f84da96a087 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Widgets.so.5+0xd9
#50  0x7f84dc0e6a29 in Gui::GUIApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADGui.so+0x99
#51  0x7f84d9dc2a18 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Core.so.5+0x8e
#52  0x7f84da30956e in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Gui.so.5+0x6b6
#53  0x7f84da2f6091 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Gui.so.5+0x57
#54  /tmp/.mount_FreeCAuhlVld/usr/plugins/platforms/../../lib/libQt5XcbQpa.so.5(+0x5672c) [0x7f84d4ae472c]
#55  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/./libglib-2.0.so.0(g_main_context_dispatch+0x25c) [0x7f84d851b1bc]
#56  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/./libglib-2.0.so.0(+0x58489) [0x7f84d851b489]
#57  /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/./libglib-2.0.so.0(g_main_context_iteration+0x31) [0x7f84d851b551]
#58  0x7f84d9df3d50 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Core.so.5+0x5c
#59  0x7f84d9dc05d8 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Core.so.5+0x180
#60  0x7f84d9dc47af in QCoreApplication::exec() from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libQt5Core.so.5+0x107
#61  0x7f84dc059e36 in Gui::Application::runApplication() from /tmp/.mount_FreeCAuhlVld/usr/bin/../lib/libFreeCADGui.so+0x22c6
#62  /tmp/.mount_FreeCAuhlVld/usr/bin/freecad(+0x8a92) [0x5603746b9a92]
#63  /lib/x86_64-linux-gnu/libc.so.6(+0x23510) [0x7f84d9a1e510]
#64  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x89) [0x7f84d9a1e5c9]
#65  /tmp/.mount_FreeCAuhlVld/usr/bin/freecad(+0x8de1) [0x5603746b9de1]

Code: Select all

OS: Ubuntu 22.10 (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.0.32637 (Git) AppImage
Build type: Release
Branch: master
Hash: 7fa7cb7f0b222864be7416c683166876eab190bc
Python 3.10.10, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Defeaturing 1.2.0
  * Curves 0.6.8
  * fasteners 0.4.55
  * lattice2 1.0.0
  * FreeCAD_Assembly4 0.12.6
  * freecad.gears 1.0.0
  * kicadStepUpMod 10.17.1
  * ProDarkThemePreferencePack 1.0.0
  * Help 1.0.3
Update: Files is too big to add here, I added the link above
Last edited by leoheck on Sat Apr 01, 2023 12:47 am, edited 1 time in total.
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: PD Chamfer is SegFaulting Freecad

Post by leoheck »

Fillet does not crash Freecad.
It just doesn't do anything. Then reducing the fillet radius to 0.25 works.

But a similar thing does not work since Freecad is crashing before I even try to reduce the Chamfer
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: PD Chamfer is SegFaulting Freecad

Post by GeneFC »

It is difficult to be certain without a file, but this sounds like the classic case of a chamfer or fillet trying to consume an entire surface.

That will always fail.

There should never be a crash, of course.

Gene
User avatar
papyblaise
Veteran
Posts: 7793
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: PD Chamfer is SegFaulting Freecad

Post by papyblaise »

is it a crash or just a hang :?:
a crash is when the entire software stops without saving
a blockage is when it remains open but we no longer see the drawing is that there is a red dot on the last operation, in this case just click on this operation and change the value of the chamfer
the width of the chamfer (or fillet can only be the smallest width of the face
this face can be reduced by a "refine = faulse"
it's not a bug, there had to be a default value, 1mm seems to be a good compromise, and if you want you can reduce it to 0.000....1mm :!:
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: PD Chamfer is SegFaulting Freecad

Post by adrianinsaval »

as a workaround, launch the tool without selection, change the value and then make the selection (requires a new enough 0.21 build)
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: PD Chamfer is SegFaulting Freecad

Post by leoheck »

papyblaise wrote: Fri Mar 31, 2023 3:53 pm is it a crash or just a hang :?:
Hi, it is a crash, check the first code block in the first comment,

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
papyblaise wrote: Fri Mar 31, 2023 3:53 pm the width of the chamfer (or fillet can only be the smallest width of the face
Yeap, let's say, the face height is 1.0 mm, and then when I click the chamfer tool the whole software crashes since the chamfer starts with the fixed 1.0 mm (I suppose). With the software crashing I don't have a chance to reduce the initial chamfer from 1 mm to say 0.25 mm for instance.

In other words, it should not crash at my face. The operation has to fail, but it also has to keep the Chamfer task open so I can check if a smaller chamfer would work.
papyblaise wrote: Fri Mar 31, 2023 3:53 pm it's not a bug, there had to be a default value, 1mm seems to be a good compromise, and if you want you can reduce it to 0.000....1mm :!:
it is a bug, the software cannot crash/close out of nowhere.
Last edited by leoheck on Sat Apr 01, 2023 12:51 am, edited 2 times in total.
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: PD Chamfer is SegFaulting Freecad

Post by leoheck »

adrianinsaval wrote: Fri Mar 31, 2023 5:09 pm as a workaround, launch the tool without selection, change the value and then make the selection (requires a new enough 0.21 build)
Oh really? Interesting! I did not know that this was possible!!
Why? Because I cannot delete all the existing Edges. I always have to have one Edge on the list there.
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: PD Chamfer is SegFaulting Freecad

Post by leoheck »

Hey, @adrianinsaval thanks for this tip (to start the chamfer tool without having the edges selected)
This is good. Actually, I realized this is already the New Chamfer tool, then this Seg Fault is a new bug introduced, for sure.
leoheck
Veteran
Posts: 1222
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: PD Chamfer is SegFaulting Freecad

Post by leoheck »

This is the link to the file since it is too big to add the FCStd file here,
https://www.dropbox.com/s/jqewhorkvg71n ... FCStd?dl=0
Last edited by leoheck on Sat Apr 01, 2023 5:50 pm, edited 1 time in total.
User avatar
papyblaise
Veteran
Posts: 7793
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: PD Chamfer is SegFaulting Freecad

Post by papyblaise »

I don't have a crystal ball to see which edge is the problem :!:
if you want to attach a smaller file: remove the caliper which does not help anything,
and above all, what is the clone you intend it for, are you trying to make the fillet on the clone or the original :?:
the same object in only 50kb and I didn't remove the ton of useless construction lines
Attachments
caliper.FCStd
(42.22 KiB) Downloaded 4 times
Post Reply