Bug 463325 - plasma-remotecontrollers crash, because it try to register listener for wayland when running X11
Summary: plasma-remotecontrollers crash, because it try to register listener for wayla...
Status: RESOLVED FIXED
Alias: None
Product: Plasma Bigscreen
Classification: Plasma
Component: Remote Controllers (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Aditya Mehra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-22 05:48 UTC by Tyler
Modified: 2023-03-02 13:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.3
Sentry Crash Report:


Attachments
New crash information added by DrKonqi (3.08 KB, text/plain)
2023-02-16 14:16 UTC, yurapostates
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler 2022-12-22 05:48:11 UTC
Application: plasma-remotecontrollers (plasma-remotecontrollers), signal: Segmentation fault

[KCrash Handler]
#4  0x00007ff74f0b38f2 in QtWaylandClient::QWaylandDisplay::addRegistryListener(void (*)(void*, wl_registry*, unsigned int, QString const&, unsigned int), void*) () from /usr/lib/libQt5WaylandClient.so.5
#5  0x00007ff74f0d16b0 in QWaylandClientExtension::addRegistryListener() () from /usr/lib/libQt5WaylandClient.so.5
#6  0x00007ff74e29c56e in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const () from /usr/lib/libQt5Core.so.5
#7  0x00007ff74e29cf60 in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) () from /usr/lib/libQt5Core.so.5
#8  0x000055697b0a3c46 in ?? ()
#9  0x000055697b0a540f in ?? ()

STEPS TO REPRODUCE
1. Install "plasma-bigscreen" package on ArchLinux
2. Login from SDDM for X11 Plasma
3. See plasma-remotecontrollers crash at login/start up.

OBSERVED RESULT
Plasma-remotecontrollers crash error dialog appears, because it attempts to register listener for Wayland server when Wayland is not running on X11 Plasma Shell.

EXPECTED RESULT
Should have no crash dialog appearing, if anything, it should terminates itself if wayland server is not detected.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.0.12-arch1-1 / 5.26.4
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Comment 1 yurapostates 2023-02-16 14:16:17 UTC
Created attachment 156302 [details]
New crash information added by DrKonqi

plasma-remotecontrollers (5.27.0) using Qt 5.15.8

This happens every time I login to Plasma X11 from SDDM. Haven't tested in any other configuration.

-- Backtrace (Reduced):
#6  0x00007fcb8e03a8c2 in QtWaylandClient::QWaylandDisplay::addRegistryListener(void (*)(void*, wl_registry*, unsigned int, QString const&, unsigned int), void*) () from /usr/lib/libQt5WaylandClient.so.5
#7  0x00007fcb8e058760 in QWaylandClientExtension::addRegistryListener() () from /usr/lib/libQt5WaylandClient.so.5
#8  0x00007fcb8d29d51e in QMetaMethod::invoke (this=<optimized out>, object=0x55f9c15aa4d0, connectionType=Qt::DirectConnection, returnValue=..., val0=..., val1=..., val2=..., val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...) at kernel/qmetaobject.cpp:2310
[...]
#11 FakeInput::FakeInput (this=0x55f9c15aa4d0) at /usr/src/debug/plasma-remotecontrollers/plasma-remotecontrollers-5.27.0/src/kwinfakeinputsystem.cpp:26
#12 KWinFakeInputSystem::init (this=0x55f9c159fb50) at /usr/src/debug/plasma-remotecontrollers/plasma-remotecontrollers-5.27.0/src/kwinfakeinputsystem.cpp:33
Comment 2 Aleix Pol 2023-03-02 13:29:10 UTC
Git commit dd31a995c6e482bcadf98633f29c38637c3919fb by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 02/03/2023 at 13:28.
Pushed by apol into branch 'master'.

Improve recovery from missing input systems

* Only initialise org_kde_kwin_fakeinput if we are on wayland.
* If we are still on wayland but org_kde_kwin_fakeinput is not available
warn and fail to init().
* Warn if there's no input system.
* Make sure we always initialise it the same way

M  +1    -1    kcm/package/contents/ui/main.qml
M  +2    -0    src/CMakeLists.txt
M  +18   -14   src/controllermanager.cpp
M  +1    -1    src/controllermanager.h
M  +2    -2    src/controllermanagerdbusinterface.cpp
M  +5    -1    src/kwinfakeinputsystem.cpp

https://invent.kde.org/plasma-bigscreen/plasma-remotecontrollers/commit/dd31a995c6e482bcadf98633f29c38637c3919fb
Comment 3 Aleix Pol 2023-03-02 13:29:54 UTC
Git commit f470733725a8b3880a5bffa21a59edadef78af24 by Aleix Pol.
Committed on 02/03/2023 at 13:29.
Pushed by apol into branch 'Plasma/5.27'.

Improve recovery from missing input systems

* Only initialise org_kde_kwin_fakeinput if we are on wayland.
* If we are still on wayland but org_kde_kwin_fakeinput is not available
warn and fail to init().
* Warn if there's no input system.
* Make sure we always initialise it the same way
(cherry picked from commit dd31a995c6e482bcadf98633f29c38637c3919fb)

M  +1    -1    kcm/package/contents/ui/main.qml
M  +2    -0    src/CMakeLists.txt
M  +18   -14   src/controllermanager.cpp
M  +1    -1    src/controllermanager.h
M  +2    -2    src/controllermanagerdbusinterface.cpp
M  +5    -1    src/kwinfakeinputsystem.cpp

https://invent.kde.org/plasma-bigscreen/plasma-remotecontrollers/commit/f470733725a8b3880a5bffa21a59edadef78af24