WayfireWM / wayfire

A modular and extensible wayland compositor
https://wayfire.org/
MIT License
2.38k stars 178 forks source link

VSwitch plugin sometimes causes segfault #1150

Closed JordanL2 closed 7 months ago

JordanL2 commented 3 years ago

Occurs in current git master, and in 0.7.0 stable. Arch linux.

Sometimes, when I try moving to a different workspace (usually going down) Wayfire crashes. All that I see in the logs is:

EE 18-04-21 16:43:24.357 - [src/main.cpp:141] Fatal error: Segmentation fault
EE 18-04-21 16:43:24.401 - #1  signal_handler(int) ../src/main.cpp:143
EE 18-04-21 16:43:24.416 - #2  __restore_rt sigaction.c:?
EE 18-04-21 16:43:24.416 - #3  [0x5567d3ad7588]
(EE) failed to read Wayland events: Broken pipe

I'm (now) currently running Wayfire built with full debugging support and haven't managed to reproduce it yet, hopefully it's not a bug that only occurs when debugging isn't enabled...

JordanL2 commented 3 years ago

I've managed to figure out a sequence of steps that reproduces it every time, and I've captured the log with full debugging enabled.

Steps are:

  1. Update the wayfire.ini config, causing wayfire to reload config - screen turns black for a second when this happens
  2. Use vswitcher to move to a different workspace

This causes the crash every time. If I move a window to another monitor after the config reloads, this stops it crashing somehow.

