hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.1k stars 882 forks source link

hyprland crashes when opening a window when there is no unreserved space #4966

Closed RCSoap closed 7 months ago

RCSoap commented 7 months ago

Hyprland Version

System/Version info ``` Hyprland, built from branch HEAD at commit 84ab8d11e8951a6551d1e1bf87796a8589da6d47 (props: bump ver to 0.35.0). Date: Mon Feb 5 01:59:02 2024 Tag: v0.35.0 flags: (if any) System Information: System name: Linux Node name: platypus Release: 6.7.6-200.fc39.x86_64 Version: #1 SMP PREEMPT_DYNAMIC Fri Feb 23 18:27:29 UTC 2024 GPU information: 2d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c1) (prog-if 00 [VGA controller]) os-release: NAME="Fedora Linux" VERSION="39 (Thirty Nine)" ID=fedora VERSION_ID=39 VERSION_CODENAME="" PLATFORM_ID="platform:f39" PRETTY_NAME="Fedora Linux 39 (Thirty Nine)" ANSI_COLOR="0;38;2;60;110;180" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:39" DEFAULT_HOSTNAME="fedora" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f39/system-administrators-guide/" SUPPORT_URL="https://ask.fedoraproject.org/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=39 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=39 SUPPORT_END=2024-11-12 plugins: ```

Bug or Regression?

Bug

Description

when i open a window ( or drag a window from another monitor) onto a monitor where eww has left no unreserved space Hyprland will crash

How to reproduce

i can reproduce this issue using EWW (https://github.com/elkowar/eww) with the following code eww.yuck:

(defwindow monitorBar
        :monitor 1
        :exclusive true
        :stacking "bottom"
        :geometry (geometry  
                :height "100%"
                :width "100%"
                :x "0%"
                :y "0%"
                :anchor "bottom center")
  (monitorBar))

(defwidget monitorBar []
        (box
        :hexpand true
        :vexpand true
        :class "background"
                (label
                :hexpand true
                :class "background"
                :text "what is up"
                )
        )
) 

eww.scss:

* { all: unset; }

.background {
    background-color:   #ad4747;
}

relevant bits are:

:exclusive true -tells the compositor to reserve space for the window automatically

:height "100%" :width "100%" -are the amount of space on the monitor to reserve

if hyprland has enough space to spawn a window eg :height "90%" or if :exclusive false hyprland will not crash

Crash reports, logs, images, videos

--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
Oops

Hyprland received signal 6 (Aborted)

Version: 84ab8d11e8951a6551d1e1bf87796a8589da6d47
Tag: v0.35.0

System info:
    System name: Linux
    Node name: platypus
    Release: 6.7.6-200.fc39.x86_64
    Version: #1 SMP PREEMPT_DYNAMIC Fri Feb 23 18:27:29 UTC 2024

GPU:
    2d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c1) (prog-if 00 [VGA controller])

os-release:
    NAME="Fedora Linux"
    VERSION="39 (Thirty Nine)"
    ID=fedora
    VERSION_ID=39
    VERSION_CODENAME=""
    PLATFORM_ID="platform:f39"
    PRETTY_NAME="Fedora Linux 39 (Thirty Nine)"
    ANSI_COLOR="0;38;2;60;110;180"
    LOGO=fedora-logo-icon
    CPE_NAME="cpe:/o:fedoraproject:fedora:39"
    DEFAULT_HOSTNAME="fedora"
    HOME_URL="https://fedoraproject.org/"
    DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f39/system-administrators-guide/"
    SUPPORT_URL="https://ask.fedoraproject.org/"
    BUG_REPORT_URL="https://bugzilla.redhat.com/"
    REDHAT_BUGZILLA_PRODUCT="Fedora"
    REDHAT_BUGZILLA_PRODUCT_VERSION=39
    REDHAT_SUPPORT_PRODUCT="Fedora"
    REDHAT_SUPPORT_PRODUCT_VERSION=39
    SUPPORT_END=2024-11-12

Backtrace:
    #0 | Hyprland(_Z12getBacktracev+0x69) [0x55b8d67a7d09]
        ??
        ??:0
    #1 | Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0x832) [0x55b8d676b5c2]
        ??
        ??:0
    #2 | Hyprland(_Z25handleUnrecoverableSignali+0x4d) [0x55b8d66ed39d]
        ??
        ??:0
    #3 | /lib64/libc.so.6(+0x3e9a0) [0x7f026a17b9a0]
        ??
        ??:0
    #4 | /lib64/libc.so.6(+0x90834) [0x7f026a1cd834]
        ??
        ??:0
    #5 | /lib64/libc.so.6(raise+0x1e) [0x7f026a17b8ee]
        ??
        ??:0
    #6 | /lib64/libc.so.6(abort+0xdf) [0x7f026a1638ff]
        ??
        ??:0
    #7 | /lib64/libc.so.6(+0x2681b) [0x7f026a16381b]
        ??
        ??:0
    #8 | /lib64/libc.so.6(+0x36c57) [0x7f026a173c57]
        ??
        ??:0
    #9 | Hyprland(_ZN20CHyprXWaylandManager13setWindowSizeEP7CWindow8Vector2Db+0x5b8) [0x55b8d67e54a8]
        ??
        ??:0
    #10 | Hyprland(_ZN18CHyprDwindleLayout21applyNodeDataToWindowEP16SDwindleNodeDatab+0x1048) [0x55b8d67b6c28]
        ??
        ??:0
    #11 | Hyprland(_ZN18CHyprDwindleLayout21onWindowCreatedTilingEP7CWindow10eDirection+0x103a) [0x55b8d67ba44a]
        ??
        ??:0
    #12 | Hyprland(_ZN11IHyprLayout15onWindowCreatedEP7CWindow10eDirection+0x115) [0x55b8d67bbf15]
        ??
        ??:0
    #13 | Hyprland(_ZN6Events18listener_mapWindowEPvS0_+0xd76) [0x55b8d6796996]
        ??
        ??:0
    #14 | Hyprland(_Z13handleWrappedP11wl_listenerPv+0x5b) [0x55b8d67ae60b]
        ??
        ??:0
    #15 | /lib64/libwayland-server.so.0(wl_signal_emit_mutable+0x7c) [0x7f026ace7dcc]
        ??
        ??:0
    #16 | Hyprland(+0x2611cd) [0x55b8d687d1cd]
        ??
        ??:0
    #17 | /lib64/libffi.so.8(+0x9056) [0x7f026a6d4056]
        ??
        ??:0
    #18 | /lib64/libffi.so.8(+0x55ef) [0x7f026a6d05ef]
        ??
        ??:0
    #19 | /lib64/libffi.so.8(ffi_call+0x12e) [0x7f026a6d33fe]
        ??
        ??:0
    #20 | /lib64/libwayland-server.so.0(+0x9843) [0x7f026ace6843]
        ??
        ??:0
    #21 | /lib64/libwayland-server.so.0(+0xe0b4) [0x7f026aceb0b4]
        ??
        ??:0
    #22 | /lib64/libwayland-server.so.0(wl_event_loop_dispatch+0xa2) [0x7f026ace98e2]
        ??
        ??:0
    #23 | /lib64/libwayland-server.so.0(wl_display_run+0x35) [0x7f026acea125]
        ??
        ??:0
    #24 | Hyprland(main+0x815) [0x55b8d66d5f55]
        ??
        ??:0
    #25 | /lib64/libc.so.6(+0x2814a) [0x7f026a16514a]
        ??
        ??:0
    #26 | /lib64/libc.so.6(__libc_start_main+0x8b) [0x7f026a16520b]
        ??
        ??:0
    #27 | Hyprland(_start+0x25) [0x55b8d66ea905]
        ??
        ??:0

