FreeCAD crashes on spreadsheet update

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!
bruce
Posts: 23
Joined: Sun Aug 11, 2019 8:46 pm

FreeCAD crashes on spreadsheet update

Postby bruce » Mon May 17, 2021 12:25 am

On the attached file, open the spreadsheet.

Change the formula in cell B6 from

Code: Select all

=board_depth + 2 * (wall_width + part_clearance)
to

Code: Select all

=board_depth + 2 * (thin_wall_width + part_clearance)
FreeCAD will crash with the output attached below.

I'm attempting to change the depth of the "case" pad by changing the formula as listed above.

Thank you for your time.

Bruce

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x3bd60) [0x7f6b54484d60]
#1  0x7f6b2b362b98 in Geom2d_Curve::Value(double) const from /tmp/.mount_FreeCA0weYfg/usr/lib/./libTKG2d.so.7+0x18
#2  0x7f6b2d505b46 in ChFi3d_Builder::PerformMoreThreeCorner(int, int) from /tmp/.mount_FreeCA0weYfg/usr/lib/./libTKFillet.so.7+0xa936
#3  0x7f6b2d4e701e in ChFi3d_Builder::PerformIntersectionAtEnd(int) from /tmp/.mount_FreeCA0weYfg/usr/lib/./libTKFillet.so.7+0x7cfe
#4  0x7f6b2d4eae1a in ChFi3d_Builder::PerformOneCorner(int, bool) from /tmp/.mount_FreeCA0weYfg/usr/lib/./libTKFillet.so.7+0x10ba
#5  0x7f6b2d4874fe in ChFi3d_Builder::PerformFilletOnVertex(int) from /tmp/.mount_FreeCA0weYfg/usr/lib/./libTKFillet.so.7+0x51e
#6  0x7f6b2d4884fc in ChFi3d_Builder::Compute() from /tmp/.mount_FreeCA0weYfg/usr/lib/./libTKFillet.so.7+0xe5c
#7  0x7f6b2d64d504 in BRepFilletAPI_MakeFillet::Build() from /tmp/.mount_FreeCA0weYfg/usr/lib/./libTKFillet.so.7+0x34
#8  0x7f6af984bbb1 in PartDesign::Fillet::execute() from /tmp/.mount_FreeCA0weYfg/usr/lib/_PartDesign.so+0x4b1
#9  0x7f6b56269ec2 in App::DocumentObject::recompute() from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libFreeCADApp.so+0x122
#10  0x7f6b2e48962a in Part::Feature::recompute() from /tmp/.mount_FreeCA0weYfg/usr/lib/Part.so+0xa
#11  0x7f6b561fa81d in App::Document::_recomputeFeature(App::DocumentObject*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libFreeCADApp.so+0x2fd
#12  0x7f6b56255dd6 in App::Document::recompute(std::vector<App::DocumentObject*, std::allocator<App::DocumentObject*> > const&, bool, bool*, int) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libFreeCADApp.so+0x5c6
#13  0x7f6b562b557f in App::DocumentPy::recompute(_object*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libFreeCADApp.so+0x2df
#14  0x7f6b562b5749 in App::DocumentPy::staticCallback_recompute(_object*, _object*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libFreeCADApp.so+0x29
#15  /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libpython3.8.so.1.0(PyCFunction_Call+0xf5) [0x7f6b566b7725]
#16  /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libpython3.8.so.1.0(_PyObject_MakeTpCall+0x230) [0x7f6b5665f550]
#17  /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x4ddd) [0x7f6b566c928d]
#18  /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x2ea) [0x7f6b56660d9a]
#19  /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libpython3.8.so.1.0(PyEval_EvalCodeEx+0x3a) [0x7f6b566ee40a]
#20  /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libpython3.8.so.1.0(PyEval_EvalCode+0x1c) [0x7f6b566ee42c]
#21  /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libpython3.8.so.1.0(+0x1e05aa) [0x7f6b567135aa]
#22  /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libpython3.8.so.1.0(+0x224225) [0x7f6b56757225]
#23  /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libpython3.8.so.1.0(PyRun_StringFlags+0x80) [0x7f6b567572c0]
#24  0x7f6b55f542cc in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libFreeCADBase.so+0x6c
#25  0x7f6b56d6e091 in Gui::Command::_runCommand(char const*, int, Gui::Command::DoCmd_Type, char const*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libFreeCADGui.so+0x91
#26  0x7f6b56d6e231 in Gui::Command::_doCommand(char const*, int, Gui::Command::DoCmd_Type, char const*, ...) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libFreeCADGui.so+0x101
#27  0x7f6af8961365 in SpreadsheetGui::SheetModel::setData(QModelIndex const&, QVariant const&, int) from /tmp/.mount_FreeCA0weYfg/usr/lib/SpreadsheetGui.so+0x105
#28  0x7f6af8955e30 in SpreadsheetGui::SheetView::editingFinished() from /tmp/.mount_FreeCA0weYfg/usr/lib/SpreadsheetGui.so+0x140
#29  0x7f6b5497ca18 in QMetaObject::activate(QObject*, int, int, void**) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Core.so.5+0x6c0
#30  0x7f6af89478f7 in SpreadsheetGui::LineEdit::event(QEvent*) from /tmp/.mount_FreeCA0weYfg/usr/lib/SpreadsheetGui.so+0x127
#31  0x7f6b5518c7f2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Widgets.so.5+0xdc
#32  0x7f6b55190cbb in QApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Widgets.so.5+0x467
#33  0x7f6b56d3cdf9 in Gui::GUIApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libFreeCADGui.so+0x89
#34  0x7f6b54966606 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Core.so.5+0x86
#35  /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Widgets.so.5(+0x1aff6c) [0x7f6b551c7f6c]
#36  0x7f6b5518c7f2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Widgets.so.5+0xdc
#37  0x7f6b5519231d in QApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Widgets.so.5+0x1ac9
#38  0x7f6b56d3cdf9 in Gui::GUIApplication::notify(QObject*, QEvent*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libFreeCADGui.so+0x89
#39  0x7f6b54966606 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Core.so.5+0x86
#40  0x7f6b54d08eaa in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Gui.so.5+0xca
#41  0x7f6b54d0b939 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Gui.so.5+0x79
#42  0x7f6b54cf8c65 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Gui.so.5+0x63
#43  /tmp/.mount_FreeCA0weYfg/usr/plugins/platforms/../../lib/libQt5XcbQpa.so.5(+0x5b010) [0x7f6b501b2010]
#44  /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/./libglib-2.0.so.0(g_main_context_dispatch+0x27d) [0x7f6b518e123d]
#45  /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/./libglib-2.0.so.0(+0x554d1) [0x7f6b518e14d1]
#46  /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/./libglib-2.0.so.0(g_main_context_iteration+0x31) [0x7f6b518e1571]
#47  0x7f6b549950e8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Core.so.5+0x5e
#48  0x7f6b54963019 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Core.so.5+0x187
#49  0x7f6b54966e8f in QCoreApplication::exec() from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libQt5Core.so.5+0xfd
#50  0x7f6b56cc6926 in Gui::Application::runApplication() from /tmp/.mount_FreeCA0weYfg/usr/bin/../lib/libFreeCADGui.so+0x15f6
#51  /tmp/.mount_FreeCA0weYfg/usr/bin/freecad(+0x44bf) [0x55a8337464bf]
#52  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f6b5446fd0a]
#53  /tmp/.mount_FreeCA0weYfg/usr/bin/freecad(+0x47d9) [0x55a8337467d9]
OS: Debian GNU/Linux 11 (bullseye) (GNOME/gnome)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.19.2)
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/Canada (en_CA)
Attachments
XH-M401 case.FCStd
File to recreate crash.
(378.67 KiB) Downloaded 34 times
Last edited by Kunda1 on Mon May 17, 2021 12:44 am, edited 1 time in total.
Reason: fixed typo in thread title
chrisb
Posts: 35353
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD crashes on spreadsheet update

