Skip to content

layout/groupTarget: fix crash on null space assignment - #13614

Merged
vaxerski merged 2 commits into
hyprwm:mainfrom
vaxerski:fix-13571
Mar 7, 2026
Merged

layout/groupTarget: fix crash on null space assignment#13614
vaxerski merged 2 commits into
hyprwm:mainfrom
vaxerski:fix-13571

Conversation

@vaxerski

@vaxerski vaxerski commented Mar 6, 2026

Copy link
Copy Markdown
Member

this is not technically invalid

ref #13571 (reply in thread)

@tekstryder

Copy link
Copy Markdown

No go boss. Still crashing.

@vaxerski

vaxerski commented Mar 7, 2026

Copy link
Copy Markdown
Member Author

well provide a backtrace

@tekstryder

Copy link
Copy Markdown

Oh, I did in the discussion thread.

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0)
    at pthread_kill.c:44
#1  0x00007f68aa8a7af3 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#2  0x00007f68aa84d1a0 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007f68aa8345fe in __GI_abort () at abort.c:77
#4  0x0000561930f64664 in ?? ()
#5  <signal handler called>
#6  0x000056193113ebb5 in Layout::CSpace::recheckWorkArea() ()
#7  0x00005619311403a8 in Layout::CSpace::setFullscreen(Hyprutils::Memory::CSharedPointer<Layout::ITarget>, eFullscreenMode) ()
#8  0x0000561931135782 in Layout::CLayoutManager::fullscreenRequestForTarget(Hyprutils::Memory::CSharedPointer<Layout::ITarget>, eFullscreenMode, eFullscreenMode) ()
#9  0x0000561930f7c270 in CCompositor::setWindowFullscreenState(Hyprutils::Memory::CSharedPointer<Desktop::View::CWindow>, Desktop::View::SFullscreenState) ()
#10 0x0000561930f7d39d in CCompositor::changeWindowFullscreenModeClient(Hyprutils::Memory::CSharedPointer<Desktop::View::CWindow>, eFullscreenMode, bool) ()
#11 0x0000561931083fb2 in Desktop::View::CWindow::onUpdateState() ()
#12 0x00007f68ac26d45d in Hyprutils::Signal::CSignalListener::emitInternal(void*) ()
   from /usr/lib/libhyprutils.so.10
#13 0x00007f68ac26d7fb in Hyprutils::Signal::CSignalBase::emitInternal(void*) () from /usr/lib/libhyprutils.so.10
#14 0x00005619313e5528 in ?? ()
#15 0x00005619315109b2 in ?? ()
#16 0x00007f68aa748ac6 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#17 0x00007f68aa74576b in ffi_call_int (cif=cif@entry=0x7ffcb4546aa0, fn=fn@entry=0x561931510960, 
    rvalue=<optimized out>, rvalue@entry=0x0, avalue=avalue@entry=0x7ffcb4546b70, closure=closure@entry=0x0)
    at ../src/x86/ffi64.c:676
#18 0x00007f68aa74806e in ffi_call (cif=cif@entry=0x7ffcb4546aa0, fn=0x561931510960, rvalue=rvalue@entry=0x0, 
    avalue=avalue@entry=0x7ffcb4546b70) at ../src/x86/ffi64.c:713
#19 0x00007f68ac12f532 in wl_closure_invoke (closure=closure@entry=0x561948402c80, target=<optimized out>, 
    target@entry=0x561948807600, opcode=opcode@entry=11, data=<optimized out>, data@entry=0x5619487e80c0, flags=2)
    at ../wayland-1.24.0/src/connection.c:1241
#20 0x00007f68ac134d30 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, 
    data=<optimized out>) at ../wayland-1.24.0/src/wayland-server.c:483
#21 0x00007f68ac133182 in wl_event_loop_dispatch (loop=0x561945e2e190, timeout=<optimized out>, timeout@entry=-1)
    at ../wayland-1.24.0/src/event-loop.c:1059
