WayfireWM / wayfire

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

New weird crash: reloading animation plugin while window close animation is playing #670

Closed valpackett closed 8 months ago

valpackett commented 4 years ago

Just crashed after accepting a dialog box in a Qt5 application (FreeCAD) using the return key.

This is all happening in destructors in exit?? After signal_handler caught a signal in reload_dynamic_plugins?? I guess the real cause of the crash is obscured >_< I guess I should turn ASan back on.

irrelevant trace ``` * thread #1, name = 'wayfire', stop reason = signal SIGSEGV * frame #0: 0x0000000000316bbe wayfire`wf::safe_list_t >::remove_if(this=0x0000000000000050, predicate=function &)> @ 0x00007fffffffbdc0)>) at safe-list.hpp:0 frame #1: 0x0000000000313dda wayfire`wf::view_interface_t::pop_transformer(this=0x00000008634a4140, transformer=(ptr = 0x0000000863425d30)) at view.cpp:784:27 frame #2: 0x000000087ca89f85 libanimate.so`zoom_animation::~zoom_animation() [inlined] zoom_animation::~zoom_animation(this=0x000000086634c9c0) at basic_animations.hpp:135:15 frame #3: 0x000000087ca89f6a libanimate.so`zoom_animation::~zoom_animation(this=0x000000086634c9c0) at basic_animations.hpp:134 frame #4: 0x000000087ca89319 libanimate.so`animation_hook::~animation_hook() [inlined] std::__1::default_delete::operator(__ptr=)(animation_base*) const at memory:2363:5 frame #5: 0x000000087ca89313 libanimate.so`animation_hook::~animation_hook() [inlined] std::__1::unique_ptr >::reset(this=, __p=) at memory:2618 frame #6: 0x000000087ca89302 libanimate.so`animation_hook::~animation_hook(this=0x00000008662d1e60) at animate.cpp:123 frame #7: 0x000000087ca893ae libanimate.so`animation_hook::~animation_hook(this=0x00000008662d1e60) at animate.cpp:115:5 frame #8: 0x00000000002e67ea wayfire`wf::object_base_t::~object_base_t() [inlined] std::__1::default_delete::operator(__ptr=)(wf::custom_data_t*) const at memory:2363:5 frame #9: 0x00000000002e67e4 wayfire`wf::object_base_t::~object_base_t() [inlined] std::__1::unique_ptr >::reset(this=, __p=) at memory:2618 frame #10: 0x00000000002e67d3 wayfire`wf::object_base_t::~object_base_t() [inlined] std::__1::unique_ptr >::~unique_ptr(this=) at memory:2572 frame #11: 0x00000000002e67d3 wayfire`wf::object_base_t::~object_base_t() [inlined] std::__1::pair, std::__1::allocator > const, std::__1::unique_ptr > >::~pair(this=0x0000000863476060) at utility:297 frame #12: 0x00000000002e67d3 wayfire`wf::object_base_t::~object_base_t() [inlined] void std::__1::allocator_traits, std::__1::allocator >, std::__1::unique_ptr > >, void*> > >::__destroy, std::__1::allocator > const, std::__1::unique_ptr > > >((null)=0x00000008661e2e90, __p=0x0000000863476060) at memory:1798 frame #13: 0x00000000002e67d3 wayfire`wf::object_base_t::~object_base_t() [inlined] void std::__1::allocator_traits, std::__1::allocator >, std::__1::unique_ptr > >, void*> > >::destroy, std::__1::allocator > const, std::__1::unique_ptr > > >(__a=0x00000008661e2e90, __p=0x0000000863476060) at memory:1630 frame #14: 0x00000000002e67d3 wayfire`wf::object_base_t::~object_base_t() at __hash_table:1602 frame #15: 0x00000000002e67bb wayfire`wf::object_base_t::~object_base_t() [inlined] std::__1::__hash_table, std::__1::allocator >, std::__1::unique_ptr > >, std::__1::__unordered_map_hasher, std::__1::allocator >, std::__1::__hash_value_type, std::__1::allocator >, std::__1::unique_ptr > >, std::__1::hash, std::__1::allocator > >, true>, std::__1::__unordered_map_equal, std::__1::allocator >, std::__1::__hash_value_type, std::__1::allocator >, std::__1::unique_ptr > >, std::__1::equal_to, std::__1::allocator > >, true>, std::__1::allocator, std::__1::allocator >, std::__1::unique_ptr > > > >::~__hash_table(this=0x00000008661e2e80) at __hash_table:1541 frame #16: 0x00000000002e67bb wayfire`wf::object_base_t::~object_base_t() [inlined] std::__1::unordered_map, std::__1::allocator >, std::__1::unique_ptr >, std::__1::hash, std::__1::allocator > >, std::__1::equal_to, std::__1::allocator > >, std::__1::allocator, std::__1::allocator > const, std::__1::unique_ptr > > > >::~unordered_map(this=0x00000008661e2e80 size=2) at unordered_map:970 frame #17: 0x00000000002e67bb wayfire`wf::object_base_t::~object_base_t() [inlined] wf::object_base_t::obase_impl::~obase_impl(this=0x00000008661e2e80) at object.cpp:140 frame #18: 0x00000000002e67bb wayfire`wf::object_base_t::~object_base_t() [inlined] std::__1::default_delete::operator(this=0x00000008634a4160, __ptr=0x00000008661e2e80)(wf::object_base_t::obase_impl*) const at memory:2363 frame #19: 0x00000000002e67bb wayfire`wf::object_base_t::~object_base_t() [inlined] std::__1::unique_ptr >::reset(this=0x00000008634a4160, __p=0x0000000000000000) at memory:2618 frame #20: 0x00000000002e67bb wayfire`wf::object_base_t::~object_base_t() [inlined] std::__1::unique_ptr >::~unique_ptr(this=0x00000008634a4160) at memory:2572 frame #21: 0x00000000002e67bb wayfire`wf::object_base_t::~object_base_t(this=0x00000008634a4150) at object.cpp:156 frame #22: 0x00000000003153d9 wayfire`wf::view_interface_t::~view_interface_t(this=0x00000008634a4140) at view.cpp:1160:1 frame #23: 0x0000000000319dac wayfire`wf::wlr_view_t::~wlr_view_t(this=0x00000008634a4000) at view-impl.hpp:98:6 frame #24: 0x000000000031dff8 wayfire`non-virtual thunk to wayfire_xdg_view::~wayfire_xdg_view() [inlined] wayfire_xdg_view::~wayfire_xdg_view(this=0x00000008634a4000) at xdg-shell.cpp:311:1 frame #25: 0x000000000031dff0 wayfire`non-virtual thunk to wayfire_xdg_view::~wayfire_xdg_view() at xdg-shell.hpp:0 frame #26: 0x00000000002f04d0 wayfire`wf::compositor_core_impl_t::~compositor_core_impl_t() [inlined] std::__1::default_delete::operator(__ptr=)(wf::view_interface_t*) const at memory:2363:5 frame #27: 0x00000000002f04ca wayfire`wf::compositor_core_impl_t::~compositor_core_impl_t() [inlined] std::__1::unique_ptr >::reset(this=, __p=0x0000000000000000) at memory:2618 frame #28: 0x00000000002f04c5 wayfire`wf::compositor_core_impl_t::~compositor_core_impl_t() [inlined] std::__1::unique_ptr >::~unique_ptr(this=) at memory:2572 frame #29: 0x00000000002f04c5 wayfire`wf::compositor_core_impl_t::~compositor_core_impl_t() [inlined] std::__1::allocator > >::destroy(this=0x0000000000356b48, __p=) at memory:1931 frame #30: 0x00000000002f04c5 wayfire`wf::compositor_core_impl_t::~compositor_core_impl_t() [inlined] void std::__1::allocator_traits > > >::__destroy > >(__a=0x0000000000356b48, __p=) at memory:1793 frame #31: 0x00000000002f04c5 wayfire`wf::compositor_core_impl_t::~compositor_core_impl_t() [inlined] void std::__1::allocator_traits > > >::destroy > >(__a=0x0000000000356b48, __p=) at memory:1630 frame #32: 0x00000000002f04c5 wayfire`wf::compositor_core_impl_t::~compositor_core_impl_t() [inlined] std::__1::__vector_base >, std::__1::allocator > > >::__destruct_at_end(this=0x0000000000356b38, __new_last=0x0000000863415c00) at vector:426 frame #33: 0x00000000002f04a9 wayfire`wf::compositor_core_impl_t::~compositor_core_impl_t() [inlined] std::__1::__vector_base >, std::__1::allocator > > >::clear(this=0x0000000000356b38) at vector:369 frame #34: 0x00000000002f04a9 wayfire`wf::compositor_core_impl_t::~compositor_core_impl_t() [inlined] std::__1::vector >, std::__1::allocator > > >::clear(this=0x0000000000356b38 size=6) at vector:772 frame #35: 0x00000000002f04a9 wayfire`wf::compositor_core_impl_t::~compositor_core_impl_t(this=0x0000000000356780) at core.cpp:795 frame #36: 0x000000080c0b8aa1 libc.so.7`__cxa_finalize + 321 frame #37: 0x000000080c053ed1 libc.so.7`exit + 33 frame #38: 0x00000000002d2888 wayfire`signal_handler(signal=) at main.cpp:246:5 frame #39: 0x000000080d939c02 libthr.so.3`___lldb_unnamed_symbol103$$libthr.so.3 + 210 frame #40: 0x000000080d93910e libthr.so.3`___lldb_unnamed_symbol84$$libthr.so.3 + 318 frame #41: 0x00007fffffffe003 frame #42: 0x000000087a7deaee libexpo.so`wayfire_expo::~wayfire_expo(this=0x00000008661a5d00) at expo.cpp:24:7 frame #43: 0x000000000032c500 wayfire`plugin_manager::reload_dynamic_plugins() [inlined] std::__1::default_delete::operator(__ptr=)(wf::plugin_interface_t*) const at memory:2363:5 frame #44: 0x000000000032c4fa wayfire`plugin_manager::reload_dynamic_plugins() [inlined] std::__1::unique_ptr >::reset(this=, __p=) at memory:2618 frame #45: 0x000000000032c4ed wayfire`plugin_manager::reload_dynamic_plugins() [inlined] plugin_manager::destroy_plugin(this=0x000000086610a300, p=0x0000000863366f78) at plugin-loader.cpp:86 frame #46: 0x000000000032c4b5 wayfire`plugin_manager::reload_dynamic_plugins(this=0x000000086610a300) at plugin-loader.cpp:217 frame #47: 0x0000000802ca6687 libwayland-server.so.0`wl_event_loop_dispatch + 1287 frame #48: 0x0000000802ca397d libwayland-server.so.0`wl_display_run + 45 frame #49: 0x00000000002d21ff wayfire`main(argc=, argv=) at main.cpp:393:5 frame #50: 0x00000000002cee4f wayfire`_start(ap=, cleanup=) at crt1_c.c:75:7 ```
valpackett commented 4 years ago

