Open FreeCAD-Bug-Importer opened 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?
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
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)
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:
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.
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)
@luzpaz Do we have an OCC ticket?
@AjinkyaDahale nope :cry:
(per https://forum.freecad.org/viewtopic.php?t=20264)
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
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
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.
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.