#22 0x00007f68ac135297 in wl_display_run (display=0x561945e26700) at ../wayland-1.24.0/src/wayland-server.c:1584
#23 0x00005619311f5da4 in CEventLoopManager::enterLoop() ()
#24 0x0000561930ee230a in main ()

@vaxerski

vaxerski commented Mar 7, 2026

Copy link
Copy Markdown
Member Author

not very debug of you. Anyways it doesnt crash for me tho the behavior of swallow on groups is a bit funky because it swallows the entire group

@tekstryder

tekstryder commented Mar 7, 2026

Copy link
Copy Markdown

not very debug of you

I was lazy. Apologies.

Tekstryder provides a debug bt like a good little tester
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f5354ea7af3 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#2  0x00007f5354e4d1a0 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007f5354e345fe in __GI_abort () at abort.c:77
#4  0x0000558eb1e7179a in handleUnrecoverableSignal (sig=11) at /usr/src/debug/hyprland/Hyprland/src/Compositor.cpp:121
#5  <signal handler called>
#6  0x0000558eb2193ab7 in Hyprutils::Memory::CWeakPointer<CWorkspace>::valid (this=<optimized out>) at /usr/include/hyprutils/memory/WeakPtr.hpp:132
#7  Hyprutils::Memory::CWeakPointer<CWorkspace>::operator bool (this=<optimized out>) at /usr/include/hyprutils/memory/WeakPtr.hpp:150
#8  Layout::CSpace::recheckWorkArea (this=this@entry=0x0) at /usr/src/debug/hyprland/Hyprland/src/layout/space/Space.cpp:68
#9  0x0000558eb2195eaa in Layout::CSpace::recalculate (this=0x0) at /usr/src/debug/hyprland/Hyprland/src/layout/space/Space.cpp:140
#10 Layout::CSpace::setFullscreen (this=0x0, t=..., mode=FSMODE_FULLSCREEN) at /usr/src/debug/hyprland/Hyprland/src/layout/space/Space.cpp:152
#11 0x0000558eb2180dbf in Layout::CLayoutManager::fullscreenRequestForTarget (this=this@entry=0x558ed4a10aa0, target=..., currentEffectiveMode=currentEffectiveMode@entry=FSMODE_NONE, effectiveMode=effectiveMode@entry=FSMODE_FULLSCREEN)
   at /usr/src/debug/hyprland/Hyprland/src/layout/LayoutManager.cpp:98
#12 0x0000558eb1ea43d1 in CCompositor::setWindowFullscreenState (this=0x558ed49d5590, PWINDOW=..., state=...) at /usr/src/debug/hyprland/Hyprland/src/Compositor.cpp:2165
#13 0x0000558eb1ea588e in CCompositor::setWindowFullscreenClient (this=<optimized out>, PWINDOW=..., MODE=<optimized out>) at /usr/src/debug/hyprland/Hyprland/src/Compositor.cpp:2108
#14 0x0000558eb1ea5bd4 in CCompositor::changeWindowFullscreenModeClient (this=<optimized out>, PWINDOW=..., MODE=MODE@entry=FSMODE_FULLSCREEN, ON=<optimized out>) at /usr/src/debug/hyprland/Hyprland/src/Compositor.cpp:2093
#15 0x0000558eb20400e2 in Desktop::View::CWindow::onUpdateState (this=<optimized out>) at /usr/src/debug/hyprland/Hyprland/src/desktop/view/Window.cpp:1069
#16 0x0000558eb2040579 in operator() (__closure=<optimized out>) at /usr/src/debug/hyprland/Hyprland/src/desktop/view/Window.cpp:130
#17 std::__invoke_impl<void, Desktop::View::CWindow::CWindow(SP<CXDGSurfaceResource>)::<lambda()>&> (__f=...) at /usr/include/c++/15.2.1/bits/invoke.h:63
#18 std::__invoke_r<void, Desktop::View::CWindow::CWindow(SP<CXDGSurfaceResource>)::<lambda()>&> (__fn=...) at /usr/include/c++/15.2.1/bits/invoke.h:113
#19 std::_Function_handler<void(), Desktop::View::CWindow::CWindow(SP<CXDGSurfaceResource>)::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/15.2.1/bits/std_function.h:292
#20 0x0000558eb1eb3d81 in std::function<void()>::operator() (this=<optimized out>) at /usr/include/c++/15.2.1/bits/std_function.h:593
#21 Hyprutils::Signal::CSignalT<>::mkHandler(std::function<void ()>)::{lambda(void*)#1}::operator()(void*) const (__closure=<optimized out>, args=<optimized out>) at /usr/include/hyprutils/signal/Signal.hpp:95
#22 std::__invoke_impl<void, Hyprutils::Signal::CSignalT<>::mkHandler(std::function<void ()>)::{lambda(void*)#1}&, void*>(std::__invoke_other, Hyprutils::Signal::CSignalT<>::mkHandler(std::function<void ()>)::{lambda(void*)#1}&, void*&&) (__f=...)
   at /usr/include/c++/15.2.1/bits/invoke.h:63
