Bug 452060 - plasma-integration commit 2b406a9df triggers a konsole segfault
Summary: plasma-integration commit 2b406a9df triggers a konsole segfault
Status: RESOLVED FIXED
Alias: None
Product: plasma-integration
Classification: Plasma
Component: general (other bugs)
Version First Reported In: master
Platform: Gentoo Packages Other
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-30 02:37 UTC by Duncan
Modified: 2022-04-04 06:07 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Backtrace with debug symbols (3.79 KB, text/plain)
2022-03-30 07:20 UTC, Alex Fiestas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2022-03-30 02:37:27 UTC
I run git-master frameworks/plasma/(most)-gear, including konsole, using the gentoo/kde overlay's live-git ebuilds.  The below plasma-integration commit triggers a konsole segfault before it even displays a window (on wayland if it matters).  I don't have symbols installed but a backtrace says the segfault is in wl_proxy_get_version() from libwayland-client.so.0,  in ?? in from KDEPlasmaPlatformTheme.so, which belongs to plasma-integration, so (after I found libwayland-client.so.0 belonged to wayland-1.20.0, which hadn't been upgraded since December) I began bisecting plasma-integration.  There were only three candidates to check including my previous-install commit, so it went pretty fast and it bisected to the below commit, still current HEAD.

* commit 2b406a9df (HEAD, master, refs/git-r3/HEAD)
Author:     David Redondo <kde@david-redondo.de>
AuthorDate: Fri Mar 25 15:08:17 2022 +0100
Commit:     David Redondo <kde@david-redondo.de>
CommitDate: Fri Mar 25 15:08:17 2022 +0100

WaylandIntegration: Install event filter

This got lost because it was done in the registry slot
---
src/platformtheme/kwaylandintegration.cpp | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/platformtheme/kwaylandintegration.cpp b/src/platformtheme/kwaylandintegration.cpp
index 63b24297a..59942bc2d 100644
--- a/src/platformtheme/kwaylandintegration.cpp
+++ b/src/platformtheme/kwaylandintegration.cpp
@@ -50,6 +50,7 @@ KWaylandIntegration::KWaylandIntegration()
, m_appMenuManager(new AppMenuManager)
, m_paletteManager(new ServerSideDecorationPaletteManager)
{
+    QCoreApplication::instance()->installEventFilter(this);
}

KWaylandIntegration::~KWaylandIntegration() = default;
Comment 1 Duncan 2022-03-30 02:52:45 UTC
FWIW with konsole broken I had to use weston-terminal as my backup terminal (just as weston's my backup compositor, I'm running git-master kwin after all...) to do the bisect.   I sure missed konsole's integration, but for a backup when konsole was broken it got the job done.
Comment 2 Alex Fiestas 2022-03-30 07:20:58 UTC
Created attachment 147838 [details]
Backtrace with debug symbols

Attaching bt with debug symbols, I am a bit rusty reading Bts but it seems that proxy is a null pointer and wl_proxy_get_version tries to read from it.
Comment 3 David Edmundson 2022-04-04 01:40:44 UTC
Git commit 8a36a5b46f7464f7c8e5f80482c4a796f7bdfcbc by David Edmundson.
Committed on 04/04/2022 at 01:40.
Pushed by davidedmundson into branch 'master'.

Initialise globals on startup

Even though use of QWaylandClientExtension has the registry initialsed
on startup, there's a quirk of extension that it doesn't create itself right away.

We've seen that windows can change palettes on startup before the
event loop has run.

M  +16   -0    src/platformtheme/kwaylandintegration.cpp

https://invent.kde.org/plasma/plasma-integration/commit/8a36a5b46f7464f7c8e5f80482c4a796f7bdfcbc
Comment 4 Alex Fiestas 2022-04-04 06:07:33 UTC
Fixed for me, thanks! 🤗