FreeCAD / FreeCAD

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

Crash when creating loft between two sketches #5642

Open FreeCAD-Bug-Importer opened 2 years ago

FreeCAD-Bug-Importer commented 2 years ago

Issue imported from https://tracker.freecad.org/view.php?id=2461

Original report text

Crating a loft between two sketches causes FreeCAD to segfault in Fedora 23 x86_64, and to produce this error in Windows 7 64-bit: "ACCESS VIOLATION at address 0x00000010 during 'READ' operation"

This only happens for certain sketches such as those included in the attached file.

loft-sigsegv.zip

Additional information

Changing the order of the two sketches has no effect. Selecting the closed option produces a different error in Windows: "TCollection_DataMap::ChangeFind"

Steps to reproduce

  1. Open the attached file in FreeCAD
  2. Create a loft using the two sketches
  3. The crash happens when clicking the OK button in the loft dialog.

Other bug information

Discussion from Mantis ticket

Comment by taiyo_uk 2016-03-02 11:20

Version information:

OS: Windows 7 Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.15.4671 (Git) Branch: releases/FreeCAD-0-15 Hash: 244b3aef360841646cbfe80a1b225c8b39c8380c Python version: 2.7.8 Qt version: 4.8.6 Coin version: 4.0.0a OCC version: 6.8.0.oce-0.17


Comment by taiyo_uk 2016-03-03 07:22

The same problem happens on the latest (at the time of writing) git build, this is what happens on Fedora:

Abort an exception was raised, but no catch was found. ... The exception is:SIGSEGV 'segmentation violation' detected. Address 0

Version information:

OS: Linux Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.16.6538 (Git) Build type: Release Branch: master Hash: 57c783e5b0f4da8611f5b1f26dc7499a5979e574 Python version: 2.7.10 Qt version: 4.8.7 Coin version: 3.1.3


Comment by normandc 2016-03-06 20:04

I can confirm the problem here.

OS: Ubuntu 14.04.4 LTS Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.16.6557 (Git) Build type: None Branch: master Hash: 948ccac021b15aff3c7a3b033c508e7ec9b123d6 Python version: 2.7.6 Qt version: 4.8.6 Coin version: 4.0.0a OCC version: 6.8.0.oce-0.17

But I suspect this is due to your sketches having a different number of segments - this is bound for trouble when creating lofts. This is probably an OCC issue (the geometric kernel FreeCAD uses) that the FreeCAD devs have no control of.

A workaround is to add very short line segments to the second sketch so it has the same number of segments as the first sketch. Then the loft succeeds (see attached "loft-test_normandc1.fcstd" file). Another would be to create this model in two separate operations: first create a prism of the outer volume with a Pad, then create a loft representing the volume you want to be cut from the prism, and apply a boolean cut. This way the model will have planar faces rather than BSpline ones on which sketches cannot be mapped.

Next time, please report modeling issues to the FreeCAD forum first, so to determine if it's a FreeCAD bug, or a bug in OCC which the devs can't do anything about. http://forum.freecadweb.org/viewtopic.php?f=3&t=5236

I wonder if the crash can be avoided, and an error thrown instead.


Comment by @luzpaz 2017-01-26 21:55

Forum thread: https://forum.freecadweb.org/viewtopic.php?f=10&t=20258


Comment by @luzpaz 2017-12-15 20:36

taiyo_uk do you still have the attachment for this ticket? Bugtracker shows it's missing.


Comment by hirnsalat 2018-06-08 23:53

Ran into the same problem, apparently it still exists in 0.17. How to reproduce: Go to Part Design workbench, load attached file, create an additive loft, add sections from top to bottom. FreeCAD should crash with a segmentation fault.

OS: "Manjaro Linux" Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.17.13522 (Git) AppImage Build type: None Branch: releases/FreeCAD-0-17 Hash: 3bb5ff4e70c0c526f2d9dd69b1004155b2f527f2 Python version: 2.7.6 Qt version: 4.8.6 Coin version: 4.0.0a OCC version: 7.2.0 Locale: English/UnitedKingdom (en_GB)

Also tested on a friend's Mac, which crasches too:

OS: Mac OS X Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.17.13519 (Git) Build type: Release Branch: (HEAD detached at 1a8b868) Hash: 1a8b868018f45ea486c0023fdbfeb06febc1fb89 Python version: 2.7.14 Qt version: 5.10.1 Coin version: 4.0.0a OCC version: 7.2.0 Locale: English/Austria (en_AT)


Comment by @luzpaz 2018-06-08 23:58