#23 std::__invoke_r<void, Hyprutils::Signal::CSignalT<>::mkHandler(std::function<void ()>)::{lambda(void*)#1}&, void*>(Hyprutils::Signal::CSignalT<>::mkHandler(std::function<void ()>)::{lambda(void*)#1}&, void*&&) (__fn=...) at /usr/include/c++/15.2.1/bits/invoke.h:113
#24 std::_Function_handler<void (void*), Hyprutils::Signal::CSignalT<>::mkHandler(std::function<void ()>)::{lambda(void*)#1}>::_M_invoke(std::_Any_data const&, void*&&) (__functor=..., __args#0=<optimized out>) at /usr/include/c++/15.2.1/bits/std_function.h:292
#25 0x00007f535681045d in Hyprutils::Signal::CSignalListener::emitInternal(void*) () from /usr/lib/libhyprutils.so.10
#26 0x00007f53568107fb in Hyprutils::Signal::CSignalBase::emitInternal(void*) () from /usr/lib/libhyprutils.so.10
#27 0x0000558eb2605051 in Hyprutils::Signal::CSignalT<>::emit() (this=<optimized out>) at /usr/include/hyprutils/signal/Signal.hpp:34
#28 operator() (r=<optimized out>, __closure=0x558ed4cc81d0, output=<optimized out>) at /usr/src/debug/hyprland/Hyprland/src/protocols/XDGShell.cpp:205
#29 std::__invoke_impl<void, CXDGToplevelResource::CXDGToplevelResource(SP<CXdgToplevel>, SP<CXDGSurfaceResource>)::<lambda(CXdgToplevel*, wl_resource*)>&, CXdgToplevel*, wl_resource*> (__f=...) at /usr/include/c++/15.2.1/bits/invoke.h:63
#30 std::__invoke_r<void, CXDGToplevelResource::CXDGToplevelResource(SP<CXdgToplevel>, SP<CXDGSurfaceResource>)::<lambda(CXdgToplevel*, wl_resource*)>&, CXdgToplevel*, wl_resource*> (__fn=...) at /usr/include/c++/15.2.1/bits/invoke.h:113
#31 std::_Function_handler<void(CXdgToplevel*, wl_resource*), CXDGToplevelResource::CXDGToplevelResource(SP<CXdgToplevel>, SP<CXDGSurfaceResource>)::<lambda(CXdgToplevel*, wl_resource*)> >::_M_invoke(const std::_Any_data &, CXdgToplevel *&&, wl_resource *&&) (__functor=..., 
   __args#0=<optimized out>, __args#1=<optimized out>) at /usr/include/c++/15.2.1/bits/std_function.h:292
