FreeCAD / FreeCAD

This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler.
https://www.freecad.org
Other
19.42k stars 4.01k forks source link

[Problem] PartDesign: fillet causes huge memory consumption #12522

Open Roy-043 opened 7 months ago

Roy-043 commented 7 months ago

Is there an existing issue for this?

Problem description

There are several open fillet issues. But this one seems particularly severe as it causes a huge memory consumption that can render the computer unusable.

  1. Remove the .zip extension from the file.
  2. Open the file.
  3. Change the fillet radius to 30mm.

Forum topic: https://forum.freecad.org/viewtopic.php?t=85450

Cocobo 3D print packaging 5 fillet-1mm.FCStd.zip

Full version info

OS: Windows 8 build 9600
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.35994 (Git)
Build type: Release
Branch: main
Hash: 69097667df47b2cc86d8688d2dbb545319e33e68
Python 3.10.13, Qt 5.15.8, Coin 4.0.2, Vtk 9.2.6, OCC 7.6.3
Locale: Dutch/Netherlands (nl_NL)
Installed mods:

Subproject(s) affected?

PartDesign

Anything else?

No response

Code of Conduct

xtemp09 commented 7 months ago

Crash does not occur on Linux, but FreeCAD begins to eat memory like a crazy monkey.

Backtrace ```cpp (lldb) bt * thread #1, name = 'FreeCAD', stop reason = signal SIGSTOP * frame #0: 0x00007fffb0f27070 libTKMesh.so.7`___lldb_unnamed_symbol2517 + 80 frame #1: 0x00007fffb0f27bb3 libTKMesh.so.7`___lldb_unnamed_symbol2518 + 2227 frame #2: 0x00007fffb0f2b24d libTKMesh.so.7`BRepMesh_CircleTool::bind(int, gp_XY const&, double) + 557 frame #3: 0x00007fffb0f2b79d libTKMesh.so.7`BRepMesh_CircleTool::Bind(int, gp_XY const&, gp_XY const&, gp_XY const&) + 109 frame #4: 0x00007fffb0f3d83d libTKMesh.so.7`BRepMesh_Delaun::addTriangle(int const (&) [3], bool const (&) [3], int const (&) [3]) + 253 frame #5: 0x00007fffb0f36dbe libTKMesh.so.7`BRepMesh_Delaun::createTriangles(int, NCollection_Shared>, void>&) + 2046 frame #6: 0x00007fffb0f3970b libTKMesh.so.7`BRepMesh_Delaun::createTrianglesOnNewVertices(NCollection_Shared, void>&, Message_ProgressRange const&) + 1419 frame #7: 0x00007fffb0f3de28 libTKMesh.so.7`BRepMesh_Delaun::AddVertices(NCollection_Shared, void>&, Message_ProgressRange const&) + 424 frame #8: 0x00007fffb0f5204e libTKMesh.so.7`___lldb_unnamed_symbol2865 + 350 frame #9: 0x00007fffb0f5416c libTKMesh.so.7`___lldb_unnamed_symbol2873 + 1756 frame #10: 0x00007fffb0f53a3b libTKMesh.so.7`___lldb_unnamed_symbol2872 + 523 frame #11: 0x00007fffb0f42d98 libTKMesh.so.7`BRepMesh_DelaunayBaseMeshAlgo::generateMesh(Message_ProgressRange const&) + 296 frame #12: 0x00007fffb0f2ddf0 libTKMesh.so.7`BRepMesh_BaseMeshAlgo::Perform(opencascade::handle const&, IMeshTools_Parameters const&, Message_ProgressRange const&) + 640 frame #13: 0x00007fffb0f55ec1 libTKMesh.so.7`___lldb_unnamed_symbol2876 + 209 frame #14: 0x00007fffb0f47ea4 libTKMesh.so.7`BRepMesh_FaceDiscret::process(int, Message_ProgressRange const&) const + 324 frame #15: 0x00007fffb0f4c89d libTKMesh.so.7`BRepMesh_FaceDiscret::performInternal(opencascade::handle const&, IMeshTools_Parameters const&, Message_ProgressRange const&) + 1677 frame #16: 0x00007fffb0f1b775 libTKMesh.so.7`___lldb_unnamed_symbol2387 + 101 frame #17: 0x00007fffb0f1c5ef libTKMesh.so.7`IMeshTools_MeshBuilder::Perform(Message_ProgressRange const&) + 1151 frame #18: 0x00007fffb0f5589b libTKMesh.so.7`BRepMesh_IncrementalMesh::Perform(opencascade::handle const&, Message_ProgressRange const&) + 491 frame #19: 0x00007fffb0f55b6c libTKMesh.so.7`BRepMesh_IncrementalMesh::Perform(Message_ProgressRange const&) + 92 frame #20: 0x00007fffb0f55ce7 libTKMesh.so.7`BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh(TopoDS_Shape const&, double, bool, double, bool) + 279 frame #21: 0x00007fffadb0991d Part.so`Part::Tools::triangulationOfFace(face=0x00006030001aa2a8) at Tools.cpp:651:5 frame #22: 0x00007fffabcb87ac PartGui.so`PartGui::ViewProviderPartExt::updateVisual(this=0x000061f00047c000) at ViewProviderExt.cpp:1052:56 frame #23: 0x00007fffabcba864 PartGui.so`PartGui::ViewProviderPartExt::updateData(this=0x000061f00047c000, prop=0x000061e00004a970) at ViewProviderExt.cpp:836:25 frame #24: 0x00007ffface701bc PartDesignGui.so`PartDesignGui::ViewProviderBody::updateData(this=0x000061f00047c000, prop=0x000061e00004a970) at ViewProviderBody.cpp:254:42 frame #25: 0x00007ffff5c5aa0b libFreeCADGui.so`Gui::ViewProvider::update(this=0x000061f00047c000, prop=0x000061e00004a970) at ViewProvider.cpp:308:15 frame #26: 0x00007ffff5c6a655 libFreeCADGui.so`Gui::ViewProviderDocumentObject::update(this=0x000061f00047c000, prop=0x000061e00004a970) at ViewProviderDocumentObject.cpp:383:29 frame #27: 0x00007ffff58a30e6 libFreeCADGui.so`Gui::Document::slotChangedObject(this=0x0000613000059cc0, Obj=0x000061e00004a400, Prop=0x000061e00004a970) at Document.cpp:794:33 frame #28: 0x00007ffff58b8693 libFreeCADGui.so`void std::__invoke_impl((null)=__invoke_memfun_deref @ 0x00007fffffffb660, __f=, __t=, (null)=, (null)=) at invoke.h:74:46 frame #29: 0x00007ffff58b86bc libFreeCADGui.so`void std::_Bind, std::_Placeholder<2>))(App::DocumentObject const&, App::Property const&)>::operator()(App::DocumentObject const&, App::Property const&) [inlined] std::__invoke_result::type std::__invoke((null)=0x000061e00004a970, (null)=0x000061e00004a400, (null)=, __fn=) at invoke.h:96:40 frame #30: 0x00007ffff58b86b1 libFreeCADGui.so`void std::_Bind, std::_Placeholder<2>))(App::DocumentObject const&, App::Property const&)>::operator()(App::DocumentObject const&, App::Property const&) [inlined] void std::_Bind, std::_Placeholder<2>))(App::DocumentObject const&, App::Property const&)>::__call((null)=, __args=0x00007fffffffb660, this=) at functional:506:24 frame #31: 0x00007ffff58b86ad libFreeCADGui.so`void std::_Bind, std::_Placeholder<2>))(App::DocumentObject const&, App::Property const&)>::operator()(this=, (null)=0x000061e00004a400, (null)=0x000061e00004a970) at functional:591:32 frame #32: 0x00007ffff58b86cb libFreeCADGui.so`boost::detail::function::void_function_obj_invoker2, std::_Placeholder<2>))(App::DocumentObject const&, App::Property const&)>, void, App::DocumentObject const&, App::Property const&>::invoke(function_obj_ptr=, a0=, a1=) at function_template.hpp:158:11 frame #33: 0x00007ffff4aa24c9 libFreeCADApp.so`boost::function2::operator()(this=, a0=, a1=) const at function_template.hpp:763:28 frame #34: 0x00007ffff4aa258b libFreeCADApp.so`boost::signals2::detail::void_type boost::signals2::detail::variadic_slot_invoker::operator()>, boost::signals2::slot>, boost::signals2::mutex>>>(boost::shared_ptr>, boost::signals2::slot>, boost::signals2::mutex>> const&) const [inlined] boost::signals2::detail::void_type boost::signals2::detail::call_with_tuple_args::m_invoke, 0u, 1u, App::DocumentObject const&, App::Property const&>((null)=0x0000000000000000, args=0x00007fffffffb930, (null)=, func=, this=) const at variadic_slot_invoker.hpp:105:15 frame #35: 0x00007ffff4aa257b libFreeCADApp.so`boost::signals2::detail::void_type boost::signals2::detail::variadic_slot_invoker::operator()>, boost::signals2::slot>, boost::signals2::mutex>>>(boost::shared_ptr>, boost::signals2::slot>, boost::signals2::mutex>> const&) const [inlined] boost::signals2::detail::void_type boost::signals2::detail::call_with_tuple_args::operator(), App::DocumentObject const&, App::Property const&, 2ul>((null)=, args=0x00007fffffffb930, func=, this=) const at variadic_slot_invoker.hpp:90:32 frame #36: 0x00007ffff4aa257b libFreeCADApp.so`boost::signals2::detail::void_type boost::signals2::detail::variadic_slot_invoker::operator()>, boost::signals2::slot>, boost::signals2::mutex>>>(this=0x00007fffffffb930, connectionBody=) const at variadic_slot_invoker.hpp:133:53 frame #37: 0x00007ffff4aa25bf libFreeCADApp.so`boost::signals2::detail::slot_call_iterator_t, std::_List_iterator>, boost::signals2::slot>, boost::signals2::mutex>>>, boost::signals2::detail::connection_body>, boost::signals2::slot>, boost::signals2::mutex>>::dereference(this=0x00007fffffffb720) const at slot_call_iterator.hpp:110:43 frame #38: 0x00007ffff4abd82e libFreeCADApp.so`void boost::signals2::optional_last_value::operator(), std::_List_iterator>, boost::signals2::slot>, boost::signals2::mutex>>>, boost::signals2::detail::connection_body>, boost::signals2::slot>, boost::signals2::mutex>>>(boost::signals2::detail::slot_call_iterator_t, std::_List_iterator>, boost::signals2::slot>, boost::signals2::mutex>>>, boost::signals2::detail::connection_body>, boost::signals2::slot>, boost::signals2::mutex>>, boost::signals2::detail::slot_call_iterator_t, std::_List_iterator>, boost::signals2::slot>, boost::signals2::mutex>>>, boost::signals2::detail::connection_body>, boost::signals2::slot>, boost::signals2::mutex>>) const [inlined] boost::signals2::detail::slot_call_iterator_t, std::_List_iterator>, boost::signals2::slot>, boost::signals2::mutex>>>, boost::signals2::detail::connection_body>, boost::signals2::slot>, boost::signals2::mutex>>::reference boost::iterators::iterator_core_access::dereference, std::_List_iterator>, boost::signals2::slot>, boost::signals2::mutex>>>, boost::signals2::detail::connection_body>, boost::signals2::slot>, boost::signals2::mutex>>>(f=0x00007fffffffb720) at iterator_facade.hpp:550:31 frame #39: 0x00007ffff4abd825 libFreeCADApp.so`void boost::signals2::optional_last_value::operator(), std::_List_iterator>, boost::signals2::slot>, boost::signals2::mutex>>>, boost::signals2::detail::connection_body>, boost::signals2::slot>, boost::signals2::mutex>>>(boost::signals2::detail::slot_call_iterator_t, std::_List_iterator>, boost::signals2::slot>, boost::signals2::mutex>>>, boost::signals2::detail::connection_body>, boost::signals2::slot>, boost::signals2::mutex>>, boost::signals2::detail::slot_call_iterator_t, std::_List_iterator>, boost::signals2::slot>, boost::signals2::mutex>>>, boost::signals2::detail::connection_body>, boost::signals2::slot>, boost::signals2::mutex>>) const [inlined] boost::iterators::detail::iterator_facade_base, std::_List_iterator>, boost::signals2::slot>, boost::signals2::mutex>>>, boost::signals2::detail::connection_body>, boost::signals2::slot>, boost::signals2::mutex>>, boost::signals2::detail::void_type, boost::iterators::single_pass_traversal_tag, boost::signals2::detail::void_type const&, long, false, false>::operator*(this=0x00007fffffffb720) const at iterator_facade.hpp:656:53 frame #40: 0x00007ffff4abd825 libFreeCADApp.so`void boost::signals2::optional_last_value::operator(), std::_List_iterator>, boost::signals2::slot>, boost::signals2::mutex>>>, boost::signals2::detail::connection_body>, boost::signals2::slot>, boost::signals2::mutex>>>(this=, first=slot_call_iterator_t, std::_List_iterator >, boost::signals2::slot >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body >, boost::signals2::slot >, boost::signals2::mutex> > @ 0x00007fffffffb720, last=slot_call_iterator_t, std::_List_iterator >, boost::signals2::slot >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body >, boost::signals2::slot >, boost::signals2::mutex> > @ 0x00007fffffffb740) const at optional_last_value.hpp:57:13 frame #41: 0x00007ffff4abdaa8 libFreeCADApp.so`boost::signals2::detail::signal_impl, int, std::less, boost::function, boost::function, boost::signals2::mutex>::operator()(App::DocumentObject const&, App::Property const&) [inlined] void boost::signals2::detail::combiner_invoker::operator(), boost::signals2::detail::slot_call_iterator_t, std::_List_iterator>, boost::signals2::slot>, boost::signals2::mutex>>>, boost::signals2::detail::connection_body>, boost::signals2::slot>, boost::signals2::mutex>>>(last=slot_call_iterator_t, std::_List_iterator >, boost::signals2::slot >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body >, boost::signals2::slot >, boost::signals2::mutex> > @ 0x00007fffffffb800, first=slot_call_iterator_t, std::_List_iterator >, boost::signals2::slot >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body >, boost::signals2::slot >, boost::signals2::mutex> > @ 0x00007fffffffb7e0, combiner=, this=) const at result_type_wrapper.hpp:64:19 frame #42: 0x00007ffff4abda78 libFreeCADApp.so`boost::signals2::detail::signal_impl, int, std::less, boost::function, boost::function, boost::signals2::mutex>::operator()(this=, args#0=0x000061e00004a400, args#1=0x000061e00004a970) at signal_template.hpp:243:13 frame #43: 0x00007ffff4abdb7e libFreeCADApp.so`boost::signals2::signal, int, std::less, boost::function, boost::function, boost::signals2::mutex>::operator()(this=, args#0=0x000061e00004a400, args#1=0x000061e00004a970) at signal_template.hpp:722:25 frame #44: 0x00007ffff4a61da2 libFreeCADApp.so`App::Document::onChangedProperty(this=, Who=0x000061e00004a400, What=0x000061e00004a970) at Document.cpp:775:24 frame #45: 0x00007ffff4ad073b libFreeCADApp.so`App::DocumentObject::onChanged(this=0x000061e00004a400, prop=0x000061e00004a970) at DocumentObject.cpp:772:33 frame #46: 0x00007fffad8bd34c Part.so`Part::Feature::onChanged(this=0x000061e00004a400, prop=0x000061e00004a970) at PartFeature.cpp:523:26 frame #47: 0x00007fffad8da313 Part.so`Part::BodyBase::onChanged(this=0x000061e00004a400, prop=0x000061e00004a970) at BodyBase.cpp:98:30 frame #48: 0x00007fffb10aadfd _PartDesign.so`PartDesign::Body::onChanged(this=0x000061e00004a400, prop=0x000061e00004a970) at Body.cpp:468:30 frame #49: 0x00007ffff4bc0c04 libFreeCADApp.so`App::Property::hasSetValue(this=0x000061e00004a970) at Property.cpp:228:26 frame #50: 0x00007fffad8dcdac Part.so`Part::PropertyPartShape::setValue(this=0x000061e00004a970, sh=0x00007fffffffbdf0) at PropertyTopoShape.cpp:64:16 frame #51: 0x00007fffb10ab343 _PartDesign.so`PartDesign::Body::execute(this=0x000061e00004a400) at Body.cpp:418:20 frame #52: 0x00007ffff4acf2f1 libFreeCADApp.so`App::DocumentObject::recompute(this=0x000061e00004a400) at DocumentObject.cpp:161:29 frame #53: 0x00007fffad8bb826 Part.so`Part::Feature::recompute(this=) at PartFeature.cpp:92:42 frame #54: 0x00007ffff4a5f7b0 libFreeCADApp.so`App::Document::_recomputeFeature(this=0x000061f0003df600, Feat=0x000061e00004a400) at Document.cpp:3129:41 frame #55: 0x00007ffff4a678bd libFreeCADApp.so`App::Document::recompute(this=0x000061f0003df600, objs=, force=, hasError=0x0000000000000000, options=) at Document.cpp:2856:48 frame #56: 0x00007ffff5b8d21c libFreeCADGui.so`Gui::PropertyEditor::PropertyEditor::recomputeDocument(this=, doc=0x000061f0003df600) at PropertyEditor.cpp:346:31 frame #57: 0x00007ffff5b8d3e8 libFreeCADGui.so`Gui::PropertyEditor::PropertyEditor::closeTransaction(this=0x000060f000049b60) at PropertyEditor.cpp:368:30 frame #58: 0x00007ffff5b8dff8 libFreeCADGui.so`Gui::PropertyEditor::PropertyEditor::closeEditor(this=0x000060f000049b60, editor=, hint=SubmitModelCache) at PropertyEditor.cpp:390:21 frame #59: 0x00007ffff35b4cca libQt5Widgets.so.5`QAbstractItemView::qt_static_metacall(_o=, _c=, _id=, _a=) at moc_qabstractitemview.cpp:426:33 frame #60: 0x00007ffff26e357c libQt5Core.so.5`void doActivate(sender=0x000060300009b550, signal_index=4, argv=0x00007fffffffc760) at qobject.cpp:3937:33 frame #61: 0x00007ffff26da3ab libQt5Core.so.5`QMetaObject::activate(sender=0x000060300009b550, m=0x000000000073b060, local_signal_index=1, argv=0x00007fffffffc760) at qobject.cpp:3985:26 frame #62: 0x00007ffff35d3e59 libQt5Widgets.so.5`QAbstractItemDelegate::closeEditor(this=0x000060300009b550, _t1=, _t2=) at moc_qabstractitemdelegate.cpp:212:26 frame #63: 0x00007ffff35d4ef4 libQt5Widgets.so.5`QAbstractItemDelegatePrivate::_q_commitDataAndCloseEditor(this=, editor=0x0000613000109e40) at qabstractitemdelegate.cpp:639:24 frame #64: 0x00007ffff35d4f76 libQt5Widgets.so.5`QAbstractItemDelegate::qt_static_metacall(_o=, _c=, _id=, _a=) at moc_qabstractitemdelegate.cpp:100:58 frame #65: 0x00007ffff26d33a3 libQt5Core.so.5`QMetaCallEvent::placeMetaCall(this=0x0000607000134150, object=0x000060300009b550) at qobject.cpp:635:24 frame #66: 0x00007ffff26daefe libQt5Core.so.5`QObject::event(this=0x000060300009b550, e=0x0000607000134150) at qobject.cpp:1347:31 frame #67: 0x00007ffff32e1813 libQt5Widgets.so.5`QApplicationPrivate::notify_helper(this=0x0000612000000c00, receiver=0x000060300009b550, e=0x0000607000134150) at qapplication.cpp:3640:31 frame #68: 0x00007ffff32ea1be libQt5Widgets.so.5`QApplication::notify(this=0x00007fffffffd160, receiver=0x000060300009b550, e=0x0000607000134150) at qapplication.cpp:2980:31 frame #69: 0x00007ffff58f6eb8 libFreeCADGui.so`Gui::GUIApplication::notify(this=0x00007fffffffd160, receiver=0x000060300009b550, event=0x0000607000134150) at GuiApplication.cpp:83:40 frame #70: 0x00007ffff269ef19 libQt5Core.so.5`QCoreApplication::notifyInternal2(receiver=0x000060300009b550, event=0x0000607000134150) at qcoreapplication.cpp:1064:24 frame #71: 0x00007ffff269f196 libQt5Core.so.5`QCoreApplication::sendEvent(receiver=, event=) at qcoreapplication.cpp:1462:27 frame #72: 0x00007ffff26a2feb libQt5Core.so.5`QCoreApplicationPrivate::sendPostedEvents(receiver=0x0000000000000000, event_type=0, data=0x0000608000000300) at qcoreapplication.cpp:1821:36 frame #73: 0x00007ffff26a3303 libQt5Core.so.5`QCoreApplication::sendPostedEvents(receiver=0x0000000000000000, event_type=0) at qcoreapplication.cpp:1680:46 frame #74: 0x00007ffff270c6af libQt5Core.so.5`postEventSourceDispatch(s=0x00006070000008c0, (null)=, (null)=) at qeventdispatcher_glib.cpp:277:39 frame #75: 0x00007ffff051bd3b libglib-2.0.so.0`g_main_context_dispatch + 619 frame #76: 0x00007ffff0571258 libglib-2.0.so.0`___lldb_unnamed_symbol2709 + 488 frame #77: 0x00007ffff05193e3 libglib-2.0.so.0`g_main_context_iteration + 51 frame #78: 0x00007ffff270bfbf libQt5Core.so.5`QEventDispatcherGlib::processEvents(this=0x0000605000011c60, flags=(i = 36)) at qeventdispatcher_glib.cpp:423:43 frame #79: 0x00007fffeb368826 libQt5XcbQpa.so.5`QXcbGlibEventDispatcher::processEvents(this=, flags=) at qxcbeventdispatcher.cpp:143:47 frame #80: 0x00007ffff269c89b libQt5Core.so.5`QEventLoop::processEvents(this=0x00007fffffffd010, flags=) at qeventloop.cpp:142:68 frame #81: 0x00007ffff269cf3c libQt5Core.so.5`QEventLoop::exec(this=0x00007fffffffd010, flags=(i = 0)) at qeventloop.cpp:235:22 frame #82: 0x00007ffff26a78df libQt5Core.so.5`QCoreApplication::exec() at qcoreapplication.cpp:1375:36 frame #83: 0x00007ffff2a24a24 libQt5Gui.so.5`QGuiApplication::exec() at qguiapplication.cpp:1870:34 frame #84: 0x00007ffff32e177d libQt5Widgets.so.5`QApplication::exec() at qapplication.cpp:2832:33 frame #85: 0x00007ffff584e940 libFreeCADGui.so`Gui::Application::runApplication() at Application.cpp:2425:21 frame #86: 0x000055555556a3a5 FreeCAD`main(argc=, argv=) at MainGui.cpp:278:45 frame #87: 0x00007ffff1a29d90 libc.so.6`__libc_start_call_main(main=(FreeCAD`main at MainGui.cpp:105:1), argc=1, argv=0x00007fffffffdd88) at libc_start_call_main.h:58:16 frame #88: 0x00007ffff1a29e40 libc.so.6`__libc_start_main_impl(main=(FreeCAD`main at MainGui.cpp:105:1), argc=1, argv=0x00007fffffffdd88, init=, fini=, rtld_fini=, stack_end=0x00007fffffffdd78) at libc-start.c:392:3 frame #89: 0x0000555555569c05 FreeCAD`_start + 37 (lldb) ```
Ubuntu 22.04.3 LTS (KDE/plasma) ```ruby OS: Ubuntu 22.04.3 LTS (KDE/plasma) Word size of FreeCAD: 64-bit Version: 0.22.0dev.35992 (Git) Build type: Debug Branch: main Hash: 43723b6d780fba4d6f359836842cd7f6cb51c3e5 Python 3.10.12, Qt 5.15.12, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.1 Locale: English/United States (en_US) ```
Roy-043 commented 7 months ago

Yes, I also see this memory consumption basically making the computer not usable. The only option I then have is to shut it down. So the word "crash" is not accurate. I'll amend the text of the issue.