hirnsalat Thanks for testing. Can you also test with OCC7.3 when it becomes available ? Also please also report your findings to the dedicated forum thread


Comment by @wwmayer 2018-09-30 15:27

That's a regression in OCCT 7.2. When using OCCT 7.0 it doesn't create a loft but reports an appropriate error message and does not crash.


Comment by @maidenone 2019-01-20 20:04

Is this issue resolved now? or is there another "exceptions in occt" ticket that can replace this?


Comment by @wwmayer 2019-01-20 21:01

It was hirnsalat you said that it crashes with OCCT 7.2. But I've just tested it and I get it working when I also select the Ruled surface option. Without it an error message pops up but I don't get a crash. I have tested this with OCCT 7.0 and 7.2.


Comment by normandc 2019-02-09 20:16

I get a crash when I add the third section with the version below using OCC 7.3.0.

#0  /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f7bc5f14f20]
#1  /usr/lib/x86_64-linux-gnu/libTKTopAlgo.so.7(+0x17bcb5) [0x7f7b7e043cb5]
#2  0x7f7b7e04477e in BRepLib::EncodeRegularity(TopoDS_Shape const&, double) from /usr/lib/x86_64-linux-gnu/libTKTopAlgo.so.7+0x14e
#3  0x7f7b7cd22da8 in BRepOffsetAPI_ThruSections::Build() from /usr/lib/x86_64-linux-gnu/libTKOffset.so.7+0xd28
#4  0x7f7b1e4a3c2b in PartDesign::Loft::execute() from /home/normand2/compilation/FreeCAD/freecad-build2/Mod/PartDesign/_PartDesign.so+0x7db
#5  0x7f7bc83c3265 in App::DocumentObject::recompute() from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADApp.so+0x155
#6  0x7f7b827aabdb in Part::Feature::recompute() from /home/normand2/compilation/FreeCAD/freecad-build2/Mod/Part/Part.so+0xb
#7  0x7f7bc8377544 in App::Document::_recomputeFeature(App::DocumentObject*) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADApp.so+0xb4
#8  0x7f7bc837f013 in App::Document::recomputeFeature(App::DocumentObject*) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADApp.so+0x83
#9  0x7f7b1e0691d0 in PartDesignGui::TaskLoftParameters::onSelectionChanged(Gui::SelectionChanges const&) from /home/normand2/compilation/FreeCAD/freecad-build2/Mod/PartDesign/PartDesignGui.so+0x120
#10  0x7f7bc8ed09c6 in Gui::SelectionObserver::_onSelectionChanged(Gui::SelectionChanges const&) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0x56
#11  0x7f7bc8edebbf in boost::signals2::detail::signal_impl<void (Gui::SelectionChanges const&), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void (Gui::SelectionChanges const&)>, boost::function<void (boost::signals2::connection const&, Gui::SelectionChanges const&)>, boost::signals2::mutex>::operator()(Gui::SelectionChanges const&) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0x20f
#12  0x7f7bc8ed8f81 in Gui::SelectionSingleton::addSelection(char const*, char const*, char const*, float, float, float) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0x281
#13  0x7f7bc8d4237a in Gui::SoFCUnifiedSelection::handleEvent(SoHandleEventAction*) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0xd3a
#14  0x7f7bc5722504 in SoAction::traverse(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80c+0x64
#15  0x7f7bc58c2008 in SoChildList::traverse(SoAction*, int, int) from /usr/lib/x86_64-linux-gnu/libCoin.so.80c+0xd8
#16  0x7f7bc59114e6 in SoGroup::doAction(SoAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80c+0x56
#17  0x7f7bc592b967 in SoSeparator::doAction(SoAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80c+0x27
#18  0x7f7bc5722504 in SoAction::traverse(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80c+0x64
#19  0x7f7bc572be48 in SoHandleEventAction::beginTraversal(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80c+0x68
#20  0x7f7bc5722a82 in SoAction::apply(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80c+0x372
#21  0x7f7bc58de8a0 in SoEventManager::actuallyProcessEvent(SoEvent const*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80c+0x60
#22  0x7f7bc8db590e in SIM::Coin3D::Quarter::QuarterWidget::processSoEvent(SoEvent const*) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0x1e
#23  0x7f7bc8dbe5c6 in SIM::Coin3D::Quarter::SoQTQuarterAdaptor::processSoEvent(SoEvent const*) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0x56
#24  0x7f7bc8de8179 in Gui::View3DInventorViewer::processSoEventBase(SoEvent const*) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0x9
#25  0x7f7bc8dd118e in Gui::GestureNavigationStyle::processSoEvent(SoEvent const*) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0xabe
#26  0x7f7bc8dc8418 in Gui::NavigationStyle::processEvent(SoEvent const*) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0xf8
#27  0x7f7bc8de80f3 in Gui::View3DInventorViewer::processSoEvent(SoEvent const*) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0x63
#28  0x7f7bc8dacd45 in SIM::Coin3D::Quarter::EventFilter::eventFilter(QObject*, QEvent*) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0x185
#29  0x7f7bc6af268c in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x7c
#30  0x7f7bc7107805 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x75
#31  0x7f7bc710f64f in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x7ff
#32  0x7f7bc8b88a48 in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0x88
#33  0x7f7bc6af29a8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x118
#34  0x7f7bc710e622 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1d2
#35  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1ae14b) [0x7f7bc716114b]
#36  /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(+0x1b07ba) [0x7f7bc71637ba]
#37  0x7f7bc710782c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x9c
#38  0x7f7bc710f0f4 in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x2a4
#39  0x7f7bc8b88a48 in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0x88
#40  0x7f7bc6af29a8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x118
#41  0x7f7bc2a1d523 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0x6f3
#42  0x7f7bc2a1eff5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0x135
#43  0x7f7bc29f62eb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5+0xab
#44  /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5(+0x9d1c0) [0x7f7bb615a1c0]
#45  /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2e7) [0x7f7bc0d74387]
#46  /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4c5c0) [0x7f7bc0d745c0]
#47  /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f7bc0d7464c]
#48  0x7f7bc6b4b8ef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x5f
#49  0x7f7bc6af09ea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x13a
#50  0x7f7bc6af9a84 in QCoreApplication::exec() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x94
#51  0x7f7bc8b0dfab in Gui::Application::runApplication() from /home/normand2/compilation/FreeCAD/freecad-build2/lib/libFreeCADGui.so+0x133b
#52  ./FreeCAD(main+0x6ad) [0x5588702ee48d]
#53  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f7bc5ef7b97]
#54  ./FreeCAD(_start+0x2a) [0x5588702ef1ea]