Yeah, it still has to do with reload_dynamic_plugins~wayfire_expo

irrelevant trace ``` * thread #1, name = 'wayfire', stop reason = signal SIGSEGV * frame #0: 0x00000008798dbae0 frame #1: 0x000000087a502a74 libexpo.so`wayfire_expo::~wayfire_expo(this=0x0000000866146980) at expo.cpp:24:7 frame #2: 0x000000087a502aee libexpo.so`wayfire_expo::~wayfire_expo(this=0x0000000866146980) at expo.cpp:24:7 frame #3: 0x000000000032c220 wayfire`plugin_manager::reload_dynamic_plugins() [inlined] std::__1::default_delete::operator(__ptr=)(wf::plugin_interface_t*) const at memory:2363:5 frame #4: 0x000000000032c21a wayfire`plugin_manager::reload_dynamic_plugins() [inlined] std::__1::unique_ptr >::reset(this=, __p=) at memory:2618 frame #5: 0x000000000032c20d wayfire`plugin_manager::reload_dynamic_plugins() [inlined] plugin_manager::destroy_plugin(this=0x0000000866278300, p=0x00000008646fab28) at plugin-loader.cpp:86 frame #6: 0x000000000032c1d5 wayfire`plugin_manager::reload_dynamic_plugins(this=0x0000000866278300) at plugin-loader.cpp:217 frame #7: 0x00000008041dd687 libwayland-server.so.0`wl_event_loop_dispatch + 1287 frame #8: 0x00000008041da97d libwayland-server.so.0`wl_display_run + 45 frame #9: 0x00000000002d20af wayfire`main(argc=, argv=) at main.cpp:393:5 frame #10: 0x00000000002ced1f wayfire`_start(ap=, cleanup=) at crt1_c.c:75:7 (lldb) fr sel 2 frame #2: 0x000000087a502aee libexpo.so`wayfire_expo::~wayfire_expo(this=0x0000000866146980) at expo.cpp:24:7 21 return word.substr(0, prefix.length()) == prefix; 22 } 23 -> 24 class wayfire_expo : public wf::plugin_interface_t 25 { 26 private: 27 wf::point_t convert_workspace_index_to_coords(int index) (lldb) fr sel 1 frame #1: 0x000000087a502a74 libexpo.so`wayfire_expo::~wayfire_expo(this=0x0000000866146980) at expo.cpp:24:7 21 return word.substr(0, prefix.length()) == prefix; 22 } 23 -> 24 class wayfire_expo : public wf::plugin_interface_t 25 { 26 private: 27 wf::point_t convert_workspace_index_to_coords(int index) (lldb) fr sel 0 frame #0: 0x00000008798dbae0 error: core file does not contain 0x8798dbae0 ```

