graphics driver is usually the first suspect in this cases, what graphics card do you have and what driver are you using? the nouveau driver is known to be shity for example.
Try enabling software opengl in preferences
Try disabling the startpage.
Describe what you are usually doing when it crashes.
adrianinsaval wrote: ↑Thu Mar 30, 2023 2:56 am
graphics driver is usually the first suspect in this cases, what graphics card do you have and what driver are you using?
I am using the integrated graphics of an AMD Ryzen 7 5700G. glxgears runs fine and Civilization VI works, too.
adrianinsaval wrote: ↑Thu Mar 30, 2023 2:56 am
Try enabling software opengl in preferences
Try disabling the startpage.
Describe what you are usually doing when it crashes.
I can not do anything. It crashes instantly after the start.
I have this same issue on my laptop which i just upgraded to debian 12. Crash with debian 12 (bookworm) FreeCad 20.2 and the 20.2 AppImage.
Attached is an example and strace of the issue, captured via screen.
unfortunately i cannot determine what's the problem
it's not possible to use any switch except -h. They cause a different crash:
marcidy@Moog:~$ freecad -c
Argument expected for the -c option
usage: freecad [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
Program received signal SIGSEGV, Segmentation fault.
#0 /lib/x86_64-linux-gnu/libc.so.6(+0x3bf90) [0x7f63f9e5af90]
#1 /lib/x86_64-linux-gnu/libc.so.6(+0x175066) [0x7f63f9f94066]
#2 /lib/x86_64-linux-gnu/libpython3.11.so.1.0(+0x2d07f3) [0x7f63fb8d07f3]
#3 /lib/x86_64-linux-gnu/libpython3.11.so.1.0(Py_EncodeLocale+0x4e) [0x7f63fb8d0ede]
#4 freecad(+0x5034) [0x561690c23034]
#5 /lib/x86_64-linux-gnu/libc.so.6(+0x2718a) [0x7f63f9e4618a]
#6 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7f63f9e46245]
#7 freecad(+0x5ad1) [0x561690c23ad1]
No logs are written with the --with-log or -l switches, they crash with the same smaller stack.
Interestingly, i can use the "freecadcmd-python3" command directly to get the shell:
./freecadcmd-python3
FreeCAD 0.20.2, Libs: 0.20.2R
(c) Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2022
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
##### #### ### ####
# # # # # #
# ## #### #### # # # # #
#### # # # # # # # ##### # #
# # #### #### # # # # #
# # # # # # # # # ## ## ##
# # #### #### ### # # #### ## ## ##
[FreeCAD Console mode <Use Ctrl-D (i.e. EOF) to exit.>]
i haven't made further progress beyond this, might go the compile route to see if that works. Let me know if there's anything i can log / poke at for this, i don't really know how to debug this further.
I have reinstalled a couple times including deleting everything under my home directory in .cache, .config, and .FreeCAD.
There are no problems with FC 0.21 (many builds) on neither Bookworm nor Bullseye.
I also can not remember such problems with 0.20 on Bullseye.
You can try edit ~/.config/FreeCAD/user.cfg to enable software OpenGL
Thank you for the replies, im only at this machine twice a week and even then, not always able to work on it. Sorry for the slow response.
I did a complete reinstall from scratch of debian 12 and still yielded the crash, both with the packaged FreeCAD 0.20.2 and with a compiled FreeCAD 0.20.2.
The crash occurred in both of the above caes with and without enabling SoftwareOpenGL.
I'm going to try installing a kernel between 5.10 and 6.0 later to see if that fixes it.
A compiled 20.2 worked fine on my desktop at home with debian 12, whatever it is seems localized on the laptop.
I'll keep plugging at it, there's nothing wrong with 20.2, hopefully i can isolate the issue.
On a whim i launched as root and that worked (albeit i needed QTWEBENGINE_DISABLE_SANDBOX=1) though there were a lot of Qt based errors.
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setCompositionMode: Painter not active
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setPen: Painter not active
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setCompositionMode: Painter not active
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setPen: Painter not active
QXcbConnection: XCB error: 11 (BadAlloc), sequence: 477, resource id: 799, major code: 53 (CreatePixmap), minor code: 0
<snipped, see attached>
For clarity, the GUI came up and i was able to click around, use Part Design to create a padded sketch, and save the file. I think that acquits the graphics drivers.
For the record, this is an old laptop with Intel Integrated graphics:
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
I tried a fresh-installed Debian 11 and it still crashed. Which is odd, that worked before I upgraded to Debian 12. I have since fresh-installed Debian 12 again since that's my target.
I peppered some std::couts and print()s to attempt to trace where exactly it's crashing, but there is a redefinition of stdout and friends in Main/MainGui,cpp that I don't quite understand (yet), and that is interfering my attempt to deduce where it's crashing.
I undid the redefinitions of stdcout, but i suspect that caused a different crash in Gui/FreeCADGuiInit.py at the top level Log() call.
Any further hints appreciated. I attempted a debug build but couldn't launch the assembled binary, ill look at that again, I'd rather look at this in GDB.
I will keep poking, it's clearly a "me" issue, something weird with this machine but i can't tell what weirdness has survived over multiple OS installs (or what weirdness i had done previously which hasn't been done, etc).