OS: Ubuntu 18.04.1 LTS Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.18.15816 (Git) Build type: Release Branch: master Hash: 7ee0e4d43909ec688299b8498b240cccf8362c47 Python version: 3.6.7 Qt version: 5.9.5 Coin version: 4.0.0a OCC version: 7.3.0 Locale: French/Canada (fr_CA)


Comment by normandc 2019-02-09 20:21

No crash with OCC 7.1.0 with this version. An error message appears in a pop up when pressing OK: [quote]BRepFill :: profiles are inconsistent[/quote]

OS: Ubuntu 18.04.1 LTS Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.17.13509 (Git) AppImage Build type: None Branch: master Hash: 0258808ccb6ba3bd5ea9312f79cd023f1a8671b7 Python version: 2.7.6 Qt version: 4.8.6 Coin version: 4.0.0a OCC version: 7.1.0 Locale: French/Canada (fr_CA)


Comment by @wwmayer 2019-02-23 20:29

I don't have OCCT 7.3 to this but according to the call stack this anyway must be a bug in OCCT, then.

JanneKro commented 2 years ago

I have tested with the example posted by "hirnsalat" in https://tracker.freecadweb.org/view.php?id=2461#c11373 with 4 splines, but did not manage to get it to crash. Tried adding/removing sections in different orders and it worked just fine.

The original file is no longer available. Close?

luzpaz commented 2 years ago

Please always add the full version info to the post you've tested so we know what OS and specs/deps you've tested it against

JanneKro commented 2 years ago

Tested without issues.

OS: Windows 10 Version 2009 Word size of FreeCAD: 64-bit Version: 0.20.28835 (Git) Build type: Release Branch: master Hash: 55f1222bc29e5e2338ff86175175aa3118faeb01 Python 3.8.6+, Qt 5.15.2, Coin 4.0.1, OCC 7.5.3 Locale: English/Sweden (en_SE)

Johnny846 commented 2 years ago

Tested, All (Part Design) loft combinations done with only 2 sketches had no issues, except these 2 combinations which produced a weird-looking loft when selected in the following order: -Sketch003 selected before Sketch001 -Sketch003 selected before Sketch004

