Bug 27340 - FreeCAD segfaults on Open FreeCAD material editor (FEM)
Summary: FreeCAD segfaults on Open FreeCAD material editor (FEM)
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2020-09-30 01:46 CEST by Herbert Poetzl
Modified: 2020-10-03 09:55 CEST (History)
3 users (show)

See Also:
Source RPM: freecad-0.18.2-1.mga7.src.rpm
CVE:
Status comment:


Attachments

Description Herbert Poetzl 2020-09-30 01:46:58 CEST
Description of problem:
When selecting 'Open FreeCAD material editor from the FEM Workbench, FreeCAD segfaults.

Version-Release number of selected component (if applicable):
FreeCAD 0.18, Libs: 0.18RUnknown

How reproducible:
Always

Steps to Reproduce:
1. Start FreeCAD
2. Create new document
3. Select FEM Workbench
4. Press the icon with the three yellow balls

FreeCAD 0.18, Libs: 0.18RUnknown
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

locations to look for material cards:
  /usr/share/freecad/Mod/Material/StandardMaterial
  /home/bertl/.FreeCAD/Material


Program received signal SIGSEGV, Segmentation fault.
#0  /lib64/libc.so.6(+0x3caf0) [0x7f4fa6523af0]
#1  /lib64/libexpat.so.1(XML_SetHashSalt+0x1b) [0x7f4fa40e47cb]
#2  /usr/lib64/python3.7/lib-dynload/_elementtree.cpython-37m-x86_64-linux-gnu.so(+0x9ed5) [0x7f4ef800bed5]
#3  /lib64/libpython3.7m.so.1.0(+0x181a02) [0x7f4fa753fa02]
#4  /lib64/libpython3.7m.so.1.0(_PyObject_FastCallKeywords+0xd3) [0x7f4fa74da083]
#5  /lib64/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x2825) [0x7f4fa7428ee5]
#6  /lib64/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0x8fe) [0x7f4fa74d9b3e]
#7  /lib64/libpython3.7m.so.1.0(_PyFunction_FastCallKeywords+0x93) [0x7f4fa74d9e73]
#8  /lib64/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x68af) [0x7f4fa742cf6f]
#9  /lib64/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0x8fe) [0x7f4fa74d9b3e]
#10  /lib64/libpython3.7m.so.1.0(_PyFunction_FastCallKeywords+0x93) [0x7f4fa74d9e73]
#11  /lib64/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x6f0d) [0x7f4fa742d5cd]
#12  /lib64/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0x8fe) [0x7f4fa74d9b3e]
#13  /lib64/libpython3.7m.so.1.0(_PyFunction_FastCallKeywords+0x93) [0x7f4fa74d9e73]
#14  /lib64/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x5dcd) [0x7f4fa742c48d]
#15  /lib64/libpython3.7m.so.1.0(+0x685f3) [0x7f4fa74265f3]
#16  /lib64/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x68af) [0x7f4fa742cf6f]
#17  /lib64/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0x8fe) [0x7f4fa74d9b3e]
#18  /lib64/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0xae) [0x7f4fa74da3be]
#19  /lib64/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xcd) [0x7f4fa74da94d]
#20  /lib64/libpython3.7m.so.1.0(+0x150a31) [0x7f4fa750ea31]
#21  /lib64/libpython3.7m.so.1.0(+0x181a02) [0x7f4fa753fa02]
#22  /lib64/libpython3.7m.so.1.0(_PyObject_FastCallKeywords+0xd3) [0x7f4fa74da083]
#23  /lib64/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x2825) [0x7f4fa7428ee5]
#24  /lib64/libpython3.7m.so.1.0(+0x685f3) [0x7f4fa74265f3]
#25  /lib64/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x6f0d) [0x7f4fa742d5cd]
#26  /lib64/libpython3.7m.so.1.0(_PyEval_EvalCodeWithName+0x8fe) [0x7f4fa74d9b3e]
#27  /lib64/libpython3.7m.so.1.0(PyEval_EvalCodeEx+0x3e) [0x7f4fa74d9dae]
#28  /lib64/libpython3.7m.so.1.0(PyEval_EvalCode+0x1b) [0x7f4fa74d9ddb]
#29  /lib64/libpython3.7m.so.1.0(+0x1bb394) [0x7f4fa7579394]
#30  /lib64/libpython3.7m.so.1.0(PyRun_StringFlags+0x75) [0x7f4fa7579455]
#31  0x7f4fa7faf594 in Gui::Application::sDoCommand(_object*, _object*) from /usr/lib64/freecad/lib/libFreeCADGui.so+0x84
#32  /lib64/libpython3.7m.so.1.0(_PyMethodDef_RawFastCallKeywords+0x2f9) [0x7f4fa7490a29]
#33  /lib64/libpython3.7m.so.1.0(_PyCFunction_FastCallKeywords+0x25) [0x7f4fa7490ae5]
#34  /lib64/libpython3.7m.so.1.0(_PyEval_EvalFrameDefault+0x7170) [0x7f4fa742d830]
#35  /lib64/libpython3.7m.so.1.0(+0x685f3) [0x7f4fa74265f3]
#36  /lib64/libpython3.7m.so.1.0(_PyFunction_FastCallDict+0x2e2) [0x7f4fa74da5f2]
#37  /lib64/libpython3.7m.so.1.0(_PyObject_Call_Prepend+0xcd) [0x7f4fa74da94d]
#38  /lib64/libpython3.7m.so.1.0(PyObject_Call+0x75) [0x7f4fa7477f65]
#39  /usr/lib64/freecad/lib/libFreeCADBase.so(PP_Run_Method+0xd3) [0x7f4fa7831043]
#40  0x7f4fa77cd989 in Base::InterpreterSingleton::runMethodVoid(_object*, char const*) from /usr/lib64/freecad/lib/libFreeCADBase.so+0x29
#41  0x7f4fa8024f88 in Gui::PythonCommand::activated(int) from /usr/lib64/freecad/lib/libFreeCADGui.so+0x88
#42  0x7f4fa8027f14 in Gui::Command::invoke(int) from /usr/lib64/freecad/lib/libFreeCADGui.so+0x54
#43  0x7f4fa6adbf68 in QMetaObject::activate(QObject*, int, int, void**) from /lib64/libQt5Core.so.5+0x6b8
#44  0x7f4fa6eccbc2 in QAction::triggered(bool) from /lib64/libQt5Widgets.so.5+0x32
#45  0x7f4fa6ecef80 in QAction::activate(QAction::ActionEvent) from /lib64/libQt5Widgets.so.5+0xf0
#46  /lib64/libQt5Widgets.so.5(+0x24b0cd) [0x7f4fa6fb70cd]
#47  0x7f4fa6fb72e0 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) from /lib64/libQt5Widgets.so.5+0xc0
#48  0x7f4fa7095dba in QToolButton::mouseReleaseEvent(QMouseEvent*) from /lib64/libQt5Widgets.so.5+0xa
#49  0x7f4fa6f0fb88 in QWidget::event(QEvent*) from /lib64/libQt5Widgets.so.5+0x1c8
#50  0x7f4fa7095e53 in QToolButton::event(QEvent*) from /lib64/libQt5Widgets.so.5+0x23
#51  0x7f4fa6ed2c81 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /lib64/libQt5Widgets.so.5+0x81
#52  0x7f4fa6edac98 in QApplication::notify(QObject*, QEvent*) from /lib64/libQt5Widgets.so.5+0x1228
#53  0x7f4fa7ffabd8 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib64/freecad/lib/libFreeCADGui.so+0x88
#54  0x7f4fa6ab37a9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /lib64/libQt5Core.so.5+0x189
#55  0x7f4fa6ed928f in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) from /lib64/libQt5Widgets.so.5+0x19f
#56  /lib64/libQt5Widgets.so.5(+0x1bd88c) [0x7f4fa6f2988c]
#57  /lib64/libQt5Widgets.so.5(+0x1c0678) [0x7f4fa6f2c678]
#58  0x7f4fa6ed2c81 in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /lib64/libQt5Widgets.so.5+0x81
#59  0x7f4fa6ed9c70 in QApplication::notify(QObject*, QEvent*) from /lib64/libQt5Widgets.so.5+0x200
#60  0x7f4fa7ffabd8 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib64/freecad/lib/libFreeCADGui.so+0x88
#61  0x7f4fa6ab37a9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) from /lib64/libQt5Core.so.5+0x189
#62  0x7f4fa4f1ae3b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) from /lib64/libQt5Gui.so.5+0x6cb
#63  0x7f4fa4f1c165 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) from /lib64/libQt5Gui.so.5+0x105
#64  0x7f4fa4ef953b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /lib64/libQt5Gui.so.5+0xbb
#65  /lib64/libQt5XcbQpa.so.5(+0x6fe3a) [0x7f4fa041ce3a]
#66  /lib64/libglib-2.0.so.0(g_main_context_dispatch+0x135) [0x7f4fa4588665]
#67  /lib64/libglib-2.0.so.0(+0x4d9e8) [0x7f4fa45889e8]
#68  /lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f4fa4588a6c]
#69  0x7f4fa6b04387 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /lib64/libQt5Core.so.5+0x67
#70  0x7f4fa6ab249b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /lib64/libQt5Core.so.5+0x12b
#71  0x7f4fa6aba108 in QCoreApplication::exec() from /lib64/libQt5Core.so.5+0x88
#72  0x7f4fa7f999b2 in Gui::Application::runApplication() from /usr/lib64/freecad/lib/libFreeCADGui.so+0x14c2
#73  /usr/lib64/freecad/bin/FreeCAD(main+0x6b7) [0x404777]
#74  /lib64/libc.so.6(__libc_start_main+0xeb) [0x7f4fa650db0b]
#75  /usr/lib64/freecad/bin/FreeCAD(_start+0x2a) [0x404a7a]
Comment 1 Lewis Smith 2020-09-30 21:40:11 CEST
Thank you for reporting this.
Tried it on Mageia 7 under Xfce. For non-FreeCad habitués, Steps to Reproduce:
1. Start FreeCAD
 It has menu + 2 toolbars.