Sep 11 18:14:18 wayfire[212229]: =================================================================
Sep 11 18:14:18 wayfire[212229]: ==212229==ERROR: AddressSanitizer: heap-use-after-free on address 0x603000426650 at pc 0x564dd4cd759d bp 0x7fffe6761730 sp 0x7fffe6761720
Sep 11 18:14:18 wayfire[212229]: READ of size 8 at 0x603000426650 thread T0
Sep 11 18:14:19 wayfire[212229]:     #0 0x564dd4cd759c in std::_Function_base::_M_empty() const /usr/include/c++/11.1.0/bits/std_function.h:248
Sep 11 18:14:19 wayfire[212229]:     #1 0x564dd4ef75ef in std::function<bool (wf::activator_data_t const&)>::operator()(wf::activator_data_t const&) const /usr/include/c++/11.1.0/bits/std_function.h:558
Sep 11 18:14:19 wayfire[212229]:     #2 0x564dd4eda11f in operator() ../src/core/seat/bindings-repository.cpp:43
Sep 11 18:14:19 wayfire[212229]:     #3 0x564dd4ef4c9c in __invoke_impl<bool, wf::bindings_repository_t::handle_key(const wf::keybinding_t&, uint32_t)::<lambda()>&> /usr/include/c++/11.1.0/bits/invoke.h:61
Sep 11 18:14:19 wayfire[212229]:     #4 0x564dd4ef3acd in __invoke_r<bool, wf::bindings_repository_t::handle_key(const wf::keybinding_t&, uint32_t)::<lambda()>&> /usr/include/c++/11.1.0/bits/invoke.h:114
Sep 11 18:14:19 wayfire[212229]:     #5 0x564dd4ef29df in _M_invoke /usr/include/c++/11.1.0/bits/std_function.h:291
Sep 11 18:14:19 wayfire[212229]:     #6 0x564dd4cd8ea6 in std::function<bool ()>::operator()() const /usr/include/c++/11.1.0/bits/std_function.h:560
Sep 11 18:14:19 wayfire[212229]:     #7 0x564dd4edafcf in wf::bindings_repository_t::handle_key(wf::keybinding_t const&, unsigned int) ../src/core/seat/bindings-repository.cpp:51
Sep 11 18:14:19 wayfire[212229]:     #8 0x564dd4f2582e in wf::keyboard_t::handle_keyboard_key(unsigned int, unsigned int) ../src/core/seat/keyboard.cpp:302
Sep 11 18:14:19 wayfire[212229]:     #9 0x564dd4f1ca06 in operator() ../src/core/seat/keyboard.cpp:32
Sep 11 18:14:19 wayfire[212229]:     #10 0x564dd4f2d2fa in __invoke_impl<void, wf::keyboard_t::setup_listeners()::<lambda(void*)>&, void*> /usr/include/c++/11.1.0/bits/invoke.h:61
Sep 11 18:14:19 wayfire[212229]:     #11 0x564dd4f2ac08 in __invoke_r<void, wf::keyboard_t::setup_listeners()::<lambda(void*)>&, void*> /usr/include/c++/11.1.0/bits/invoke.h:111
Sep 11 18:14:19 wayfire[212229]:     #12 0x564dd4f28fc0 in _M_invoke /usr/include/c++/11.1.0/bits/std_function.h:291
Sep 11 18:14:19 wayfire[212229]:     #13 0x564dd4cd83c6 in std::function<void (void*)>::operator()(void*) const /usr/include/c++/11.1.0/bits/std_function.h:560
Sep 11 18:14:19 wayfire[212229]:     #14 0x564dd4cd5c8d in wf::wl_listener_wrapper::emit(void*) ../src/util.cpp:526
Sep 11 18:14:19 wayfire[212229]:     #15 0x564dd4cd4de2 in handle_wrapped_listener ../src/util.cpp:448
Sep 11 18:14:19 wayfire[212229]:     #16 0x7f667687616f in wlr_signal_emit_safe ../util/signal.c:29
Sep 11 18:14:19 wayfire[212229]:     #17 0x7f6676851196 in wlr_keyboard_notify_key ../types/wlr_keyboard.c:96
Sep 11 18:14:19 wayfire[212229]:     #18 0x7f667681f79e in handle_keyboard_key ../backend/libinput/keyboard.c:82
Sep 11 18:14:19 wayfire[212229]:     #19 0x7f667681f312 in handle_libinput_event ../backend/libinput/events.c:248
Sep 11 18:14:19 wayfire[212229]:     #20 0x7f667681e074 in handle_libinput_readable ../backend/libinput/backend.c:58
Sep 11 18:14:19 wayfire[212229]:     #21 0x7f66768d1079 in wl_event_loop_dispatch (/usr/lib/libwayland-server.so.0+0xb079)
Sep 11 18:14:19 wayfire[212229]:     #22 0x7f663eb82109 in wf::glib_main_loop_t::handle_wayland_fd_in(GIOCondition) ../src/glib-main-loop.cpp:64
Sep 11 18:14:19 wayfire[212229]:     #23 0x7f663eb81643 in on_wayland_fd_event ../src/glib-main-loop.cpp:125
Sep 11 18:14:19 wayfire[212229]:     #24 0x7f6674f5a014 in g_main_context_dispatch (/usr/lib/libglib-2.0.so.0+0x54014)
Sep 11 18:14:19 wayfire[212229]:     #25 0x7f6674fadba8  (/usr/lib/libglib-2.0.so.0+0xa7ba8)
Sep 11 18:14:19 wayfire[212229]:     #26 0x7f6674f59692 in g_main_loop_run (/usr/lib/libglib-2.0.so.0+0x53692)
Sep 11 18:14:19 wayfire[212229]:     #27 0x7f663eb81a92 in auto wf::glib_main_loop_t::glib_loop_run::{lambda(auto:1)#1}::operator()<wf::signal_data_t*>(wf::glib_main_loop_t::glib_loop_run) const ../src/glib-main-loop.cpp:75
Sep 11 18:14:19 wayfire[212229]:     #28 0x7f663eb84e55 in wf::glib_main_loop_t::glib_loop_run std::__invoke_impl<void, wf::glib_main_loop_t::glib_loop_run::{lambda(auto:1)#1}&, wf::signal_data_t*>(std::__invoke_other, wf::glib_main_loop_t::glib_loop_run::{lambda(auto:1)#1}&, wf::signal_data_t*&&) /usr/include/c++/11.1.0/bits/invoke.h:61
Sep 11 18:14:19 wayfire[212229]:     #29 0x7f663eb848d7 in std::enable_if<is_invocable_r_v<wf::glib_main_loop_t::glib_loop_run, wf::glib_main_loop_t::glib_loop_run::{lambda(auto:1)#1}&, wf::signal_data_t*>, wf::glib_main_loop_t::glib_loop_run>::type std::__invoke_r<void, wf::glib_main_loop_t::glib_loop_run::{lambda(auto:1)#1}&, wf::signal_data_t*>(std::enable_if&&, (wf::glib_main_loop_t::glib_loop_run::{lambda(auto:1)#1}&)...) /usr/include/c++/11.1.0/bits/invoke.h:111
Sep 11 18:14:19 wayfire[212229]:     #30 0x7f663eb83e6a in std::_Function_handler<void (wf::signal_data_t*), wf::glib_main_loop_t::glib_loop_run::{lambda(auto:1)#1}>::_M_invoke(std::_Any_data const&, wf::signal_data_t*&&) /usr/include/c++/11.1.0/bits/std_function.h:291
Sep 11 18:14:19 wayfire[212229]:     #31 0x564dd4d86052 in std::function<void (wf::signal_data_t*)>::operator()(wf::signal_data_t*) const /usr/include/c++/11.1.0/bits/std_function.h:560
Sep 11 18:14:19 wayfire[212229]:     #32 0x564dd4d7c421 in wf::signal_connection_t::emit(wf::signal_data_t*) ../src/core/object.cpp:47
Sep 11 18:14:19 wayfire[212229]:     #33 0x564dd4d7e05a in operator()<wf::signal_connection_t*> ../src/core/object.cpp:130
Sep 11 18:14:19 wayfire[212229]:     #34 0x564dd4d8338a in __invoke_impl<void, wf::signal_provider_t::emit_signal(std::string, wf::signal_data_t*)::<lambda(auto:2)>&, wf::signal_connection_t*&> /usr/include/c++/11.1.0/bits/invoke.h:61
Sep 11 18:14:19 wayfire[212229]:     #35 0x564dd4d8252c in __invoke_r<void, wf::signal_provider_t::emit_signal(std::string, wf::signal_data_t*)::<lambda(auto:2)>&, wf::signal_connection_t*&> /usr/include/c++/11.1.0/bits/invoke.h:111
Sep 11 18:14:19 wayfire[212229]:     #36 0x564dd4d8164a in _M_invoke /usr/include/c++/11.1.0/bits/std_function.h:291
Sep 11 18:14:19 wayfire[212229]:     #37 0x564dd4d8e81e in std::function<void (wf::signal_connection_t*&)>::operator()(wf::signal_connection_t*&) const /usr/include/c++/11.1.0/bits/std_function.h:560
Sep 11 18:14:19 wayfire[212229]:     #38 0x564dd4d87f37 in wf::safe_list_t<wf::signal_connection_t*>::for_each(std::function<void (wf::signal_connection_t*&)>) const ../src/api/wayfire/nonstd/safe-list.hpp:203
Sep 11 18:14:19 wayfire[212229]:     #39 0x564dd4d7e2f1 in wf::signal_provider_t::emit_signal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, wf::signal_data_t*) ../src/core/object.cpp:128
Sep 11 18:14:19 wayfire[212229]:     #40 0x564dd4e023df in wf::compositor_core_impl_t::post_init() ../src/core/core.cpp:357
Sep 11 18:14:19 wayfire[212229]:     #41 0x564dd4cc3085 in main ../src/main.cpp:294
Sep 11 18:14:19 wayfire[212229]:     #42 0x7f6675566b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
Sep 11 18:14:19 wayfire[212229]:     #43 0x564dd4cb7b2d in _start (/usr/bin/wayfire+0xd97b2d)
Sep 11 18:14:19 wayfire[212229]: 0x603000426650 is located 16 bytes inside of 32-byte region [0x603000426640,0x603000426660)
Sep 11 18:14:19 wayfire[212229]: freed by thread T0 here:
Sep 11 18:14:19 wayfire[212229]:     #0 0x7f6676e20d69 in operator delete(void*, unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:172
Sep 11 18:14:19 wayfire[212229]:     #1 0x7f663dbfa895 in std::default_delete<std::function<bool (wf::activator_data_t const&)> >::operator()(std::function<bool (wf::activator_data_t const&)>*) const (/usr/lib/wayfire/libscale.so+0x372895)
Sep 11 18:14:19 wayfire[212229]:     #2 0x7f663dbd93be in std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > >::~unique_ptr() (/usr/lib/wayfire/libscale.so+0x3513be)
Sep 11 18:14:19 wayfire[212229]:     #3 0x7f663dc4880c in void std::_Destroy<std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > > >(std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > >*) (/usr/lib/wayfire/libscale.so+0x3c080c)
Sep 11 18:14:19 wayfire[212229]:     #4 0x7f663dc3233c in void std::_Destroy_aux<false>::__destroy<std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > >*>(std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > >*, std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > >*) (/usr/lib/wayfire/libscale.so+0x3aa33c)
Sep 11 18:14:19 wayfire[212229]:     #5 0x7f663dc17d88 in void std::_Destroy<std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > >*>(std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > >*, std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > >*) (/usr/lib/wayfire/libscale.so+0x38fd88)
Sep 11 18:14:19 wayfire[212229]:     #6 0x7f663dbf8699 in void std::_Destroy<std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > >*, std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > > >(std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > >*, std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > >*, std::allocator<std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > > >&) (/usr/lib/wayfire/libscale.so+0x370699)
Sep 11 18:14:19 wayfire[212229]:     #7 0x7f663dbd86e6 in std::vector<std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > >, std::allocator<std::unique_ptr<std::function<bool (wf::activator_data_t const&)>, std::default_delete<std::function<bool (wf::activator_data_t const&)> > > > >::~vector() (/usr/lib/wayfire/libscale.so+0x3506e6)
Sep 11 18:14:19 wayfire[212229]:     #8 0x7f663dc0d10a in wf::vswitch::control_bindings_t::~control_bindings_t() (/usr/lib/wayfire/libscale.so+0x38510a)
Sep 11 18:14:19 wayfire[212229]:     #9 0x7f663dc0d1ab in wf::vswitch::control_bindings_t::~control_bindings_t() (/usr/lib/wayfire/libscale.so+0x3851ab)
Sep 11 18:14:19 wayfire[212229]:     #10 0x7f663dc0d368 in std::default_delete<wf::vswitch::control_bindings_t>::operator()(wf::vswitch::control_bindings_t*) const (/usr/lib/wayfire/libscale.so+0x385368)
Sep 11 18:14:19 wayfire[212229]:     #11 0x7f663dbeb792 in std::unique_ptr<wf::vswitch::control_bindings_t, std::default_delete<wf::vswitch::control_bindings_t> >::~unique_ptr() (/usr/lib/wayfire/libscale.so+0x363792)
Sep 11 18:14:19 wayfire[212229]:     #12 0x7f663dc6df2e in wayfire_scale::~wayfire_scale() (/usr/lib/wayfire/libscale.so+0x3e5f2e)
Sep 11 18:14:19 wayfire[212229]:     #13 0x7f663dc6e891 in wayfire_scale::~wayfire_scale() (/usr/lib/wayfire/libscale.so+0x3e6891)
Sep 11 18:14:19 wayfire[212229]:     #14 0x564dd51a532e in std::default_delete<wf::plugin_interface_t>::operator()(wf::plugin_interface_t*) const /usr/include/c++/11.1.0/bits/unique_ptr.h:85
Sep 11 18:14:19 wayfire[212229]:     #15 0x564dd51a4b5e in std::__uniq_ptr_impl<wf::plugin_interface_t, std::default_delete<wf::plugin_interface_t> >::reset(wf::plugin_interface_t*) /usr/include/c++/11.1.0/bits/unique_ptr.h:182
Sep 11 18:14:19 wayfire[212229]:     #16 0x564dd519fbee in std::unique_ptr<wf::plugin_interface_t, std::default_delete<wf::plugin_interface_t> >::reset(wf::plugin_interface_t*) /usr/include/c++/11.1.0/bits/unique_ptr.h:456
Sep 11 18:14:19 wayfire[212229]:     #17 0x564dd5195905 in plugin_manager::destroy_plugin(std::unique_ptr<wf::plugin_interface_t, std::default_delete<wf::plugin_interface_t> >&) ../src/output/plugin-loader.cpp:71
Sep 11 18:14:19 wayfire[212229]:     #18 0x564dd5199e38 in plugin_manager::reload_dynamic_plugins() ../src/output/plugin-loader.cpp:212
Sep 11 18:14:19 wayfire[212229]:     #19 0x564dd519343b in operator() ../src/output/plugin-loader.cpp:27
Sep 11 18:14:19 wayfire[212229]:     #20 0x564dd519d5b2 in __invoke_impl<void, plugin_manager::plugin_manager(wf::output_t*)::<lambda()>::<lambda()>&> /usr/include/c++/11.1.0/bits/invoke.h:61
Sep 11 18:14:19 wayfire[212229]:     #21 0x564dd519ce80 in __invoke_r<void, plugin_manager::plugin_manager(wf::output_t*)::<lambda()>::<lambda()>&> /usr/include/c++/11.1.0/bits/invoke.h:111
Sep 11 18:14:19 wayfire[212229]:     #22 0x564dd519c8a1 in _M_invoke /usr/include/c++/11.1.0/bits/std_function.h:291
Sep 11 18:14:19 wayfire[212229]:     #23 0x564dd4cd8d04 in std::function<void ()>::operator()() const /usr/include/c++/11.1.0/bits/std_function.h:560
Sep 11 18:14:19 wayfire[212229]:     #24 0x564dd4cd6905 in wf::wl_idle_call::execute() ../src/util.cpp:586
Sep 11 18:14:19 wayfire[212229]:     #25 0x564dd4cd4e2f in handle_idle_listener ../src/util.cpp:454
Sep 11 18:14:19 wayfire[212229]:     #26 0x7f66768d0f8a in wl_event_loop_dispatch_idle (/usr/lib/libwayland-server.so.0+0xaf8a)
Sep 11 18:14:19 wayfire[212229]: previously allocated by thread T0 here:
Sep 11 18:14:19 wayfire[212229]:     #0 0x7f6676e1fca1 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
Sep 11 18:14:19 wayfire[212229]:     #1 0x7f663dbd91fb in std::_MakeUniq<std::function<bool (wf::activator_data_t const&)> >::__single_object std::make_unique<std::function<bool (wf::activator_data_t const&)>>() (/usr/lib/wayfire/libscale.so+0x3511fb)
Sep 11 18:14:19 wayfire[212229]:     #2 0x7f663db642f7 in wf::vswitch::control_bindings_t::setup(std::function<bool (wf::point_t, nonstd::observer_ptr<wf::view_interface_t>, bool)>) (/usr/lib/wayfire/libscale.so+0x2dc2f7)
Sep 11 18:14:19 wayfire[212229]:     #3 0x7f663db9f0da in wayfire_scale::setup_workspace_switching() (/usr/lib/wayfire/libscale.so+0x3170da)
Sep 11 18:14:19 wayfire[212229]:     #4 0x7f663db9ca68 in wayfire_scale::init() (/usr/lib/wayfire/libscale.so+0x314a68)
Sep 11 18:14:19 wayfire[212229]:     #5 0x564dd519508c in plugin_manager::init_plugin(std::unique_ptr<wf::plugin_interface_t, std::default_delete<wf::plugin_interface_t> >&) ../src/output/plugin-loader.cpp:60
Sep 11 18:14:19 wayfire[212229]:     #6 0x564dd519a40c in plugin_manager::reload_dynamic_plugins() ../src/output/plugin-loader.cpp:231
Sep 11 18:14:19 wayfire[212229]:     #7 0x564dd5193b89 in plugin_manager::plugin_manager(wf::output_t*) ../src/output/plugin-loader.cpp:21
Sep 11 18:14:19 wayfire[212229]:     #8 0x564dd51c5e14 in std::_MakeUniq<plugin_manager>::__single_object std::make_unique<plugin_manager, wf::output_impl_t*>(wf::output_impl_t*&&) /usr/include/c++/11.1.0/bits/unique_ptr.h:962
Sep 11 18:14:19 wayfire[212229]:     #9 0x564dd51b0664 in wf::output_impl_t::start_plugins() ../src/output/output.cpp:39
Sep 11 18:14:19 wayfire[212229]:     #10 0x564dd4cecddc in wf::output_layout_output_t::ensure_wayfire_output(wf::dimensions_t const&) (/usr/bin/wayfire+0xdccddc)
Sep 11 18:14:19 wayfire[212229]:     #11 0x564dd4cf74ff in wf::output_layout_output_t::apply_state(wf::output_state_t const&) (/usr/bin/wayfire+0xdd74ff)
Sep 11 18:14:19 wayfire[212229]:     #12 0x564dd4d06056 in wf::output_layout_t::impl::apply_configuration(std::map<wlr_output*, wf::output_state_t, std::less<wlr_output*>, std::allocator<std::pair<wlr_output* const, wf::output_state_t> > > const&) ../src/core/output-layout.cpp:1370
Sep 11 18:14:19 wayfire[212229]:     #13 0x564dd4d00b36 in wf::output_layout_t::impl::reconfigure_from_config() (/usr/bin/wayfire+0xde0b36)
Sep 11 18:14:19 wayfire[212229]:     #14 0x564dd4cfedb4 in wf::output_layout_t::impl::add_output(wlr_output*) (/usr/bin/wayfire+0xddedb4)
Sep 11 18:14:19 wayfire[212229]:     #15 0x564dd4cf8174 in wf::output_layout_t::impl::impl(wlr_backend*)::{lambda(void*)#1}::operator()(void*) const (/usr/bin/wayfire+0xdd8174)
Sep 11 18:14:19 wayfire[212229]:     #16 0x564dd4d51ff4 in void std::__invoke_impl<void, wf::output_layout_t::impl::impl(wlr_backend*)::{lambda(void*)#1}&, void*>(std::__invoke_other, wf::output_layout_t::impl::impl(wlr_backend*)::{lambda(void*)#1}&, void*&&) (/usr/bin/wayfire+0xe31ff4)
Sep 11 18:14:19 wayfire[212229]:     #17 0x564dd4d3e7c8 in std::enable_if<is_invocable_r_v<void, wf::output_layout_t::impl::impl(wlr_backend*)::{lambda(void*)#1}&, void*>, void>::type std::__invoke_r<void, wf::output_layout_t::impl::impl(wlr_backend*)::{lambda(void*)#1}&, void*>(wf::output_layout_t::impl::impl(wlr_backend*)::{lambda(void*)#1}&, void*&&) (/usr/bin/wayfire+0xe1e7c8)
Sep 11 18:14:19 wayfire[212229]:     #18 0x564dd4d2d7db in std::_Function_handler<void (void*), wf::output_layout_t::impl::impl(wlr_backend*)::{lambda(void*)#1}>::_M_invoke(std::_Any_data const&, void*&&) (/usr/bin/wayfire+0xe0d7db)
Sep 11 18:14:19 wayfire[212229]:     #19 0x564dd4cd83c6 in std::function<void (void*)>::operator()(void*) const /usr/include/c++/11.1.0/bits/std_function.h:560
Sep 11 18:14:19 wayfire[212229]:     #20 0x564dd4cd5c8d in wf::wl_listener_wrapper::emit(void*) ../src/util.cpp:526
Sep 11 18:14:19 wayfire[212229]:     #21 0x564dd4cd4de2 in handle_wrapped_listener ../src/util.cpp:448
Sep 11 18:14:19 wayfire[212229]:     #22 0x7f667687616f in wlr_signal_emit_safe ../util/signal.c:29
Sep 11 18:14:19 wayfire[212229]:     #23 0x7f667682724e in new_output_reemit ../backend/multi/backend.c:160
Sep 11 18:14:19 wayfire[212229]:     #24 0x7f667687616f in wlr_signal_emit_safe ../util/signal.c:29
Sep 11 18:14:19 wayfire[212229]:     #25 0x7f667681a3cb in scan_drm_connectors ../backend/drm/drm.c:1455
Sep 11 18:14:19 wayfire[212229]:     #26 0x7f66768142c2 in backend_start ../backend/drm/backend.c:26
Sep 11 18:14:19 wayfire[212229]:     #27 0x7f66768126e8 in wlr_backend_start ../backend/backend.c:55
Sep 11 18:14:19 wayfire[212229]:     #28 0x7f6676826e22 in multi_backend_start ../backend/multi/backend.c:31
Sep 11 18:14:19 wayfire[212229]:     #29 0x7f66768126e8 in wlr_backend_start ../backend/backend.c:55
Sep 11 18:14:19 wayfire[212229]: SUMMARY: AddressSanitizer: heap-use-after-free /usr/include/c++/11.1.0/bits/std_function.h:248 in std::_Function_base::_M_empty() const
Sep 11 18:14:19 wayfire[212229]: Shadow bytes around the buggy address:
Sep 11 18:14:19 wayfire[212229]:   0x0c068007cc70: fd fa fa fa fd fd fd fa fa fa fd fd fd fd fa fa
Sep 11 18:14:19 wayfire[212229]:   0x0c068007cc80: fd fd fd fa fa fa fd fd fd fd fa fa fd fd fd fa
Sep 11 18:14:19 wayfire[212229]:   0x0c068007cc90: fa fa fd fd fd fa fa fa fd fd fd fa fa fa fd fd
Sep 11 18:14:19 wayfire[212229]:   0x0c068007cca0: fd fa fa fa fd fd fd fd fa fa 00 00 00 fa fa fa
Sep 11 18:14:19 wayfire[212229]:   0x0c068007ccb0: fd fd fd fa fa fa fd fd fd fd fa fa 00 00 00 fa
Sep 11 18:14:19 wayfire[212229]: =>0x0c068007ccc0: fa fa fd fd fd fa fa fa fd fd[fd]fd fa fa fd fd
Sep 11 18:14:19 wayfire[212229]:   0x0c068007ccd0: fd fd fa fa 00 00 00 fa fa fa fd fd fd fa fa fa
Sep 11 18:14:19 wayfire[212229]:   0x0c068007cce0: fd fd fd fd fa fa 00 00 00 fa fa fa fd fd fd fa
Sep 11 18:14:19 wayfire[212229]:   0x0c068007ccf0: fa fa fd fd fd fd fa fa 00 00 00 fa fa fa fd fd
Sep 11 18:14:19 wayfire[212229]:   0x0c068007cd00: fd fa fa fa fd fd fd fd fa fa 00 00 00 fa fa fa
Sep 11 18:14:19 wayfire[212229]:   0x0c068007cd10: fd fd fd fa fa fa fd fd fd fd fa fa 00 00 00 fa
Sep 11 18:14:19 wayfire[212229]: Shadow byte legend (one shadow byte represents 8 application bytes):
Sep 11 18:14:19 wayfire[212229]:   Addressable:           00
Sep 11 18:14:19 wayfire[212229]:   Partially addressable: 01 02 03 04 05 06 07
Sep 11 18:14:19 wayfire[212229]:   Heap left redzone:       fa
Sep 11 18:14:19 wayfire[212229]:   Freed heap region:       fd
Sep 11 18:14:19 wayfire[212229]:   Stack left redzone:      f1
Sep 11 18:14:19 wayfire[212229]:   Stack mid redzone:       f2
Sep 11 18:14:19 wayfire[212229]:   Stack right redzone:     f3
Sep 11 18:14:19 wayfire[212229]:   Stack after return:      f5
Sep 11 18:14:19 wayfire[212229]:   Stack use after scope:   f8
Sep 11 18:14:19 wayfire[212229]:   Global redzone:          f9
Sep 11 18:14:19 wayfire[212229]:   Global init order:       f6
Sep 11 18:14:19 wayfire[212229]:   Poisoned by user:        f7
Sep 11 18:14:19 wayfire[212229]:   Container overflow:      fc
Sep 11 18:14:19 wayfire[212229]:   Array cookie:            ac
Sep 11 18:14:19 wayfire[212229]:   Intra object redzone:    bb
Sep 11 18:14:19 wayfire[212229]:   ASan internal:           fe
Sep 11 18:14:19 wayfire[212229]:   Left alloca redzone:     ca
Sep 11 18:14:19 wayfire[212229]:   Right alloca redzone:    cb
Sep 11 18:14:19 wayfire[212229]:   Shadow gap:              cc
Sep 11 18:14:19 wayfire[212229]: ==212229==ABORTING
JordanL2 commented 3 years ago

Disabling the scale plugin stops the crash happening.

Also, when I re-enable scale and wayfire reloads the config, the crash doesn't happen if I then change workspaces. I have to cause another reload first.

ammen99 commented 7 months ago

Please re-open the issue with a new stack trace if the issue persists on newer Wayfire versions.