Skip to content

fix: guard against negative output scale values#3008

Merged
ammen99 merged 1 commit intoWayfireWM:masterfrom
CaligraLtd:guard-output-scale
Apr 15, 2026
Merged

fix: guard against negative output scale values#3008
ammen99 merged 1 commit intoWayfireWM:masterfrom
CaligraLtd:guard-output-scale

Conversation

@coffeejunk
Copy link
Copy Markdown
Contributor

Guard against invalid output scale values to prevent Wayfire crashes.


I somehow fatfingered a - in front of my scaling factor which results in this segfault:

wayfire: ../src/core/output-layout.cpp:1937: wf::output_t* wf::output_layout_t::impl::get_output_coords_at(const wf::pointf_t&, wf::pointf_t&): Assertion `handle || is_shutting_down()' failed.
EE 2026-04-13 16:36:29.481 - [src/main.cpp:144] Fatal error: Fatal error(SIGABRT)
EE 2026-04-13 16:36:29.528 - #1  signal_handler(int) ../src/main.cpp:146
EE 2026-04-13 16:36:29.540 - #2  __restore_rt ??:?
EE 2026-04-13 16:36:29.551 - #3  __pthread_kill_implementation ??:?
EE 2026-04-13 16:36:29.563 - #4  __GI_raise :?
EE 2026-04-13 16:36:29.575 - #5  __GI_abort :?
EE 2026-04-13 16:36:29.589 - #6  __GI___assert_perror_fail :?
EE 2026-04-13 16:36:29.685 - #7  wf::output_layout_t::impl::get_output_coords_at(wf::pointf_t const&, wf::pointf_t&) ../src/core/output-layout.cpp:1938
EE 2026-04-13 16:36:29.783 - #8  wf::output_layout_t::get_output_coords_at(wf::pointf_t, wf::pointf_t&) ../src/core/output-layout.cpp:1991
EE 2026-04-13 16:36:29.964 - #9  wf::compositor_core_impl_t::post_init() ../src/core/core.cpp:309 (discriminator 7)
EE 2026-04-13 16:36:30.014 - #10 main ../src/main.cpp:514
EE 2026-04-13 16:36:30.026 - #11 __libc_start_call_main ??:?
EE 2026-04-13 16:36:30.036 - #12 __libc_start_main_alias_2 :?
EE 2026-04-13 16:36:30.289 - #13 ?? ??:0

Comment thread src/core/output-layout.cpp Outdated
Copy link
Copy Markdown
Member

@ammen99 ammen99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ammen99 ammen99 merged commit 1c7d777 into WayfireWM:master Apr 15, 2026
4 checks passed
@coffeejunk coffeejunk deleted the guard-output-scale branch April 15, 2026 19:54
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.

2 participants