| Summary: | Wayland - Global shortcuts stop working rarely, and cause crash when opening KRunner | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Bojidar Marinov [:bojidar-bg] <bojidar.marinov.bg> |
| Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | nate |
| Priority: | NOR | Keywords: | drkonqi |
| Version First Reported In: | 6.4.5 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | https://crash-reports.kde.org/organizations/kde/issues/270023/events/1a560cd8ae86486995a926faa0431f18/ | ||
|
Description
Bojidar Marinov [:bojidar-bg]
2025-10-20 11:28:14 UTC
Actually, here's a bit of logs captured by journalctl right before the crash:
Oct 20 13:57:21 BojidarPC kwin_wayland[1774]: file:///home/bobo/.local/share/kwin/scripts/FocusNotifier/contents/code/main.js:9: TypeError: Cannot read property 'captionChanged' of null
Oct 20 14:02:15 BojidarPC kwin_wayland_wrapper[1774]: dbus[1774]: arguments to dbus_pending_call_block() were incorrect, assertion "pending != NULL" failed in file ../dbus/dbus/dbus-pending-call.c line 768.
Oct 20 14:02:15 BojidarPC kwin_wayland_wrapper[1774]: This is normally a bug in some application using the D-Bus library.
Oct 20 14:02:15 BojidarPC kwin_wayland_wrapper[1774]: D-Bus not built with -rdynamic so unable to print a backtrace
Oct 20 14:02:15 BojidarPC kwin_wayland_wrapper[1774]: KCrash: Application 'kwin_wayland' crashing... crashRecursionCounter = 2
Oct 20 14:02:19 BojidarPC systemd-coredump[2451327]: Process 1774 (kwin_wayland) of user 1000 dumped core.
<snip>
And, just for completeness' sake, here's the main.js referenced by the JS error (which did not cause the crash):
```
workspace.windowActivated.connect(update);
var captionConnection;
function update(client) {
if (captionConnection) {
captionConnection.disconnect();
}
captionConnection = client.captionChanged.connect(function() {sendUpdate(client)});
sendUpdate(client)
}
function sendUpdate(client) {
var output = `\n§ ${client.resourceName}: ${client.caption}\n`;
callDBus("scot.massie.FocusNotifier",
"/scot/massie/FocusNotifier",
"scot.massie.FocusNotifier",
"notifyOfFocus",
output);
}
```
#10 0x00007f1fe85dfe50 in _dbus_warn_check_failed (format=0x7f1fe85ec1b0 "arguments to %s() were incorrect, assertion \"%s\" failed in file %s line %d.\nThis is normally a bug in some application using the D-Bus library.\n") at ../dbus/dbus/dbus-internals.c:329 As the error message indicates, the script is using DBus incorrectly, and it's making KWin crash. You should report this to the author, or else undo the customizations you've made to the script if the problem only happens after you've customized it. (In reply to Nate Graham from comment #2) > As the error message indicates, the script is using DBus incorrectly, and > it's making KWin crash. You should report this to the author, or else undo > the customizations you've made to the script if the problem only happens > after you've customized it. A script error should generally not cause KWin to crash, nor cause the embedded kglobalacceld to stop working. Is there a known-good `callDbus` example I can base my script on? (I've customized it too heavily at this point and it'd be easier to just rewrite it. (: ) I experimented with running a few thousand `callDbus` calls virtually identical to the one in the script, with no ill effects—I'll keep looking for ways to recreate the conditions of the crash. As far as I can tell, the only special thing about the callDbus I use is that there is no actual DBus interface or method registered anywhere, only a dbus-monitor running in the background. So, if this is a script error, the summary would be "calling a non-existent dbus method from KWin script causes KWin to crash intermittently". I had a way of reproducing the issue by spamming window title changes, but in latest kwin_wayland (6.5.0), I can no longer reproduce it. Probably it has been fixed, one way or another. Thanks for the reply, and apologies for the confusing bug report (: Keep up the good work! |