View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003913||FreeCAD||Bug||public||2019-03-20 13:56||2019-07-29 15:01|
|Platform||Linux||OS||Arch Linux||OS Version||2019/03/20|
|Fixed in Version||0.18|
|Summary||0003913: libspnav crash on linux wayland during startup|
|Description||When starting the 0.18dev version of FreeCAD on Arch Linux running KDE under wayland it crashes during startup before the main window is shown (after the splash).|
The FreeCAD version used is 0.18-90-g4a41c27cd.
Building with Spnav disables makes the crash go away:
|Steps To Reproduce||Build FreeCAD aur package on arch linux.|
Try to start freecad under KDE wayland.
|Additional Information||The backtrace is as follows:|
#0 0x0000000000000009 in ()
#1 0x00007ffff1a44b7d in XInternAtom () at /usr/lib/libX11.so.6
0000002 0x00007ffff4b3b704 in spnav_x11_open () at /usr/lib/libspnav.so.0
0000003 0x00007ffff7659e0b in Gui::GUIApplicationNativeEventAware::initSpaceball(QMainWindow*) () at /usr/lib/freecad/lib/libFreeCADGui.so
0000004 0x00007ffff75f0685 in Gui::Application::runApplication() () at /usr/lib/freecad/lib/libFreeCADGui.so
0000005 0x000055555555845f in main ()
||Please always post your Help > About FreeCAD > Copy to clipboard info whenever you ask for help or open a ticket|
Getting that info was kind of difficult, due to the crash during startup.
However, here is a copy of the non-crashing build:
OS: Arch Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16093 (Git)
Build type: Release
Python version: 3.7.2
Qt version: 5.12.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
||@wmayer please weigh in, thanks!|
At start-up we initialize spnav this way:
On a system where no X is available I guess QX11Info::display() return null. Can you check if writing this fixes the problem?
FYI, the spnav API has two different function sets. The one is X11 based that we use in FreeCAD at the moment and the other one is the polling API which e.g. Blender uses. I hope that someone will start on integrating the polling API for FreeCAD too so that it works with Wayland.
||Actually, this does not help, as QX11Info::display() is not a nullptr even though freecad is running as a native wayland window (as per the kwin debug console atleast).|
||If QX11Info::display() doesn't return null then the bug must be inside spnav_x11_open, i.e. a spnav bug.|
I think so as well. I was able to recreate the crash in a standalone Qt application.
Seeing as this implementation has been replaced in freecad anyways, the bug should probably be closed.
||@Avenger does the bug need to be reported upstream?|
||I can handle that, I have a sample application that triggers the bug.|
||@Avenger great news! Do you mind notating the URL for the upstream ticket before we close this one? Thanks!|
Seeing as this implementation has been replaced in freecad anyways, the bug should probably be closed.There has been done some refactoring work for v0.19 but at the moment spnav_x11_open is still used.
The next step would be to use spanav's polling API as Blender does it too and therefore we would use spnav_open, instead.
After doing some reading on this problem, it seems that this is a FreeCAD issue after all (or maybe a Qt one). See this blog post:
It seems that QX11Info::display() returns the wayland display when run on wayland, so it will be cast to the wrong type of pointer once spnav tries to use it. A solution is also presented in that blog post.
|2019-03-20 13:56||Avenger||New Issue|
|2019-03-20 18:49||Kunda1||Note Added: 0012931|
|2019-03-20 18:50||Kunda1||Status||new => feedback|
|2019-03-20 20:23||Avenger||Note Added: 0012934|
|2019-03-20 20:23||Avenger||Status||feedback => new|
|2019-03-26 10:06||Kunda1||Note Added: 0012958|
|2019-03-26 10:06||Kunda1||Tag Attached: 3dconnexion|
|2019-03-26 10:07||Kunda1||Target Version||=> 0.19|
|2019-03-27 15:08||wmayer||Note Added: 0012969|
|2019-03-27 15:09||wmayer||Note Edited: 0012969|
|2019-03-27 15:09||wmayer||Note Edited: 0012969|
|2019-03-27 22:14||Avenger||Note Added: 0012970|
|2019-04-03 10:53||wmayer||Note Added: 0012985|
|2019-04-03 14:37||Avenger||Note Added: 0012986|
|2019-04-03 14:57||Kunda1||Note Added: 0012990|
|2019-04-03 14:57||Kunda1||Tag Attached: #tobeclosed|
|2019-04-03 15:27||Avenger||Note Added: 0012991|
|2019-04-04 13:09||Kunda1||Status||new => feedback|
|2019-04-04 13:09||Kunda1||Note Added: 0012994|
|2019-04-04 14:02||wmayer||Note Added: 0012996|
|2019-04-04 17:38||Avenger||Note Added: 0012997|
|2019-04-04 17:38||Avenger||Status||feedback => new|
|2019-04-05 15:25||wmayer||Note Edited: 0012996|
|2019-04-05 15:46||wmayer||Assigned To||=> wmayer|
|2019-04-05 15:46||wmayer||Status||new => closed|
|2019-04-05 15:46||wmayer||Resolution||open => fixed|
|2019-04-05 15:46||wmayer||Fixed in Version||=> 0.18|
|2019-04-05 15:46||wmayer||Note Added: 0012999|
|2019-07-29 15:01||Kunda1||Changeset attached||=> FreeCAD releases/FreeCAD-0-18 0dc75267|