Random screen freeze and crash
Description: Doing general things, does not seem to be a pattern. I could be on a teams call and the screens will freeze, black out 5 seconds later, come back but I will have static images and no input. Other times I could be watching youtube, working in vim, playing Horizon Zero Dawn Remastered (that hurt a little).
Steps to reproduce the behavior: No real steps here, it can happen in 1 hour, 48 hours, or 2 to 3 times in one day recently.
Expected behavior Back to being more stable, not sure which version this started or if potentially related to new hardware.
Debug:
=================================================================
==7658==ERROR: AddressSanitizer: heap-use-after-free on address 0x5160002bbc80 at pc 0x6480b65e8250 bp 0x7ffc037d2050 sp 0x7ffc037d2040
READ of size 8 at 0x5160002bbc80 thread T0
#0 0x6480b65e824f in wf::scene::output_node_t::get_bounding_box() ../src/core/scene.cpp:450
#1 0x6480b6909b82 in wf::wlr_surface_controller_t::update_subsurface_order_and_position() ../src/view/wlr-surface-controller.cpp:103
#2 0x6480b6907927 in operator() ../src/view/wlr-surface-controller.cpp:76
#3 0x6480b690e822 in __invoke_impl&, void*> /usr/include/c++/14.2.1/bits/invoke.h:61
#4 0x6480b690da6e in __invoke_r&, void*> /usr/include/c++/14.2.1/bits/invoke.h:111
#5 0x6480b690cb30 in _M_invoke /usr/include/c++/14.2.1/bits/std_function.h:290
#6 0x6480b642f0fe in std::function::operator()(void*) const /usr/include/c++/14.2.1/bits/std_function.h:591
#7 0x6480b642c665 in wf::wl_listener_wrapper::emit(void*) ../src/wl-listener-wrapper.tpp:57
#8 0x6480b642c04c in handle_wrapped_listener ../src/wl-listener-wrapper.tpp:10
#9 0x7045da64b47d in wl_signal_emit_mutable (/usr/lib/libwayland-server.so.0+0x847d) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#10 0x7045da5a6ddc (/usr/lib/libwlroots-0.18.so+0x7addc) (BuildId: 9e1c9d32b1b2fc75aeb9d8b173616b7db259c0aa)
#11 0x7045d9a9b595 (/usr/lib/libffi.so.8+0x7595) (BuildId: eecfa567f01d70c2ca4b60a1f7931e5634e41eea)
#12 0x7045d9a9800d (/usr/lib/libffi.so.8+0x400d) (BuildId: eecfa567f01d70c2ca4b60a1f7931e5634e41eea)
#13 0x7045d9a9abd2 in ffi_call (/usr/lib/libffi.so.8+0x6bd2) (BuildId: eecfa567f01d70c2ca4b60a1f7931e5634e41eea)
#14 0x7045da649e84 (/usr/lib/libwayland-server.so.0+0x6e84) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#15 0x7045da64ed21 (/usr/lib/libwayland-server.so.0+0xbd21) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#16 0x7045da64d111 in wl_event_loop_dispatch (/usr/lib/libwayland-server.so.0+0xa111) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#17 0x7045da64f1f6 in wl_display_run (/usr/lib/libwayland-server.so.0+0xc1f6) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#18 0x6480b63feb6f in main ../src/main.cpp:461
#19 0x7045d8e34e07 (/usr/lib/libc.so.6+0x25e07) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3)
#20 0x7045d8e34ecb in __libc_start_main (/usr/lib/libc.so.6+0x25ecb) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3)
#21 0x6480b63f2964 in _start (/usr/local/bin/wayfire+0x1ec6964) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
0x5160002bbc80 is located 0 bytes inside of 608-byte region [0x5160002bbc80,0x5160002bbee0)
freed by thread T0 here:
#0 0x7045d9eff652 in operator delete(void*, unsigned long) /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_new_delete.cpp:164
#1 0x6480b6bf500a in wf::output_impl_t::~output_impl_t() ../src/output/output.cpp:159
#2 0x6480b64c337f in std::default_delete::operator()(wf::output_impl_t*) const (/usr/local/bin/wayfire+0x1f9737f) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#3 0x6480b64c9b1c in std::__uniq_ptr_impl >::reset(wf::output_impl_t*) (/usr/local/bin/wayfire+0x1f9db1c) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#4 0x6480b64cae32 in std::unique_ptr >::reset(wf::output_impl_t*) (/usr/local/bin/wayfire+0x1f9ee32) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#5 0x6480b64ae5ce in std::unique_ptr >::operator=(decltype(nullptr)) (/usr/local/bin/wayfire+0x1f825ce) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#6 0x6480b64837a7 in wf::output_layout_output_t::destroy_wayfire_output() ../src/core/output-layout.cpp:626
#7 0x6480b648cb7d in wf::output_layout_output_t::apply_state(wf::output_state_t const&) ../src/core/output-layout.cpp:959
#8 0x6480b649cd68 in wf::output_layout_t::impl::apply_configuration(std::map, std::allocator > > const&) (/usr/local/bin/wayfire+0x1f70d68) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#9 0x6480b6496b0a in wf::output_layout_t::impl::remove_output(wlr_output*) (/usr/local/bin/wayfire+0x1f6ab0a) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#10 0x6480b64950b9 in wf::output_layout_t::impl::add_output(wlr_output*)::{lambda(void*)#1}::operator()(void*) const (/usr/local/bin/wayfire+0x1f690b9) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#11 0x6480b650339c in void std::__invoke_impl(std::__invoke_other, wf::output_layout_t::impl::add_output(wlr_output*)::{lambda(void*)#1}&, void*&&) (/usr/local/bin/wayfire+0x1fd739c) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#12 0x6480b64ea74b in std::enable_if, void>::type std::__invoke_r(wf::output_layout_t::impl::add_output(wlr_output*)::{lambda(void*)#1}&, void*&&) (/usr/local/bin/wayfire+0x1fbe74b) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#13 0x6480b64d23a0 in std::_Function_handler::_M_invoke(std::_Any_data const&, void*&&) (/usr/local/bin/wayfire+0x1fa63a0) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#14 0x6480b642f0fe in std::function::operator()(void*) const /usr/include/c++/14.2.1/bits/std_function.h:591
#15 0x6480b642c665 in wf::wl_listener_wrapper::emit(void*) ../src/wl-listener-wrapper.tpp:57
#16 0x6480b642c04c in handle_wrapped_listener ../src/wl-listener-wrapper.tpp:10
#17 0x7045da64b47d in wl_signal_emit_mutable (/usr/lib/libwayland-server.so.0+0x847d) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#18 0x7045da58af74 in wlr_output_destroy (/usr/lib/libwlroots-0.18.so+0x5ef74) (BuildId: 9e1c9d32b1b2fc75aeb9d8b173616b7db259c0aa)
#19 0x7045da57460f (/usr/lib/libwlroots-0.18.so+0x4860f) (BuildId: 9e1c9d32b1b2fc75aeb9d8b173616b7db259c0aa)
#20 0x7045da64b47d in wl_signal_emit_mutable (/usr/lib/libwayland-server.so.0+0x847d) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#21 0x7045da569c58 (/usr/lib/libwlroots-0.18.so+0x3dc58) (BuildId: 9e1c9d32b1b2fc75aeb9d8b173616b7db259c0aa)
#22 0x7045da64d111 in wl_event_loop_dispatch (/usr/lib/libwayland-server.so.0+0xa111) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#23 0x7045da64f1f6 in wl_display_run (/usr/lib/libwayland-server.so.0+0xc1f6) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#24 0x6480b63feb6f in main ../src/main.cpp:461
#25 0x7045d8e34e07 (/usr/lib/libc.so.6+0x25e07) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3)
#26 0x7045d8e34ecb in __libc_start_main (/usr/lib/libc.so.6+0x25ecb) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3)
#27 0x6480b63f2964 in _start (/usr/local/bin/wayfire+0x1ec6964) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
previously allocated by thread T0 here:
#0 0x7045d9efe4f2 in operator new(unsigned long) /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_new_delete.cpp:95
#1 0x6480b64acea0 in std::__detail::_MakeUniq::__single_object std::make_unique(wlr_output*&, wf::dimensions_t const&) (/usr/local/bin/wayfire+0x1f80ea0) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#2 0x6480b64820bb in wf::output_layout_output_t::ensure_wayfire_output(wf::dimensions_t const&) ../src/core/output-layout.cpp:573
#3 0x6480b648d5a4 in wf::output_layout_output_t::apply_state(wf::output_state_t const&) ../src/core/output-layout.cpp:982
#4 0x6480b649d7ad in wf::output_layout_t::impl::apply_configuration(std::map, std::allocator > > const&) (/usr/local/bin/wayfire+0x1f717ad) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#5 0x6480b649853c in wf::output_layout_t::impl::reconfigure_from_config() (/usr/local/bin/wayfire+0x1f6c53c) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#6 0x6480b6496404 in wf::output_layout_t::impl::add_output(wlr_output*) (/usr/local/bin/wayfire+0x1f6a404) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#7 0x6480b648e142 in wf::output_layout_t::impl::impl(wlr_backend*)::{lambda(void*)#1}::operator()(void*) const (/usr/local/bin/wayfire+0x1f62142) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#8 0x6480b6500d0a in void std::__invoke_impl(std::__invoke_other, wf::output_layout_t::impl::impl(wlr_backend*)::{lambda(void*)#1}&, void*&&) (/usr/local/bin/wayfire+0x1fd4d0a) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#9 0x6480b64e6df3 in std::enable_if, void>::type std::__invoke_r(wf::output_layout_t::impl::impl(wlr_backend*)::{lambda(void*)#1}&, void*&&) (/usr/local/bin/wayfire+0x1fbadf3) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#10 0x6480b64cf945 in std::_Function_handler::_M_invoke(std::_Any_data const&, void*&&) (/usr/local/bin/wayfire+0x1fa3945) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
#11 0x6480b642f0fe in std::function::operator()(void*) const /usr/include/c++/14.2.1/bits/std_function.h:591
#12 0x6480b642c665 in wf::wl_listener_wrapper::emit(void*) ../src/wl-listener-wrapper.tpp:57
#13 0x6480b642c04c in handle_wrapped_listener ../src/wl-listener-wrapper.tpp:10
#14 0x7045da64b47d in wl_signal_emit_mutable (/usr/lib/libwayland-server.so.0+0x847d) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#15 0x7045da64b47d in wl_signal_emit_mutable (/usr/lib/libwayland-server.so.0+0x847d) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#16 0x7045da574794 (/usr/lib/libwlroots-0.18.so+0x48794) (BuildId: 9e1c9d32b1b2fc75aeb9d8b173616b7db259c0aa)
#17 0x7045da64b47d in wl_signal_emit_mutable (/usr/lib/libwayland-server.so.0+0x847d) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#18 0x7045da569c58 (/usr/lib/libwlroots-0.18.so+0x3dc58) (BuildId: 9e1c9d32b1b2fc75aeb9d8b173616b7db259c0aa)
#19 0x7045da64d111 in wl_event_loop_dispatch (/usr/lib/libwayland-server.so.0+0xa111) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#20 0x7045da64f1f6 in wl_display_run (/usr/lib/libwayland-server.so.0+0xc1f6) (BuildId: 2e487f08f7f64aa6e49c21f76a244c230d6c141f)
#21 0x6480b63feb6f in main ../src/main.cpp:461
#22 0x7045d8e34e07 (/usr/lib/libc.so.6+0x25e07) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3)
#23 0x7045d8e34ecb in __libc_start_main (/usr/lib/libc.so.6+0x25ecb) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3)
#24 0x6480b63f2964 in _start (/usr/local/bin/wayfire+0x1ec6964) (BuildId: 1f8fc9b2c3bb883f0f5edf35c022c0616444c696)
SUMMARY: AddressSanitizer: heap-use-after-free ../src/core/scene.cpp:450 in wf::scene::output_node_t::get_bounding_box()
Shadow bytes around the buggy address:
0x5160002bba00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x5160002bba80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x5160002bbb00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x5160002bbb80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x5160002bbc00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x5160002bbc80:[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x5160002bbd00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x5160002bbd80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x5160002bbe00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x5160002bbe80: fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa fa
0x5160002bbf00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==7658==ABORTING
wayfire --version 0.10.0-3c0da507 (Jan 1 2025) branch master wlroots-0.18.2
https://0x0.st/8zxa.txt Full log between that error and the next one this afternoon. Wavebox, Floorp, Ghostty, CudaText, and Zen Browser were running at the time.
[2025-01-02T14:21:53-0500] [ALPM] upgraded waypipe-git (0.10.0.rc1.r21.g097eafe-1 -> 0.10.0.rc1.r24.g4a5104c-1) [2025-01-02T16:17:21-0500] [ALPM] upgraded waypipe-git (0.10.0.rc1.r24.g4a5104c-1 -> 0.10.0.rc1.r27.gbc73058-1) [2025-01-03T05:51:16-0500] [ALPM] upgraded wayfire-plugins-extra-git (r278.8f7fe23-1 -> r281.cb92f9e-1) [2025-01-04T08:08:17-0500] [ALPM] upgraded waypipe-git (0.10.0.rc1.r27.gbc73058-1 -> 0.10.0.rc1.r30.g130b215-1) [2025-01-04T16:56:20-0500] [ALPM] upgraded waypipe-git (0.10.0.rc1.r30.g130b215-1 -> 0.10.0.rc1.r31.gc428b1a-1)
I don't know if it related to any of these updates but no forced exit since 2025/01/05.
0.10.0-cf9afeda (Jan 5 2025) branch master wlroots-0.18.2