#32 0x0000558eb27ebac4 in std::function<void(CXdgToplevel*, wl_resource*)>::operator() (this=<optimized out>, __args#0=<optimized out>, __args#1=<optimized out>) at /usr/include/c++/15.2.1/bits/std_function.h:593
#33 _CXdgToplevelSetFullscreen (client=<optimized out>, resource=<optimized out>, output=0x0) at /usr/src/debug/hyprland/Hyprland/protocols/xdg-shell.cpp:626
#34 0x00007f53552a6ac6 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#35 0x00007f53552a376b in ffi_call_int (cif=cif@entry=0x7ffed49d0e40, fn=fn@entry=0x558eb27eba60 <_CXdgToplevelSetFullscreen(wl_client*, wl_resource*, wl_resource*)>, rvalue=<optimized out>, rvalue@entry=0x0, avalue=avalue@entry=0x7ffed49d0f10, closure=closure@entry=0x0)
   at ../src/x86/ffi64.c:676
#36 0x00007f53552a606e in ffi_call (cif=cif@entry=0x7ffed49d0e40, fn=0x558eb27eba60 <_CXdgToplevelSetFullscreen(wl_client*, wl_resource*, wl_resource*)>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7ffed49d0f10) at ../src/x86/ffi64.c:713
#37 0x00007f53566d2532 in wl_closure_invoke (closure=closure@entry=0x558ed72b4c10, target=<optimized out>, target@entry=0x558ed72b2de0, opcode=opcode@entry=11, data=<optimized out>, data@entry=0x558ed85d02f0, flags=2) at ../wayland-1.24.0/src/connection.c:1241
#38 0x00007f53566d7d30 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=<optimized out>) at ../wayland-1.24.0/src/wayland-server.c:483
#39 0x00007f53566d6182 in wl_event_loop_dispatch (loop=0x558ed495a190, timeout=<optimized out>, timeout@entry=-1) at ../wayland-1.24.0/src/event-loop.c:1059
#40 0x00007f53566d8297 in wl_display_run (display=0x558ed4952700) at ../wayland-1.24.0/src/wayland-server.c:1584
#41 0x0000558eb22c6097 in CEventLoopManager::enterLoop (this=0x558ed4961410) at /usr/src/debug/hyprland/Hyprland/src/managers/eventLoop/EventLoopManager.cpp:124
#42 0x0000558eb1e98958 in CCompositor::startCompositor (this=0x558ed49d5590) at /usr/src/debug/hyprland/Hyprland/src/Compositor.cpp:802
#43 0x0000558eb1dd35b0 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/hyprland/Hyprland/src/main.cpp:238

STR:

  1. create window group with 2 windows, one of them a terminal
  2. ensure swallowing enabled for that terminal
  3. launch mpv, opening a video, from terminal
  4. fullscreen mpv
  5. crash

@tekstryder

Copy link
Copy Markdown

Oh ffs i didn't patch the debug build. Too much Pilsner last night.

@vaxerski

vaxerski commented Mar 7, 2026

Copy link
Copy Markdown
Member Author

bro that crash is fixed wdym

@tekstryder

Copy link
Copy Markdown

Edited #13614 (comment) with proper debug backtrace of crash with patch.

Also fixed STR, fullscreening is required.

Sorry for noise/confusion.

@vaxerski

vaxerski commented Mar 7, 2026

Copy link
Copy Markdown
Member Author

now?

@tekstryder

Copy link
Copy Markdown

Yessir, all good now.

@vaxerski

vaxerski commented Mar 7, 2026

Copy link
Copy Markdown
Member Author

gratias pro probatione. ut fieri solet, desunt verificationes nullitatis...

@vaxerski
vaxerski merged commit 3b09986 into hyprwm:main Mar 7, 2026
10 checks passed
@tekstryder

Copy link
Copy Markdown

FTR no crash, but not actually swallowing when grouped.

behavior of swallow on groups is a bit funky because it swallows the entire group

Totally possible it's always been that way and I never noticed.

Currently, with this fix, when grouped, a new grouped window is created for the mpv instance.

Debeo abstinere a potando et a probando!

@vaxerski

vaxerski commented Mar 7, 2026

Copy link
Copy Markdown
Member Author

make a new discussion for that

vaxerski added a commit that referenced this pull request Mar 10, 2026
vaxerski added a commit that referenced this pull request Mar 10, 2026
crthpl pushed a commit to crthpl/Hyprland that referenced this pull request Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants