Repository navigation
set_prop max_size/min_size with an unparsable value (e.g. "unset") aborts Hyprland: throws const char* past catch(std::exception&) #16685
Replies: 2 comments
|
This discussion has been automatically closed. |
0 replies
|
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hyprland version
Also present on
mainas of f469351 (2026-10-27).Description
Setting
max_sizeormin_sizethroughhl.dsp.window.set_propwith a value that is not a valid size expression aborts the compositor. The value"unset"triggers it, becauseunsetis only handled byparsePropTrivial, not by the size props. Any unparsable value should return an error instead.Reproduce (crashes the session):
hyprctl dispatch 'hl.dsp.window.set_prop({window="address:0x<addr>", prop="max_size", value="unset"})'Cause
In
src/config/shared/actions/ConfigActions.cpp,Actions::setProp, themax_sizeandmin_sizebranches do:That throws a
const char*, but the enclosing handler iscatch (std::exception& e), so the exception is not caught. It unwinds throughlua_pcallk(fromCConfigManager::eval, called by the hyprctl handler) and reachesstd::terminate, giving SIGABRT.Trimmed backtrace (two identical crashes):
Suggested fix
Return the error instead of throwing a non-
std::exception, e.g.return std::unexpected(std::format("failed to parse {} as an expression", VAL));, or throwstd::runtime_error. Optionally accept"unset"formax_size/min_sizeto clear the override, matching the other props.All reactions