All combinations done with 3 or 4 sketches caused my FreeCAD instance to close right after clicking the loft button.

Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f89a5e8c520]
#1  /tmp/.mount_FreeCAdKevJE/usr/lib/./libTKTopAlgo.so.7(+0x1be5c6) [0x7f88fec785c6]
#2  0x7f88fec7912e in BRepLib::EncodeRegularity(TopoDS_Shape const&, double) from /tmp/.mount_FreeCAdKevJE/usr/lib/./libTKTopAlgo.so.7+0x15e
#3  0x7f89500c757e in BRepOffsetAPI_ThruSections::Build() from /tmp/.mount_FreeCAdKevJE/usr/lib/./libTKOffset.so.7+0xe2e
#4  0x7f88fc19d74f in PartDesign::Loft::execute() from /tmp/.mount_FreeCAdKevJE/usr/lib/_PartDesign.so+0xacf
#5  0x7f89a7405922 in App::DocumentObject::recompute() from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADApp.so+0x4d2
#6  0x7f88ff2bee6a in Part::Feature::recompute() from /tmp/.mount_FreeCAdKevJE/usr/lib/./Part.so+0xa
#7  0x7f89a73a0e8d in App::Document::_recomputeFeature(App::DocumentObject*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADApp.so+0x33d
#8  0x7f89a73ee1aa in App::Document::recompute(std::vector<App::DocumentObject*, std::allocator<App::DocumentObject*> > const&, bool, bool*, int) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADApp.so+0x9ca
#9  0x7f89a745621f in App::DocumentPy::recompute(_object*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADApp.so+0x2df
#10  0x7f89a74563f9 in App::DocumentPy::staticCallback_recompute(_object*, _object*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADApp.so+0x29
#11  /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libpython3.9.so.1.0(+0x1470ba) [0x7f89a787c0ba]
#12  /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libpython3.9.so.1.0(_PyObject_MakeTpCall+0x286) [0x7f89a786ae76]
#13  /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libpython3.9.so.1.0(_PyEval_EvalFrameDefault+0x5120) [0x7f89a7867ed0]
#14  /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libpython3.9.so.1.0(+0x12d029) [0x7f89a7862029]
#15  /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libpython3.9.so.1.0(_PyEval_EvalCodeWithName+0x51) [0x7f89a7861ce1]
#16  /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libpython3.9.so.1.0(PyEval_EvalCodeEx+0x3a) [0x7f89a7861c8a]
#17  /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libpython3.9.so.1.0(PyEval_EvalCode+0x1c) [0x7f89a78f432c]
#18  /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libpython3.9.so.1.0(+0x1eda9f) [0x7f89a7922a9f]
#19  /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libpython3.9.so.1.0(+0x1e9adc) [0x7f89a791eadc]
#20  /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libpython3.9.so.1.0(PyRun_StringFlags+0xa7) [0x7f89a7916517]
#21  0x7f89a70e7b8c in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADBase.so+0x6c
#22  0x7f89a7f94b35 in Gui::Command::_runCommand(char const*, int, Gui::Command::DoCmd_Type, char const*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADGui.so+0x95
#23  0x7f89a7f94ce1 in Gui::Command::_doCommand(char const*, int, Gui::Command::DoCmd_Type, char const*, ...) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADGui.so+0x101
#24  0x7f89a7f94e15 in Gui::Command::updateActive() from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADGui.so+0x45
#25  /tmp/.mount_FreeCAdKevJE/usr/lib/PartDesignGui.so(+0xed888) [0x7f88f73f1888]
#26  /tmp/.mount_FreeCAdKevJE/usr/lib/PartDesignGui.so(+0xea5f7) [0x7f88f73ee5f7]
#27  0x7f88f73f78c3 in prepareProfileBased(PartDesign::Body*, Gui::Command*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (Part::Feature*, App::DocumentObject*)>) from /tmp/.mount_FreeCAdKevJE/usr/lib/PartDesignGui.so+0x383
#28  0x7f88f73f8e56 in CmdPartDesignAdditiveLoft::activated(int) from /tmp/.mount_FreeCAdKevJE/usr/lib/PartDesignGui.so+0xd6
#29  0x7f89a7f9c351 in Gui::Command::_invoke(int, bool) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADGui.so+0x271
#30  0x7f89a7f9c7e7 in Gui::Command::invoke(int, Gui::Command::TriggerSource) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADGui.so+0x127
#31  0x7f89a641a39a in QMetaObject::activate(QObject*, int, int, void**) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Core.so.5+0x6c0
#32  0x7f89a6c26958 in QAction::triggered(bool) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5+0x32
#33  0x7f89a6c282e2 in QAction::activate(QAction::ActionEvent) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5+0xc6
#34  /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5(+0x20dc72) [0x7f89a6cc4c72]
#35  0x7f89a6cc4d4f in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5+0x79
#36  0x7f89a6d5b452 in QToolButton::mouseReleaseEvent(QMouseEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5+0xa
#37  0x7f89a6c5651d in QWidget::event(QEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5+0x133
#38  0x7f89a6d5b4df in QToolButton::event(QEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5+0x45
#39  0x7f89a6c2b822 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5+0xdc
#40  0x7f89a6c2ff8e in QApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5+0x70a
#41  0x7f89a7f55c49 in Gui::GUIApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADGui.so+0x89
#42  0x7f89a6403f88 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Core.so.5+0x86
#43  0x7f89a6c2f4f4 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5+0x286
#44  /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5(+0x1af004) [0x7f89a6c66004]
#45  /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5(+0x1affac) [0x7f89a6c66fac]
#46  0x7f89a6c2b822 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5+0xdc
#47  0x7f89a6c3134d in QApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Widgets.so.5+0x1ac9
#48  0x7f89a7f55c49 in Gui::GUIApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADGui.so+0x89
#49  0x7f89a6403f88 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Core.so.5+0x86
#50  0x7f89a67a7ef7 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Gui.so.5+0x677
#51  0x7f89a67a8951 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Gui.so.5+0x5f
#52  0x7f89a6795c95 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Gui.so.5+0x63
#53  /tmp/.mount_FreeCAdKevJE/usr/plugins/platforms/../../lib/libQt5XcbQpa.so.5(+0x59f09) [0x7f89a18aaf09]
#54  0x7f89a640099b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Core.so.5+0x187
#55  0x7f89a6404811 in QCoreApplication::exec() from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libQt5Core.so.5+0xfd
#56  0x7f89a7eda75e in Gui::Application::runApplication() from /tmp/.mount_FreeCAdKevJE/usr/bin/../lib/libFreeCADGui.so+0x1b2e
#57  /tmp/.mount_FreeCAdKevJE/usr/bin/freecad(+0x67b1) [0x560cf06a97b1]
#58  /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f89a5e73d90]
#59  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f89a5e73e40]
#60  /tmp/.mount_FreeCAdKevJE/usr/bin/freecad(+0x6af1) [0x560cf06a9af1]

