Segfault on Redo

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!
Post Reply
cadilhac
Posts: 11
Joined: Wed May 05, 2021 9:34 pm

Segfault on Redo

Post by cadilhac »

Hello all,

It's fairly useless, but I'm reporting a segfault with this very limited trace:

Code: Select all

3.9e-08 <App> Document.cpp(3172): The graph must be a DAG.
0.17391 <App> Document.cpp(3172): The graph must be a DAG.
Program received signal SIGSEGV, Segmentation fault.
#0  /usr/lib/libc.so.6(+0x3cf80) [0x7f27fb8f8f80]
#1  0x7f27fdf27748 in Gui::Document::handleChildren3D(Gui::ViewProvider*, bool) from /usr/lib/freecad/lib/libFreeCADGui.so+0x38
#2  0x7f27fdf2a1f7 in Gui::Document::redo(int) from /usr/lib/freecad/lib/libFreeCADGui.so+0x97
#3  0x7f27fe2ae037 in Gui::View3DInventor::onMsg(char const*, char const**) from /usr/lib/freecad/lib/libFreeCADGui.so+0x6c7
#4  0x7f27fded5fdd in Gui::Application::sendMsgToActiveView(char const*, char const**) from /usr/lib/freecad/lib/libFreeCADGui.so+0x3d
#5  0x7f27fdfad9b0 in Gui::Command::invoke(int, Gui::Command::TriggerSource) from /usr/lib/freecad/lib/libFreeCADGui.so+0x610
#6  /usr/lib/libQt5Core.so.5(+0x2edbb0) [0x7f27fbf6dbb0]
#7  0x7f27fc9fbf73 in QAction::triggered(bool) from /usr/lib/libQt5Widgets.so.5+0x43
#8  0x7f27fc9fe855 in QAction::activate(QAction::ActionEvent) from /usr/lib/libQt5Widgets.so.5+0xe5
[...]
I've not been able to reproduce it. The pattern was a bit random, but I was redoing a pad.

OS: Arch Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: makepkg
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.9.3
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
edwilliams16
Veteran
Posts: 3192
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Segfault on Redo

Post by edwilliams16 »

Code: Select all

The graph must be a DAG
This means you have a never-ending dependency loop in your model. Feature A depends on Feature B. Feature B depends on Feature C. Feature C depends on Feature A.

Checkout Tools|Dependency Graph
cadilhac
Posts: 11
Joined: Wed May 05, 2021 9:34 pm

Re: Segfault on Redo

Post by cadilhac »

Thanks, but I believe this is not related. It was part of the output, so I included it, but even there, a complete crash is not to be expected.
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: Segfault on Redo

Post by chrisb »

Edwilliams is right, and you should definitely fix it. With such a loop a model can change on every recompute, and arbitrarily weird things can happen - including an occasionally occurring error.

You are right that FreeCAD shouldn't crash, but it would need a reproducible example to fix it.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply