Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1004007: freecad: Segfaults on armhf when clicking "Ceate New..." or File -> New

36 views
Skip to first unread message

Serge Schneider

unread,
Jan 19, 2022, 3:30:04 AM1/19/22
to
Package: freecad
Version: 0.19.1+dfsg1-2
Severity: important
X-Debbugs-Cc: se...@raspberrypi.com

Dear Maintainer,

When running FreeCAD, creating a new file crashes with a segfault:

connect failed: No such file or directory
Program received signal SIGSEGV, Segmentation fault.
#0 /lib/arm-linux-gnueabihf/libc.so.6(+0x2acb0) [0xb4aaacb0]
FreeCAD 0.19, Libs: 0.19R
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2021
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
##### #### ### ####
# # # # # #
# ## #### #### # # # # #
#### # # # # # # # ##### # #
# # #### #### # # # # #
# # # # # # # # # ## ## ##
# # #### #### ### # # #### ## ## ##


This is the same issue as #931458, which was closed because it was reported against Raspbian's packages.
However, the issue is reproducible in Debian too (using 20210823_raspi_2_bullseye.img.xz).

The crash seems to have something to do with how Ccoin3D creates the context in Qt.

Rebuilding FreeCAD against Qt4 rather than Qt5 makes it work. It also works on arm64.

The main difference I can see is that Qt is built with OpenGL support on arm64, but only OpenGL ES support on armhf.

The issue has also been reported upstream at https://tracker.freecadweb.org/view.php?id=4083, but there hasn't been any progess in a few years.

-- System Information:
Debian Release: 11.0
APT prefers stable-security
APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: armhf (armv7l)

Kernel: Linux 5.10.0-8-armmp (SMP w/4 CPU threads)
Kernel taint flags: TAINT_CRAP, TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages freecad depends on:
ii freecad-python3 0.19.1+dfsg1-2

Versions of packages freecad recommends:
ii calculix-ccx 2.17-3
ii graphviz 2.42.2-5

Versions of packages freecad suggests:
pn povray <none>

-- no debconf information

Tobias Frost

unread,
Jan 19, 2022, 11:20:04 AM1/19/22
to
On Wed, Jan 19, 2022 at 08:17:11AM +0000, Serge Schneider wrote:
> Package: freecad
> Version: 0.19.1+dfsg1-2
> Severity: important
> X-Debbugs-Cc: se...@raspberrypi.com
>
> Dear Maintainer,
>
> When running FreeCAD, creating a new file crashes with a segfault:
(...)

> This is the same issue as #931458, which was closed because it was reported
> against Raspbian's packages. However, the issue is reproducible in Debian
> too (using 20210823_raspi_2_bullseye.img.xz).
>
> The crash seems to have something to do with how Ccoin3D creates the context
> in Qt.
>
> Rebuilding FreeCAD against Qt4 rather than Qt5 makes it work. It also works
> on arm64.
>
> The main difference I can see is that Qt is built with OpenGL support on
> arm64, but only OpenGL ES support on armhf.
>
> Thegq issue has also been reported upstream at
> https://tracker.freecadweb.org/view.php?id=4083, but there hasn't been any
> progess in a few years.

The discussion on the FreCAD forum (pointer to the thread is in the above
FreeCAD ticket), namely the backtrace at
https://forum.freecadweb.org/viewtopic.php?p=456568#p456568 hints that this
crash is happening somewhere in libcoin: (IF the backtrace is related to what you see as well)
It is calling out to libx11's XDefaultScreenOfDisplay() and it looks like that this
might be a NULL-Pointer passed to that function...
https://codesearch.debian.net/search?q=XScreenOfDisplay+package%3Alibx11&literal=0

That reminds me of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=969230...

Unfortunatly I do not have any Pi4 I could use for this to debug at my hands.

However, you might want to see if cherry-picking the mentioned patch in
#969230 (https://github.com/coin3d/coin/pull/404/files) and recompile the
coin3 Debian package locally with that patch.. Maybe this does something for you
and helps pin-pointing the problem.


--
tobi

se...@raspberrypi.com

unread,
Jan 20, 2022, 7:50:03 AM1/20/22
to
A bit of a follow-up - I just found that running with
LIBGL_ALWAYS_INDIRECT=true gets rid of the black triangle problem.

se...@raspberrypi.com

unread,
Jan 20, 2022, 11:30:07 AM1/20/22
to
On Thu, 2022-01-20 at 12:42 +0000, se...@raspberrypi.com wrote:
> A bit of a follow-up - I just found that running with
> LIBGL_ALWAYS_INDIRECT=true gets rid of the black triangle problem.
>

Okay sorry, the black triangle issue just doesn't occur right away
every time, and LIBGL_ALWAYS_INDIRECT doesn't actually fix it.
0 new messages