2. Create new document
 Click the big 'Create new' icon on the opening page.
3. Select FEM Workbench
 Menu View-Workbench-FEM, adds a third toolbar between the existing two.
4. Press the icon with the three yellow balls
 Hover caption "Opens the FreeCAD material editor"
then the segfault exactly as shown above.

Cauldron/Mageia 8 is at version 0.18.4, but there have been several fixes to that, which could make an update/backport for Mageia 7 difficult.
I will try this on M8 to see whether it happens there.

Can you first post this problem on the FreeCAD forum:
 https://forum.freecadweb.org/
There are several threads about segfaults relating to FEM, but none seem the same as yours. It is important to establish whether other people have seen the same problem on other distributions; or whether it is known to be fixed by a more recent version.
If they suggest raising a bug with them (UPSTREAM), please do, and report back. Leaving this with Bugsquad until hearing from you. I doubt that we can fix things like this.

CC'in DavidG for info, he has done some of the recent patches, and is better placed to know about the update possibilities for M7.

CC: (none) => geiger.david68210, lewyssmith

Comment 2 Herbert Poetzl 2020-09-30 21:58:27 CEST
Hello Lewis,

I don't think that the FreeCAD folks will spend a lot of time looking into this (please try with latest stable :) but I might get around testing with their AppImages which could work to reproduce the issue there ...