This didn't happen before the last git pull.. maybe "close all views even if unmapped" is somehow involved? though why would plugin reload be involved? why is plugin reload even happening??

upd: debug build hints at vector??

irrelevant trace ``` * thread #1, name = 'wayfire', stop reason = signal SIGSEGV * frame #0: 0x0000000874785fb0 frame #1: 0x00000008799a5058 libexpo.so`std::__1::vector, std::__1::allocator > >::~vector(this=0x00000008639fcfe0 size=0) at vector:555:5 frame #2: 0x00000008799a56dd libexpo.so`wayfire_expo::~wayfire_expo(this=0x00000008639fcd00) at expo.cpp:24:7 frame #3: 0x00000008799a577c libexpo.so`wayfire_expo::~wayfire_expo(this=0x00000008639fcd00) at expo.cpp:24:7 frame #4: 0x00000000006e4fff wayfire`std::__1::default_delete::operator(this=0x000000086265bf78, __ptr=0x00000008639fcd00)(wf::plugin_interface_t*) const at memory:2363:5 frame #5: 0x00000000006e336f wayfire`std::__1::unique_ptr >::reset(this=0x000000086265bf78, __p=0x0000000000000000) at memory:2618:7 frame #6: 0x00000000006dfed7 wayfire`plugin_manager::destroy_plugin(this=0x0000000863961300, p=0x000000086265bf78) at plugin-loader.cpp:86:7 frame #7: 0x00000000006df5cd wayfire`plugin_manager::reload_dynamic_plugins(this=0x0000000863961300) at plugin-loader.cpp:217:13 frame #8: 0x00000000006e3028 wayfire`plugin_manager::plugin_manager(this=0x0000000863961308)::$_0::operator()() const::'lambda'()::operator()() const at plugin-loader.cpp:42:47 frame #9: 0x00000000006e2fed wayfire`decltype(__f=0x0000000863961308)::$_0::operator()() const::'lambda'()&>(fp)()) std::__1::__invoke(plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()&) at type_traits:3539:1 frame #10: 0x00000000006e2f9d wayfire`void std::__1::__invoke_void_return_wrapper::__call(plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()&) at __functional_base:348:9 frame #11: 0x00000000006e2f6d wayfire`std::__1::__function::__alloc_func, void ()>::operator(this=0x0000000863961308)() at functional:1540:16 frame #12: 0x00000000006e20ce wayfire`std::__1::__function::__func, void ()>::operator(this=0x0000000863961300)() at functional:1714:12 frame #13: 0x0000000000525905 wayfire`std::__1::__function::__value_func::operator(this=0x0000000863961300)() const at functional:1867:16 frame #14: 0x000000000051cec5 wayfire`std::__1::function::operator(this=0x0000000863961300)() const at functional:2473:12 frame #15: 0x000000000052916a wayfire`wf::wl_idle_call::execute(this=0x0000000863961300) at util.cpp:576:9 frame #16: 0x000000000052908d wayfire`handle_idle_listener(data=0x0000000863961300) at util.cpp:459:11 frame #17: 0x000000080280d687 libwayland-server.so.0`wl_event_loop_dispatch + 1287 frame #18: 0x000000080280a97d libwayland-server.so.0`wl_display_run + 45 frame #19: 0x000000000051b6e1 wayfire`main(argc=3, argv=0x00007fffffffd3a0) at main.cpp:393:5 frame #20: 0x0000000000518b1f wayfire`_start(ap=, cleanup=) at crt1_c.c:75:7 (lldb) fr sel 2 frame #2: 0x00000008799a56dd libexpo.so`wayfire_expo::~wayfire_expo(this=0x00000008639fcd00) at expo.cpp:24:7 21 return word.substr(0, prefix.length()) == prefix; 22 } 23 -> 24 class wayfire_expo : public wf::plugin_interface_t 25 { 26 private: 27 wf::point_t convert_workspace_index_to_coords(int index) (lldb) fr sel 1 frame #1: 0x00000008799a5058 libexpo.so`std::__1::vector, std::__1::allocator > >::~vector(this=0x00000008639fcfe0 size=0) at vector:555:5 552 #if _LIBCPP_DEBUG_LEVEL >= 2 553 __get_db()->__erase_c(this); 554 #endif -> 555 } 556 557 vector(const vector& __x); 558 vector(const vector& __x, const allocator_type& __a); ```
valpackett commented 4 years ago

