# What crashes the compositor, and exactly when Recorded from the delegated Claude session that spent its run on this, before that session was shut down. Its finding is sharper than the one the benchmark itself produced, so it is written down here rather than left in a tmux transcript. ## The trigger Reproduced deliberately, not just observed: 1. Hold a live capture session on a **session's headless output** (route 001b's `--protocol ext` producer, i.e. `ext-image-copy-capture-v1`). 2. Run `hhstream session kill` on that session, which destroys its output. 3. Call `create_frame` on the now-dangling capture session. → `SIGSEGV`, core dumped. The kill is **not** the crash: the compositor dies inside `ext-image-copy-capture`'s frame creation, on an output that no longer exists. ## The stack ``` #0 CScreenshareFrame::transform() const #1 CImageCopyCaptureFrame::CImageCopyCaptureFrame(...) #2 CExtImageCopyCaptureManagerV1Options... (createFrame) #3 _CExtImageCopyCaptureSessionV1CreateFrame ... #4 ffi_call_unix64 #10 wl_display_run ``` ## Why it matters, and what was done about it - It explains **three** compositor deaths during the benchmark (the two whose stack reached `CScreenshareFrame::transform()`, and one in `libaquamarine`), including one that happened mid-run and invalidated cells: the harness kills a session between passes while a producer may still hold a capture session on it. So the harness, not the protocol by itself, was pulling the trigger. - It is the reason the candidate that was measured and **not** adopted is not adopted: `ext-image-copy-capture-v1` measured no faster than `zwlr-screencopy-v1` (78.0 vs 77.7 ms; compositor 67.5 vs 67.2 ms) and its frame-creation path is the one that segfaults the compositor. The `feat/pywayland-capture` branch therefore keeps the deprecated `zwlr-screencopy-v1`, with the switch documented as one constant. - The crash is in Hyprland (0.56.2, software rendering), not in the harness or in pywayland. Anything that wants to propose it upstream will need this trigger, because it is the reproducible part: hold a capture session, destroy the output underneath it, then ask for a frame. ## Not established - Whether `zwlr-screencopy-v1` survives the same dangling-output sequence. The in-process backend in `feat/pywayland-capture` does handle the nearest equivalent (`global_remove` drops the output, and the next `grab()` reconnects and re-selects) — but that path has not been exercised against a real session kill, which is the obvious next experiment.