Log tail:
[LOG] Callback 55b8d9956be0 -> 55b8d9956bd8, layerSurface removed.
[LOG] Callback 55b8d9956cb0 -> 55b8d9956ca8, layerSurface removed.
[LOG] LayerSurface 55b8d995dd30 mapped
[LOG] Registered signal for owner 55b8d9964320: 55b8d9945a20 -> 55b8d9964348 (owner: CWLSurface)
[LOG] CWLSurface 55b8d9964320 called init()
[LOG] Cleanup: destroyed a layersurface
[LOG] Keybind triggered, calling dispatcher (64, , 65363)
[LOG] No window found in direction r, looking for a monitor
[LOG] Callback 55b8d93f0a48 -> 55b8d93f0a40, CWLSurface removed.
[LOG] CWLSurface 55b8d93f09f8 called destroy()
[LOG] Registered signal for owner 55b8d93f09f8: 55b8d98b6430 -> 55b8d93f0a20 (owner: CWLSurface)
[LOG] CWLSurface 55b8d93f09f8 called init()
[LOG] Keybind triggered, calling dispatcher (64, , 49)
[LOG] Set keyboard focus to surface 55b8d9928610, with [Window 55b8d9926cd0: title: "eww.yuck - Untitled (Workspace) - VSCodium"]
[LOG] Searching for matching rules for VSCodium (title: eww.yuck - Untitled (Workspace) - VSCodium)
[LOG] Callback 55b8d93f0a48 -> 55b8d93f0a40, CWLSurface removed.
[LOG] CWLSurface 55b8d93f09f8 called destroy()
[LOG] Registered signal for owner 55b8d93f09f8: 55b8d98a6920 -> 55b8d93f0a20 (owner: CWLSurface)
[LOG] CWLSurface 55b8d93f09f8 called init()
[LOG] Callback 55b8d93f0a48 -> 55b8d93f0a40, CWLSurface removed.
[LOG] CWLSurface 55b8d93f09f8 called destroy()
[LOG] Registered signal for owner 55b8d93f09f8: 55b8d98a6920 -> 55b8d93f0a20 (owner: CWLSurface)
[LOG] CWLSurface 55b8d93f09f8 called init()
[LOG] Callback 55b8d93f0a48 -> 55b8d93f0a40, CWLSurface removed.
[LOG] CWLSurface 55b8d93f09f8 called destroy()
[LOG] Registered signal for owner 55b8d93f09f8: 55b8d98a6920 -> 55b8d93f0a20 (owner: CWLSurface)
[LOG] CWLSurface 55b8d93f09f8 called init()
[LOG] Callback 55b8d93f0a48 -> 55b8d93f0a40, CWLSurface removed.
[LOG] CWLSurface 55b8d93f09f8 called destroy()
[LOG] Registered signal for owner 55b8d93f09f8: 55b8d98a6920 -> 55b8d93f0a20 (owner: CWLSurface)
[LOG] CWLSurface 55b8d93f09f8 called init()
[LOG] Callback 55b8d93f0a48 -> 55b8d93f0a40, CWLSurface removed.
[LOG] CWLSurface 55b8d93f09f8 called destroy()
[LOG] Registered signal for owner 55b8d93f09f8: 55b8d98b6430 -> 55b8d93f0a20 (owner: CWLSurface)
[LOG] CWLSurface 55b8d93f09f8 called init()
[LOG] Keybind triggered, calling dispatcher (64, , 113)
[LOG] Executing kitty
[LOG] Process Created with pid 153245
[LOG] New TextInput added!
[LOG] Registered signal for owner 55b8d97b6460: 55b8d986f518 -> 55b8d97b6478 (owner: textInput)
[LOG] Registered signal for owner 55b8d97b6460: 55b8d986f528 -> 55b8d97b6548 (owner: textInput)
[LOG] Registered signal for owner 55b8d97b6460: 55b8d986f538 -> 55b8d97b64e0 (owner: textInput)
[LOG] Registered signal for owner 55b8d97b6460: 55b8d986f548 -> 55b8d97b65b0 (owner: textInput)
[LOG] New XDG Toplevel created. (class: null)
[LOG] Registered signal for owner 55b8d97d6c80: 55b8d9956d20 -> 55b8d97d6ce8 (owner: XDG Window)
[LOG] Registered signal for owner 55b8d97d6c80: 55b8d9958bd8 -> 55b8d97d6db8 (owner: XDG Window)
[LOG] Registered signal for owner 55b8d97d6c80: 55b8d9956d10 -> 55b8d97d6c80 (owner: XDG Window)
[types/xdg_shell/wlr_xdg_surface.c:169] A configure is scheduled for an uninitialized xdg_surface 0x55b8d9958b30
[LOG] Registered signal for owner 55b8d97d6c80: 55b8d9959150 -> 55b8d97d7298 (owner: Toplevel)
[LOG] Registered signal for owner 55b8d97d6c80: 55b8d9959160 -> 55b8d97d7300 (owner: Toplevel)
[LOG] Registered signal for owner 55b8d97d6c80: 55b8d9959170 -> 55b8d97d7230 (owner: Toplevel)
[LOG] Registered signal for owner 55b8d97d7508: 55b8d9956d50 -> 55b8d97d7530 (owner: CWLSurface)
[LOG] CWLSurface 55b8d97d7508 called init()
[LOG] Registered signal for owner 55b8d97d6c80: 55b8d9956d30 -> 55b8d97d6d50 (owner: CWindow)
[LOG] Searching for matching rules for kitty (title: bash)
[LOG] Window rule opacity 0.9 override 0.8 override -> ^(kitty) matched [Window 55b8d97d6c80: title: "bash"]
[LOG] OPENINGON: [Node 55b8d995df90: workspace: 10, pos: [0.00, 0.00], size: [0.00, 0.00], window: 55b8d97d6c80], Monitor: 1
vaxerski commented 7 months ago

very outdated version