ASan doesn't catch anything before the segfault..

anyway with the expo plugin unloaded, at least the trace is related to zoom animation

=================================================================
==55273==ERROR: AddressSanitizer: SEGV on unknown address 0x0008f65d2bf0 (pc 0x0008f65d2bf0 bp 0x7fffffffac50 sp 0x7fffffffac38 T0)
==55273==The signal is caused by a READ memory access.
    #0 0x8f65d2bf0  (<unknown module>)
    #1 0x8fa14b1ea in zoom_animation::~zoom_animation() /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/basic_animations.hpp:136:5
    #2 0x8fa14b2bb in zoom_animation::~zoom_animation() /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/basic_animations.hpp:134:5
    #3 0x8fa13f2f1 in std::__1::default_delete<animation_base>::operator()(animation_base*) const /usr/include/c++/v1/memory:2363:5
    #4 0x8fa13f11a in std::__1::unique_ptr<animation_base, std::__1::default_delete<animation_base> >::reset(animation_base*) /usr/include/c++/v1/memory:2618:7
    #5 0x8fa141550 in animation_hook<zoom_animation>::~animation_hook() /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/animate.cpp:123:25
    #6 0x8fa1416ab in animation_hook<zoom_animation>::~animation_hook() /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/animate.cpp:115:5
    #7 0x734351 in std::__1::default_delete<wf::custom_data_t>::operator()(wf::custom_data_t*) const /usr/include/c++/v1/memory:2363:5
    #8 0x7067aa in std::__1::unique_ptr<wf::custom_data_t, std::__1::default_delete<wf::custom_data_t> >::reset(wf::custom_data_t*) /usr/include/c++/v1/memory:2618:7
    #9 0x6f4ca6 in wf::object_base_t::erase_data(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) /home/greg/src/github.com/WayfireWM/wayfire/build/../src/core/object.cpp:177:10
    #10 0x8fa1418dc in animation_hook<zoom_animation>::stop_hook(bool) /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/animate.cpp:111:15
    #11 0x8fa115ede in cleanup_views_on_output(wf::output_t*) /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/animate.cpp:146:42
    #12 0x8fa118204 in wayfire_animation::fini() /home/greg/src/github.com/WayfireWM/wayfire/build/../plugins/animate/animate.cpp:308:9
    #13 0xb7d243 in plugin_manager::destroy_plugin(std::__1::unique_ptr<wf::plugin_interface_t, std::__1::default_delete<wf::plugin_interface_t> >&) /home/greg/src/github.com/WayfireWM/wayfire/build/../src/output/plugin-loader.cpp:80:8
    #14 0xb7bc98 in plugin_manager::reload_dynamic_plugins() /home/greg/src/github.com/WayfireWM/wayfire/build/../src/output/plugin-loader.cpp:217:13
    #15 0xb859a5 in plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()::operator()() const /home/greg/src/github.com/WayfireWM/wayfire/build/../src/output/plugin-loader.cpp:42:47
    #16 0xb8593c in decltype(std::__1::forward<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()&>(fp)()) std::__1::__invoke<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()&>(plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()&) /usr/include/c++/v1/type_traits:3539:1
    #17 0xb858ec in void std::__1::__invoke_void_return_wrapper<void>::__call<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()&>(plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()&) /usr/include/c++/v1/__functional_base:348:9
    #18 0xb858bc in std::__1::__function::__alloc_func<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'(), std::__1::allocator<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()>, void ()>::operator()() /usr/include/c++/v1/functional:1540:16
    #19 0xb82fcd in std::__1::__function::__func<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'(), std::__1::allocator<plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()>, void ()>::operator()() /usr/include/c++/v1/functional:1714:12
    #20 0x64a2cd in std::__1::__function::__value_func<void ()>::operator()() const /usr/include/c++/v1/functional:1867:16
    #21 0x632844 in std::__1::function<void ()>::operator()() const /usr/include/c++/v1/functional:2473:12
    #22 0x656f81 in wf::wl_idle_call::execute() /home/greg/src/github.com/WayfireWM/wayfire/build/../src/util.cpp:576:9
    #23 0x656cbc in handle_idle_listener(void*) /home/greg/src/github.com/WayfireWM/wayfire/build/../src/util.cpp:459:11
    #24 0x802904686 in wl_event_loop_dispatch (/usr/local/lib/libwayland-server.so.0+0xe686)
    #25 0x80290197c in wl_display_run (/usr/local/lib/libwayland-server.so.0+0xb97c)
    #26 0x62e1eb in main /home/greg/src/github.com/WayfireWM/wayfire/build/../src/main.cpp:393:5
    #27 0x59fa5e in _start /usr/src/lib/csu/amd64/crt1_c.c:75:7
    #28 0x8012d9007  (<unknown module>)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (<unknown module>)
