#1053917 libqt5gui5: Segfaults when starting QT application

Package:
libqt5gui5
Source:
libqt5gui5
Description:
Qt 5 GUI module
Submitter:
Patrik Svestka
Date:
2023-11-24 12:24:02 UTC
Severity:
normal
Tags:
#1053917#5
Date:
2023-10-14 08:55:25 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?
   Having CopyQ and KeePassXC QT applications autostarted

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   No interaction needed.  Just applications fail to autostart with the libQt5XcbQpa.so.5.15.8 segfaulting.  If both the applications are started **after** Gnome starts they start normally.

   * What was the outcome of this action?
[   53.703793] copyq[3458]: segfault at 10 ip 00007fb8614f5ded sp 00007ffdca20ecb0 error 4 in libQt5XcbQpa.so.5.15.8[7fb8614c7000+ca000] likely on CPU 7 (core 3, socket 0)
[   53.703806] Code: 89 d4 55 53 48 89 cb 48 83 ec 10 48 8b 79 20 48 8b 2d 2f 40 10 00 64 48 8b 04 25 28 00 00 00 48 89 44 24 08 31 c0 48 89 69 20 <8b> 47 10 85 c0 74 7c 83 f8 ff 74 0a 48 8d 57 10 f0 83 2a 01 74 6d
[   53.817610] keepassxc[3387]: segfault at 11 ip 00007fb6160f5ded sp 00007ffc13bd08b0 error 4 in libQt5XcbQpa.so.5.15.8[7fb6160c7000+ca000] likely on CPU 4 (core 0, socket 0)
[   53.817625] Code: 89 d4 55 53 48 89 cb 48 83 ec 10 48 8b 79 20 48 8b 2d 2f 40 10 00 64 48 8b 04 25 28 00 00 00 48 89 44 24 08 31 c0 48 89 69 20 <8b> 47 10 85 c0 74 7c 83 f8 ff 74 0a 48 8d 57 10 f0 83 2a 01 74 6d

   * What outcome did you expect instead?
   Be autostarted as other GTK applications.

#1053917#10
Date:
2023-11-24 12:17:01 UTC
From:
To:
tag 1053917 moreinfo

thanks


Hi!


Mmm, Gnome uses Wayland nowadays, and the segfault comes form libQt5XcbQpa,

which is the lib that handles X stuff. It only happens before Gnome
completely started,

  so I wonder if we have some race condition on which Qt apps try to use
X too soon

in the process.


But let's try this. Try starting your app on log by prepending
QT_QPA_PLATFORM


QT_QPA_PLATFORM=wayland /usr/bin/yourapp


Or any other way that ensures that QT_QPA_PLATFORM=wayland is set as
environment variable before starting the app.

#1053917#17
Date:
2023-11-24 12:21:37 UTC
From:
To:
Or try finding a way to start the apps once all the relevant Wayland
stuff is there, as clearly something is guiding Qt apps to use X
instead.