Errors in workbenches, do not let start freecad.

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
User avatar
dcapeletti
Posts: 403
Joined: Wed Jul 23, 2014 2:27 pm

Errors in workbenches, do not let start freecad.

Post by dcapeletti » Tue Dec 03, 2019 6:48 pm

Hello, I have installed the following freecad workbenches to test if freecad runs safely:
  • 3D PRINTING TOOLS
    A2PLUS
    AIRPLANEDESING
    ASSEMBLY4
    AUTOLOAD
    BIM
    BIMBOST
    BOLTSCF
    CADEXTRANGER
    CADQUERY
    CURVEDSHAPE
    CURVES
    DESINGSPHYSICS
    DODO
    DXFLIBRARY
    EM
    FCGEAR
    FRAME
    FLAMINGO
    GLASS
    KERYTHEA
    KICADSETUP
    LATICCE2
    LCINTERLOKING
    LITHOPANE (causa del error)
    MESHREMODEL
    MOOC (causa del error)
    NURBS (causa del error)
    PART-TO-MAGIC
    PARTS_LIBRARY
    PCB (causa del error)
    PLOT (causa del error)
    PYRATE (causa del error)
    REINFORCEMENT
    RENDER
    REPORTING
    SHEETMETAL
    WEBTOOLS
There are some workbenches that cause a runtime error when starting freecad, which prevent freecad from running. According to various tests, I estimate that the workbenches causing the problem are:

LITHOPANE, MOOC, NURBS, PCB, PLOT, PYRATE

By removing these benches, freecad runs correctly.
The error that appears in the terminal is usually this:

Code: Select all

/tmp/.mount_FreeCA1me5So
FreeCAD 0.19, Libs: 0.19R18811 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Loading Assembly 4 WorkBench
Sheet Metal workbench loaded
Interlocking laser cut workbench loaded
Fontconfig warning: "/etc/fonts/fonts.conf", line 100: unknown element "blank"
During initialization the error "'backend.qt4 is not a valid rc parameter (see rcParams.keys() for a list of valid parameters)'" occurred in /home/dcapeletti/.FreeCAD/Mod/animation/InitGui.py
Please look into the log file for further information
Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x33060) [0x7f37f9d2c060]
#1  0x7f37fa404a35 in QObject::setObjectName(QString const&) from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libQt5Core.so.5+0x7
#2  0x7f37fc4b7fbe in Gui::WorkbenchGroup::setWorkbenchData(int, QString const&) from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libFreeCADGui.so+0xae
#3  0x7f37fc4b8492 in Gui::WorkbenchGroup::refreshWorkbenchList() from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libFreeCADGui.so+0x222
#4  0x7f37fc4b88e6 in Gui::WorkbenchGroup::addTo(QWidget*) from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libFreeCADGui.so+0x26
#5  0x7f37fc4cabca in Gui::CommandManager::addTo(char const*, QWidget*) from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libFreeCADGui.so+0x20a
#6  0x7f37fc8bcd99 in Gui::MenuManager::setup(Gui::MenuItem*, QMenu*) const from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libFreeCADGui.so+0xb59
#7  0x7f37fc8bd63b in Gui::MenuManager::setup(Gui::MenuItem*) const from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libFreeCADGui.so+0x3ab
#8  0x7f37fc8d2251 in Gui::Workbench::activate() from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libFreeCADGui.so+0xa1
#9  0x7f37fc8d469d in Gui::WorkbenchManager::activate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libFreeCADGui.so+0x1d
#10  0x7f37fc412696 in Gui::Application::activateWorkbench(char const*) from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libFreeCADGui.so+0x696
#11  0x7f37fc418c23 in Gui::Application::sActivateWorkbenchHandler(_object*, _object*) from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libFreeCADGui.so+0x73
#12  /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libpython3.7m.so.1.0(_PyMethodDef_RawFastCallKeywords+0x104) [0x7f37fbe5b034]
#13  /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libpython3.7m.so.1.0(_PyCFunction_FastCallKeywords+0x26) [0x7f37fbe5bba6]
#14  /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libpython3.7m.so.1.0(+0x6f3df) [0x7f37fbdad3df]
#15  /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x710a) [0x7f37fbdab10a]
#16  /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0xac4) [0x7f37fbf66284]
#17  /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libpython3.7m.so.1.0(PyEval_EvalCodeEx+0x3f) [0x7f37fbf6636f]
#18  /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libpython3.7m.so.1.0(PyEval_EvalCode+0x1c) [0x7f37fbe35abc]
#19  /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libpython3.7m.so.1.0(PyRun_StringFlags+0x94) [0x7f37fbe861b4]
#20  0x7f37fd09143a in Base::InterpreterSingleton::runString[abi:cxx11](char const*) from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libFreeCADBase.so+0x6a
#21  0x7f37fc3f5ecb in Gui::Application::runInitGuiScript() from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libFreeCADGui.so+0x4b
#22  0x7f37fc414f52 in Gui::Application::runApplication() from /tmp/.mount_FreeCA1me5So/usr/bin/../lib/libFreeCADGui.so+0xe42
#23  /tmp/.mount_FreeCA1me5So/usr/bin/freecad(main+0x74d) [0x555a9ab0d7cd]
#24  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f37f9d192e1]
#25  /tmp/.mount_FreeCA1me5So/usr/bin/freecad(+0x451f) [0x555a9ab0e51f]
After various tests, I think freecad should have a safe execution environment, start freecad and reject workbenches that are causing problems. I think freecad should have some function to check workbenches at the time of installation or determine the last known good execution, but I have no idea how to do it, but I think freecad should start anyway, even if the workbench has errors. I hope they can fix the situation.

Thanks

OS: Debian GNU/Linux 9 (stretch) (GNOME/default)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18811 (Git) AppImage
Build type: Release
Branch: master
Hash: b809867021deb37be1039dab37b9fe1cafab254e
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Spanish/Argentina (es_AR)

User avatar
dcapeletti
Posts: 403
Joined: Wed Jul 23, 2014 2:27 pm

Re: Errors in workbenches, do not let start freecad.

Post by dcapeletti » Tue Dec 03, 2019 7:16 pm

Other bank I just installed that prevents freecad from booting is cfd.

However, I have determined that the combination of one or more workbenches are preventing freecad from booting. For example, I have removed almost all workbenches and left CFDs, LITHOPANE and PCBs, which were banks that caused problems, but now freecad starts up correctly.
Attachments
Correct execution.png
Correct execution.png (19.52 KiB) Viewed 156 times
problems.png
problems.png (41.92 KiB) Viewed 156 times

vocx
Posts: 2417
Joined: Thu Oct 18, 2018 9:18 pm

Re: Errors in workbenches, do not let start freecad.

Post by vocx » Tue Dec 03, 2019 10:59 pm

dcapeletti wrote:
Tue Dec 03, 2019 7:16 pm
Other bank I just installed that prevents freecad from booting is cfd.

However, I have determined that the combination of one or more workbenches are preventing freecad from booting. For example, I have removed almost all workbenches and left CFDs, LITHOPANE and PCBs, which were banks that caused problems, but now freecad starts up correctly.
This sounds similar to this FreeCAD crashes when many WB are installed (was BIM and Dodo WB update causes crash).

Also please notice that not all external workbenches are kept up to date by their respective authors. Cfd was developed first, then it was forked and became CfdOF. The first one isn't updated a lot, while the latter one seems to receive a lot of attention from their developers. The PCB workbench seems it hasn't received any updates since 2017, so I'm not surprised it doesn't work.

You cannot ask the FreeCAD project to maintain each of those external workbenches, individual authors should maintain their workbenches. Users of those workbenches should report problems to the authors of those workbenches directly.

User avatar
dcapeletti
Posts: 403
Joined: Wed Jul 23, 2014 2:27 pm

Re: Errors in workbenches, do not let start freecad.

Post by dcapeletti » Wed Dec 04, 2019 4:32 pm

You cannot ask the FreeCAD project to maintain each of those external workbenches, individual authors should maintain their workbenches. Users of those workbenches should report problems to the authors of those workbenches directly.
Hi, I think I've made a bad point. I'm not asking FreeCAD maintainers to take care of the working environments, but rather that freecad run the environments under a safe box. For example:

1) Run a workbench under blocks error proof. If it passes the error test, the environment is loaded, otherwise it is ignored and freecad continues with its execution.

2) That freecad can remember the last known good execution. For example, remember which banks were active and which versions they had. If one is installed or updated and causes a fatal crash, freecad could warn the user and the user could determine what to do with the workbench.

3) If freecad fails to boot, show option to boot with workbenches disabled.

What I want is for freecad to boot. A workbench should not prevent freecad from running. Instead freecad should have some of the above mechanisms to ignore it and continue its boot. That way, each maintainer can continue to take care of their workbench and freecad wouldn't be so vulnerable to errors they might have.

Thanks

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

Re: Errors in workbenches, do not let start freecad.

Post by chrisb » Thu Dec 05, 2019 10:43 am

As we don't see such errors too often, I think it is sufficient to start FreeCAD in a kind of "Safe Mode" where no additional workbenches are loaded.

Post Reply