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 |
Reporter | Avenger | Assigned To | wmayer | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Arch Linux | OS Version | 2019/03/20 |
Product Version | 0.18 | ||||
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. libspnav: 0.2.3-2 Building with Spnav disables makes the crash go away: -DCMAKE_DISABLE_FIND_PACKAGE_Spnav=TRUE -DFREECAD_USE_3DCONNEXION=Off | ||||
Steps To Reproduce | Build FreeCAD aur package on arch linux. Try to start freecad under KDE wayland. Observe crash. | ||||
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 () | ||||
Tags | #tobeclosed, 3dconnexion | ||||
FreeCAD Information | |||||
|
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 Branch: makepkg Hash: 690774c0effe4fd7b8d2b5e2fb2b8c8d145e21ce 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: https://blog.martin-graesslin.com/blog/2015/07/porting-qt-applications-to-wayland/ 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. |
|
For v0.19: https://github.com/FreeCAD/FreeCAD/commit/870ad71f9905d6d3e7c0d12b7858142848d513f9 For v0.18: https://github.com/FreeCAD/FreeCAD/commit/0dc75267fee2af948c3085002a2cc61758cc5b30 |
Date Modified | Username | Field | Change |
---|---|---|---|
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 |