Best,
Herbert

CC: (none) => herbert

Comment 3 David GEIGER 2020-10-01 07:07:41 CEST
Please test freecad-0.18.2-1.1.mga7 in Core/Updates_testing repo!

It was rebuild against Qt 5.12.6.
Comment 4 Lewis Smith 2020-10-02 21:51:40 CEST
Thank you Lightning David for another immediate update.

FWIW I tried it under Mageia 8; it did not crash, cannot tell whether it did what it was supposed to:
 $ FreeCAD
FreeCAD 0.18.3, Libs: 0.18.3RUnknown
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Running the Python command 'FEM_MaterialEditor' failed:
<unknown exception traceback>
'NoneType' object has no attribute 'hide'

Note:
* The console command is, unusually, 'FreeCAD'.
* Installing it: freecad-0.18.4-7.mga8.x86_64.rpm, but it itself shows 0.18.3,
as does Help-About FreeCAD.

I will try David's update under Mageia 7 - tomorrow!
Comment 5 Lewis Smith 2020-10-03 09:55:24 CEST
Mageia 7, Xfce.
 $ rpm -q freecad
freecad-0.18.2-1.1.mga7
 $ rpm -q freecad-data
freecad-data-0.18.2-1.1.mga7

Trying the update changes nothing, alas:
 $ FreeCAD
FreeCAD 0.18, Libs: 0.18RUnknown
...
then exactly as in comment 0 after following the prescribed path.

It is curious that this software has run so long before this fault came to light. It seems as if the FEM Workbench is a relatively recent enhancement which caused several problems upstream.
I have downgraded the severity because it is just this specific feature which does not work, but generally the software does.

@Herbert: Re comment 2, if you do try the AppImage, please report back.
@DavidG: it looks as if it may have to be closed 'wontfix' (meaning 'cannot fix'), but you are the better judge.

Severity: critical => major
Keywords: (none) => UPSTREAM


Note You need to log in before you can comment on or make changes to this bug.