quickshell-git: patch dangling IPC handler registrations

An IpcHandler deregisters itself from its destructor, but re-resolved its
registry by walking to its engine generation first — a walk that needs a
QML context that is already gone when the handler is destroyed along with
a reloading bar, a swapped plugin, or the shell root. The deregistration
was skipped and the registry kept a pointer to freed memory, so the next
`qs ipc call` into that target segfaulted the shell. Omarchy hits this
through omarchy.indicators refresh, which fires on every reminder, tmux
alert, and silencing toggle.

Carried on the fix-ipc-handler-lifetime branch of
https://github.com/omacom-io/quickshell

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Heinemeier HanssonandClaude Opus 5 committed 2026-07-24 14:25:58 -07:00
1 parent cac346011f
commit 8f78e1cc09
2 files changed
+232 -3

No files matched your search

+12 -3
View File
@@ -3,7 +3,7 @@
_pkgname=quickshell
pkgname="$_pkgname-git"
pkgver=0.3.0.r18.g10b439f
pkgrel=2
pkgrel=3
pkgdesc='Flexible toolkit for making desktop shells with QtQuick'
arch=(x86_64 aarch64)
url='https://git.outfoxxed.me/quickshell/quickshell'
@@ -39,10 +39,12 @@ conflicts=("$_pkgname")
_pkgsrc="$_pkgname"
source=("$_pkgsrc"::"git+$url.git#commit=10b439fc6e3fd65c15fe1c486271b31da05ed023"
quickshell-check.hook
0001-launch-clear-crash-relaunch-env.patch)
0001-launch-clear-crash-relaunch-env.patch
0002-ipchandler-deregister-through-registry.patch)
sha256sums=('SKIP'
'8543e21aeaaa5441b73a679160e7601a957f16c433e8d6bd9257e80bd0e94083'
'867f154dd3ea09ec751664e84fe9da47f6e0321b77abaa0cf3eb391a978de305')
'867f154dd3ea09ec751664e84fe9da47f6e0321b77abaa0cf3eb391a978de305'
'ba22289eba7ccd64672df003d0f8e3130a1e6799a5b75686b489fe39794e9725')
prepare() {
@@ -52,6 +54,13 @@ prepare() {
# boots a duplicate shell instead of running its command.
# Carried on the fix-crash-env-leak branch of https://github.com/omacom-io/quickshell
patch -Np1 -i "$srcdir/0001-launch-clear-crash-relaunch-env.patch"
# An IpcHandler deregistered itself by re-resolving its registry from its
# engine generation, which is unreachable once its QML context is torn down,
# so a handler destroyed with a reloading bar or plugin left the registry
# pointing at freed memory and the next `qs ipc call` on that target crashed.
# Carried on the fix-ipc-handler-lifetime branch of https://github.com/omacom-io/quickshell
patch -Np1 -i "$srcdir/0002-ipchandler-deregister-through-registry.patch"
}
pkgver() {