Postby chrisb » Mon May 17, 2021 4:58 am

Confirmed.

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.24825 (Git)
Build type: Release
Branch: master
Hash: ccc4151b3020969450325466e385850783795325
Python version: 3.9.2
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.1
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Roy_043
Posts: 3084
Joined: Thu Dec 27, 2018 12:28 pm

Re: FreeCAD crashes on spreadsheet update

Postby Roy_043 » Mon May 17, 2021 7:27 am

There is no crash on Windows. But an Access violation is reported and the outer_fillet feature is marked as having an error. If you remove that feature and the inner_fillet feature the spreadsheet change works fine here. Looking at the model in this new state the cause of the problem seems obvious.
bruce
Posts: 23
Joined: Sun Aug 11, 2019 8:46 pm

Re: FreeCAD crashes on spreadsheet update

Postby bruce » Tue May 18, 2021 12:21 am

Is this sufficient for a bug report? Do I need to collect any more information?

I've already worked around the crash by deleting the fillets earlier.

Thanks
chrisb
Posts: 35353
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD crashes on spreadsheet update

Postby chrisb » Tue May 18, 2021 5:52 am

No bug report yet. It is a known issue that fillets fail in such case, however, since chennes' OCC improvements it shouldn't crash FreeCAD. Perhaps the changes weren't propagated to the current version?
chennes wrote: ping
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
chennes
Posts: 870
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: FreeCAD crashes on spreadsheet update

Postby chennes » Tue May 18, 2021 12:37 pm

Right - it's no suprise to see that in @bruce's case this crashes, using OCCT 7.4. However, if it's crashing on something using the "blobfish" patches to 7.5 then there is something more serious wrong here. @chrisb, is that self-compiled, or are you using a daily?
Chris Hennes
Pioneer Library System
chrisb
Posts: 35353
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD crashes on spreadsheet update

Postby chrisb » Tue May 18, 2021 1:43 pm

chennes wrote: Tue May 18, 2021 12:37 pm @chrisb, is that self-compiled, or are you using a daily?
It's daily:

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.24825 (Git)
Build type: Release
Branch: master
Hash: ccc4151b3020969450325466e385850783795325
Python version: 3.9.2
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.1
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
chennes
Posts: 870
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: FreeCAD crashes on spreadsheet update

Postby chennes » Tue May 18, 2021 5:33 pm

OK, I can reproduce -- there must be another code path in there with a different sort of error than the one I wrote the handling for. I can look into making the same sort of fix, though. @bruce, you are welcome to submit a bug report in the tracker -- please note in it that this is reproducible in the latest daily build.
Chris Hennes
Pioneer Library System
chrisb
Posts: 35353
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD crashes on spreadsheet update

Postby chrisb » Tue May 18, 2021 6:47 pm

chennes wrote: Tue May 18, 2021 5:33 pm I can look into making the same sort of fix, though.
Thanks for working on it.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
bruce
Posts: 23
Joined: Sun Aug 11, 2019 8:46 pm

Re: FreeCAD crashes on spreadsheet update

Postby bruce » Wed May 19, 2021 1:24 am

issue #4661 has been created.

Thank you all for your effort on this software.