Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clementine segfaults when QT_QPA_PLATFORM=wayland #6587

Open
3 tasks done
JacobHenner opened this issue Feb 22, 2020 · 7 comments
Open
3 tasks done

Clementine segfaults when QT_QPA_PLATFORM=wayland #6587

JacobHenner opened this issue Feb 22, 2020 · 7 comments

Comments

@JacobHenner
Copy link
Contributor

Before posting

Please follow the steps below and check the boxes with [x] once you did the step.

  • I checked the issue tracker for similar issues
  • I checked the changelog if the issue is already resolved
  • I tried the latest Clementine build from here

System information

Please provide information about your system and the version of Clementine used.

  • Operating System: Arch Linux
  • Clementine version: 1.4.0rc1-128-ge1c872666

Expected behaviour / actual behaviour

I expect Clementine to run under wayland. However, when I run clementine with QT_QPA_PLATFORM=wayland under GNOME, it immediately crashes with a segfault (no other output).

I've also tried on Weston - same issue.

I use two monitors with fractional scaling enabled. The issue occurs regardless of how many monitors are connected.

Steps to reproduce the problem (only for bugs)

Run QT_QPA_PLATFORM=wayland clementine

Starting program: /usr/bin/clementine                                                                                                                                               
[Thread debugging using libthread_db enabled]                                                                                                                                       
Using host libthread_db library "/usr/lib/libthread_db.so.1".                                                                                                                       
__logging_message__20:44:14.549 DEBUG unknown                          Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.   
[New Thread 0x7fffec13d700 (LWP 58603)]                                                                                                                                             
[New Thread 0x7fffeb93c700 (LWP 58604)]                                                                                                                                             
[New Thread 0x7fffeb0ec700 (LWP 58605)]                                                                                                                                             
[New Thread 0x7fffea8eb700 (LWP 58606)]                                                                                                                                             
[New Thread 0x7fffea0d6700 (LWP 58607)]                                                                                                                                             
[New Thread 0x7fffe9715700 (LWP 58608)]                                                                                                                                             
[New Thread 0x7fffe8f14700 (LWP 58609)]                                                                                                                                             
[New Thread 0x7fffd3fff700 (LWP 58610)]                                                                                                                                             
[Detaching after fork from child process 58611]                                                                                                                                     
[Detaching after fork from child process 58612]                                                                                                                                     
[Detaching after fork from child process 58613]                                                                                                                                     
[Detaching after fork from child process 58614]                                                                                                                                     
[Detaching after fork from child process 58615]                                                                                                                                     
[Detaching after fork from child process 58616]                                                                                                                                     
[Detaching after fork from child process 58617]                                                                                                                                     
[Detaching after fork from child process 58618]                                                                                                                                     
                                                                                                                                                                                    
Thread 1 "clementine" received signal SIGSEGV, Segmentation fault.                                                                                                                  
0x00007ffff4f4fbb5 in XkbUseExtension () from /usr/lib/libX11.so.6  
Thread 1 (Thread 0x7fffec91fb00 (LWP 58558)):
#0  0x00007ffff4f4fbb5 in XkbUseExtension () at /usr/lib/libX11.so.6
#1  0x00007ffff4f46617 in  () at /usr/lib/libX11.so.6
#2  0x00007ffff4f46f28 in XKeysymToKeycode () at /usr/lib/libX11.so.6
#3  0x0000555555f072c7 in QxtGlobalShortcutPrivate::nativeKeycode(Qt::Key) ()
#4  0x0000555555f067bb in QxtGlobalShortcutPrivate::setShortcut(QKeySequence const&) ()
#5  0x0000555555f06d8f in QxtGlobalShortcut::QxtGlobalShortcut(QKeySequence const&, QObject*) ()
#6  0x0000555555bce999 in QxtGlobalShortcutBackend::AddShortcut(QAction*) ()
#7  0x0000555555bceb24 in QxtGlobalShortcutBackend::DoRegister() ()
#8  0x0000555555d529ea in GlobalShortcutBackend::Register() ()
#9  0x0000555555ba0935 in GlobalShortcuts::ReloadSettings() ()
#10 0x0000555555ba45fe in GlobalShortcuts::GlobalShortcuts(QWidget*) ()
#11 0x0000555555a6b203 in MainWindow::MainWindow(Application*, SystemTrayIcon*, OSD*, CommandlineOptions const&, QWidget*) ()
#12 0x000055555585ea2f in main ()

@jbroadus
Copy link
Contributor

I can repro. As indicated by the trace above, shortcut keys need to be configured.

@JacobHenner
Copy link
Contributor Author

After opening the preferences menu, selecting "Use GNOME's shortcut keys", and reopening using Wayland, things seem to work as expected. I suppose this is a bug - Clementine should do something other than crash if the shortcut settings are insufficient.

@jbroadus
Copy link
Contributor

So, it looks like this was fixed once before. #6469

@JacobHenner
Copy link
Contributor Author

So, it looks like this was fixed once before. #6469

I think I discounted that issue originally because the trace was slightly different - perhaps the cause is the same.

@jbroadus
Copy link
Contributor

Yeah, that other fix looks for org.kde.kglobalaccel, so it specifically targets kde systems.

The 3rd party qxt library that we're using hasn't been maintained since 2014, so maybe some of the features have since been implemented in the base qt.

@jbroadus
Copy link
Contributor

A stopgap to prevent the crash could be to check QGuiApplication::platformName for "wayland". But should also figure out a way to let the user know that shortcuts won't work in this case.

@miku84
Copy link

miku84 commented Mar 24, 2020

It opens now on wayland.
The only issue is that is has generic Wayland icon (as W). Tested in Plasma 5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants