Skip to content

make add() idempotent and guard run loop against panics - #834

Open
romanstingler wants to merge 1 commit into
MalpenZibo:mainfrom
romanstingler:fix/outputs-idempotency-and-panic-guard
Open

make add() idempotent and guard run loop against panics#834
romanstingler wants to merge 1 commit into
MalpenZibo:mainfrom
romanstingler:fix/outputs-idempotency-and-panic-guard

Conversation

@romanstingler

Copy link
Copy Markdown
Collaborator

Guard against double-Added races in Outputs::add(): if a live shell already exists for the exact (name, output_id) pair, skip re-creating the layer surface. This prevents needless wgpu surface churn when the compositor re-announces an output while a previous surface is still being torn down.

Also wrap the iced run loop in catch_unwind so wgpu/compositor panics produce a clean logged exit (with backtrace from the existing panic hook) instead of a silent core dump, making systemd restarts reliable.

@github-actions github-actions Bot added the bug Something isn't working label Jun 18, 2026
@clotodex

clotodex commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

@romanstingler I might be able to test this well with niri dmps off and on
In case you need testers when this is ready to be merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panic when laptop lid is closed and reopened

2 participants