hyprlock
hyprlock copied to clipboard
Crash when compositor doesn't support wp-fractional-scale-v1
When running under swayfx 0.3.2 (or sway 1.8 probably) hyprlock crashes on startup. It doesn't check if getFractionalMgr
returns null here, then segfaults in wayland code.
Thread 1 "hyprlock" received signal SIGSEGV, Segmentation fault.
wl_proxy_get_version (proxy=0x0) at ../wayland-1.22.0/src/wayland-client.c:2248
2248 return proxy->version;
(gdb) bt
#0 wl_proxy_get_version (proxy=0x0) at ../wayland-1.22.0/src/wayland-client.c:2248
#1 0x000055555557a677 in wp_fractional_scale_manager_v1_get_fractional_scale
(surface=0x5555557f14a0, wp_fractional_scale_manager_v1=0x0)
at /usr/src/debug/hyprlock/hyprlock-0.3.0/protocols/fractional-scale-v1-protocol.h:178
#2 CSessionLockSurface::CSessionLockSurface
(this=this@entry=0x5555557a9d50, output=output@entry=0x555555689cb0, this=<optimized out>, output=<optimized out>)
at /usr/src/debug/hyprlock/hyprlock-0.3.0/src/core/LockSurface.cpp:46
#3 0x00005555555834b3 in std::make_unique<CSessionLockSurface, COutput* const&> ()
at /usr/include/c++/13.2.1/bits/unique_ptr.h:1069
#4 CHyprlock::onLockLocked (this=0x5555555e0ff0) at /usr/src/debug/hyprlock/hyprlock-0.3.0/src/core/hyprlock.cpp:876
#5 handleLocked (data=<optimized out>, ext_session_lock_v1=<optimized out>)
at /usr/src/debug/hyprlock/hyprlock-0.3.0/src/core/hyprlock.cpp:720
#6 0x00007ffff7aad596 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#7 0x00007ffff7aaa00e in ffi_call_int
(cif=cif@entry=0x7fffffffd620, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#8 0x00007ffff7aacbd3 in ffi_call
(cif=cif@entry=0x7fffffffd620, fn=<optimized out>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fffffffd6f0)
at ../src/x86/ffi64.c:710
#9 0x00007ffff7f3a645 in wl_closure_invoke (closure=closure@entry=0x5555557f6930, target=<optimized out>,
target@entry=0x555555765710, opcode=opcode@entry=0, data=<optimized out>, flags=1)
at ../wayland-1.22.0/src/connection.c:1025
#10 0x00007ffff7f3ae73 in dispatch_event (display=display@entry=0x5555555e12b0, queue=0x5555555e13a0)
at ../wayland-1.22.0/src/wayland-client.c:1631
#11 0x00007ffff7f3b13c in dispatch_queue (queue=0x5555555e13a0, display=0x5555555e12b0)
at ../wayland-1.22.0/src/wayland-client.c:1777
#12 wl_display_dispatch_queue_pending (display=0x5555555e12b0, queue=0x5555555e13a0)
at ../wayland-1.22.0/src/wayland-client.c:2019
#13 0x000055555557e79e in CHyprlock::run (this=0x5555555e0ff0)
at /usr/src/debug/hyprlock/hyprlock-0.3.0/src/core/hyprlock.cpp:473
#14 0x0000555555564fb7 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>)
at /usr/include/c++/13.2.1/bits/unique_ptr.h:199