==55273==ABORTING

I can see how destroying the zoom animation plugin while the zoom animation is playing is a bad idea :D

I still have no clue why plugins are being reloaded… Probably my gsettings plugin causing config reload. Why would it do that specifically when closing qt dialogs? idk. QGnomePlatform somehow touching all dconf settings?? lol

valpackett commented 4 years ago

Okay, so there's actually A LOT of stuff that doesn't like the config being reloaded in that time.

Changing zoom_animation to use a name for the transformer like the other animation in that file (probably should be done anyway!? why doesn't the observer thing work hmm) AND disabling lots of plugins (vswitch,vswipe,expo,cube) avoids the crash. These plugins crash in various places like destruction of duration_t derived classes, etc.

Soooo I guess trying to make everything compatible with the plugins being unloaded while an animation is playing is futile, and we really should make sure that "idle" means actually everything is idle, not just the wayland event loop!

UPD oh another thought. My reproducer for this is quite convoluted if you're not me: you need to have my gsettings plugin active, run FreeCAD (natively on wayland, which needs my fix in Coin that landed recently; git master if that matters; with modern ui plugin if that matters; with QGnomePlatform platformtheme which most likely matters), run the "open file" dialog and cancel it. What we really need to test robustness is a "chaos monkey" plugin that would hook into all the events and randomly decide to do various unexpected things like reloading the config and… and… other actions?

valpackett commented 4 years ago

update: QGnomePlatform does not matter; commenting out change notification subscription in GSettings doesn't help. I guess it's actually Qt file-open dialog touching the wayfire ini file somehow?? maybe libinotify not working exactly like linux inotify..

valpackett commented 4 years ago

or it's inotify_add_watch(fd, config_dir.c_str(), IN_CREATE) reacting to ~/.config/QtProject.conf !!

(Wayfire shouldn't explode in this situation regardless, it's just interesting to find what causes it)

ammen99 commented 4 years ago

or it's inotify_add_watch(fd, config_dir.c_str(), IN_CREATE) reacting to ~/.config/QtProject.conf !!

(Wayfire shouldn't explode in this situation regardless, it's just interesting to find what causes it)

Interesting, if the config file changed, we shouldn't updatee anything at all? Maybe here something is reacting to config-reload, which should make it easy to find the real culprit.

valpackett commented 4 years ago

plugin_manager::plugin_manager(wf::output_t*)::$_0::operator()() const::'lambda'()::operator()() const

idle_reaload_plugins.run_once([&] () {reload_dynamic_plugins(); });

reacting to the plugins option change…

Oh, because reading it from the file is different than what wf-gsettings has set, and it's intentionally trying to unload all the things. Not "reload for some reason" *facepalm*

ammen99 commented 4 years ago

Ahhhh, I see. Then this is a duplicate of #682 :)

ammen99 commented 4 years ago

Hmm, actually, maybe not. Wayfire shouldn't crash even in this case ...

ammen99 commented 8 months ago

Should be fixed in #2142