Skip to content

Fix (wayfire/backend): Fixed unhandled exception (out_of_range) after…#5076

Open
muratyalcin-ce wants to merge 1 commit into
Alexays:masterfrom
muratyalcin-ce:master
Open

Fix (wayfire/backend): Fixed unhandled exception (out_of_range) after…#5076
muratyalcin-ce wants to merge 1 commit into
Alexays:masterfrom
muratyalcin-ce:master

Conversation

@muratyalcin-ce
Copy link
Copy Markdown

Waybar version & Setup Info

Waybar v0.15.0
Waybar v05945748 (branch 'master')

I am launching waybar using wayfire's autostart plugin.

Explanation of the Bug

Waybar crashes with an unhandled exception after i put my laptop in idle.

After examining the logs, i found an unhandled exception in the backend code of wayfire.

Related logs:

[2026-05-27 23:06:32.550] [debug] Wayfire IPC: received event "output-wset-changed"
[2026-05-27 23:06:32.552] [debug] Output removed: Chimei Innolux Corporation 0x15E6
terminate called after throwing an instance of 'std::out_of_range'
  what():  unordered_map::at

Simply adding a try-catch clause could have unintended side effects, i apologize in advance for my lack of knowledge about the codebase.
The patch seems to work when trying to recreate the bug.
There may be a way where the proper wset might not get set and crash the program with a different unhandled exception.

I unfortunately do not have the hardware to test this with multiple outputs.
Please do point out if there are any faults within my solution as I consider myself rather inexperienced.

@muratyalcin-ce
Copy link
Copy Markdown
Author

The patch seems to work regardless of whether or not the preserve-output plugin is loaded in wayfire. Explicitly specifiying an output in waybar's configuration also did not affect the patch negatively.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant