aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--todo.org2
-rw-r--r--working/hyprland-layoutmsg-crash/issue-draft.md43
2 files changed, 44 insertions, 1 deletions
diff --git a/todo.org b/todo.org
index 7f5a008..df1d83e 100644
--- a/todo.org
+++ b/todo.org
@@ -71,7 +71,7 @@ Post-mortem for the 2026-07-15 velox no-kernel boot failure, from the archsetup/
Grading: Critical severity (SIGSEGV kills the whole desktop session; every GUI app's unsaved state lost) x rare edge case (twice in ~4.5 months: 2026-03-07 on v0.54.1, 2026-07-20 on v0.55.4) = P2 = [#B]. Upstream Hyprland bug, not this repo's code — the task tracks reporting it and picking up the fix.
A layoutmsg mfact dispatch (layout-resize, mod+H/L) throws std::bad_variant_access inside Layout::CAlgorithm::layoutMsg, uncaught, SIGSEGV. Both crashes fired from the layout-resize mfact path (keycode 104 shrink today, 108 grow in March). Layout at crash was master and the identical mfact had worked seconds earlier; the pre-crash window held monocle<->master toggles, two window closes dropping focus to "[Window nullptr]", and togglefloating x2. Monocle is a registered v0.55 layout (log shows graceful "Unknown monocle layoutmsg" rejects), so the config is not at fault; related edges are guarded ("mfact -> no window") while this path misses its variant guard. Repo has no newer build (0.55.4-1 installed and repo).
Evidence preserved in [[file:working/hyprland-layoutmsg-crash/][working/hyprland-layoutmsg-crash/]] (both crash reports + excerpts from the tmpfs session log, extracted before reboot loses it).
-Next: post the drafted upstream issue once approved; watch the repo for a fixed release and close on confirmation. The layout-resize script guard was declined (a script can't observe the internal desync; report-only per 2026-07-20 decision).
+Next: Craig posts the issue himself (2026-07-20 decision) — the voice-passed draft is [[file:working/hyprland-layoutmsg-crash/issue-draft.md][issue-draft.md]], with both crash reports and the log excerpts beside it for attaching. Watch the repo for a fixed release and close on confirmation. The layout-resize script guard was declined (a script can't observe the internal desync).
** TODO [#B] Assess a Hyprland left-drag window gesture :feature:hyprland:
Evaluate whether a global left-click drag can move ordinary windows without
breaking application selection, text interaction, or Wayland security
diff --git a/working/hyprland-layoutmsg-crash/issue-draft.md b/working/hyprland-layoutmsg-crash/issue-draft.md
new file mode 100644
index 0000000..57e7462
--- /dev/null
+++ b/working/hyprland-layoutmsg-crash/issue-draft.md
@@ -0,0 +1,43 @@
+crash: uncaught std::bad_variant_access in Layout::CAlgorithm::layoutMsg on `layoutmsg mfact` (v0.55.4, also v0.54.1)
+
+### Hyprland Version
+
+v0.55.4, commit a0136d8c04687bb36eb8a28eb9d1ff92aea99704 (Arch package 0.55.4-1). The same crash hit v0.54.1 (commit 4b07770b) on 2026-03-07. Both crash reports are attached.
+
+### Bug or Regression?
+
+It's a bug: the same backtrace appears on v0.54.1 and v0.55.4.
+
+### Description
+
+Hyprland segfaults when a `hyprctl dispatch layoutmsg mfact -0.05` arrives. The backtrace shows an uncaught `std::bad_variant_access` in the layout message path:
+
+```
+std::__throw_bad_variant_access(unsigned int)
+Layout::CAlgorithm::layoutMsg(std::basic_string_view<...> const&)
+Layout::CSpace::layoutMsg(...)
+Layout::CLayoutManager::layoutMsg(...)
+Config::Actions::layoutMessage(...)
+```
+
+The active layout was master, and the identical mfact dispatch had worked seconds earlier in the same session. Related edge cases reply gracefully instead of crashing, so it looks like one mfact path is missing a variant guard:
+
+- `layoutmsg mfact` with no focused window replies "mfact -> no window"
+- master-only messages sent while in monocle reply "Unknown monocle layoutmsg: swapwithmaster"
+
+### How to reproduce
+
+I don't have a deterministic reproducer. Both crashes came from a resize keybind that dispatches `layoutmsg mfact -0.05` (or `0.05`). What the session log shows in the minutes before today's crash:
+
+1. `general:layout` toggled between master and monocle several times during the session (long-lived session, 9 days).
+2. Two windows closed shortly before the crash. The log shows "On closed window, new focused candidate is [Window nullptr]".
+3. `togglefloating` dispatched twice.
+4. The mfact keybind fired and Hyprland segfaulted.
+
+My guess from the outside: per-workspace layout state (CSpace) ends up holding a different variant alternative than the one the active layout name implies. The mfact handler then does an unchecked `std::get`.
+
+### Crash reports
+
+Attached: today's report (v0.55.4) and the 2026-03-07 report (v0.54.1) with the identical backtrace through `Layout::CAlgorithm::layoutMsg`.
+
+System: Arch Linux, kernel 6.18.25-lts. GPU: AMD Strix Halo (Radeon 8060S). No plugins loaded.