OS: Ubuntu 22.04 LTS (KDE/plasma) Word size of FreeCAD: 64-bit Version: 0.20.29177 (Git) AppImage Build type: Release Branch: (HEAD detached at 0.20) Hash: 68e337670e227889217652ddac593c93b5e8dc94 Python 3.9.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3 Locale: English/United States (en_US) Installed mods:

AjinkyaDahale commented 2 years ago

Segfault also observed with:

OS: Manjaro Linux (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.21.30485 (Git)
Build type: Release
Branch: fem-rigid-body-constraints
Hash: 8924e265c068c2446a091f84c83c8b1934451470
Python 3.10.6, Qt 5.15.5, Coin 4.0.1, Vtk 9.1.0, OCC 7.5.3
Locale: English/United States (en_US)
Installed mods: 
  * Curves 0.5.7
  * Curves.backup1662220878.4365516 0.4.4
  * ProDarkThemePreferencePack 1.0.0
  * ProDarkThemePreferencePack.backup1662220881.5889003 1.0.0

Looks like an OCC issue from the stack trace.

Jolbas commented 1 year ago

I get same result as Johnny846 with OCC 7.6.3. Crash when using 3 or 4 sketches but not when using 2 sketches.

OS: macOS 12.6
Word size of FreeCAD: 64-bit
Version: 0.21.0.32630 (Git)
Build type: Release
Branch: ZeroLengthPD
Hash: d65b05c3df48c690bdcf7f9d982cb96dbe288911
Python 3.10.10, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.6, OCC 7.6.3
Locale: English/United States (en_US)
AjinkyaDahale commented 1 year ago

@luzpaz Do we have an OCC ticket?

luzpaz commented 1 year ago

@AjinkyaDahale nope :cry: image
(per https://forum.freecad.org/viewtopic.php?t=20264)

AIRCAP commented 2 months ago

For the record,

OS: Ubuntu 20.04.6 LTS (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 1.1.0dev.38842 (Git)
Build type: Debug
Branch: anotherLoftFix
Hash: 69676a0f9d2d5b288bda3d1c6dbad5a6ec26bfaa
Python 3.8.10, Qt 5.12.8, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.3
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: unset/FreeCAD Classic/Qt default

still has this issue (not fixed in OCCT 7.6.3)

also #16853 does NOT fix this