Describe the bug
Wayfire crashes when started in a nested way (e.g. on Wayfire). Reverting 3cbc6b4c871aeb3856a90d3a2a2794e73207f3f9 fixes the issue.
To Reproduce
Try to start (e.g. from terminal)
Expected behavior
No crash
Screenshots or stacktrace
Thread 1 "wayfire" received signal SIGSEGV, Segmentation fault.
0x0000555555ae62ec in wf::render_manager::impl::impl(wf::output_t*)::{lambda(void*)#1}::operator()(void*) const (
__closure=0x555555c6feb0) at ../src/output/render-manager.cpp:962
962 if (!wf::get_core().session->active)
(gdb) bt
#0 0x0000555555ae62ec in wf::render_manager::impl::impl(wf::output_t*)::{lambda(void*)#1}::operator()(void*) const
(__closure=0x555555c6feb0) at ../src/output/render-manager.cpp:962
#1 0x0000555555af2fc6 in std::__invoke_impl<void, wf::render_manager::impl::impl(wf::output_t*)::{lambda(void*)#1}&, void*>(std::__invoke_other, wf::render_manager::impl::impl(wf::output_t*)::{lambda(void*)#1}&, void*&&) (__f=...)
at /usr/include/c++/13/bits/invoke.h:61
#2 0x0000555555af0252 in std::__invoke_r<void, wf::render_manager::impl::impl(wf::output_t*)::{lambda(void*)#1}&, void*>(wf::render_manager::impl::impl(wf::output_t*)::{lambda(void*)#1}&, void*&&) (__fn=...) at /usr/include/c++/13/bits/invoke.h:111
#3 0x0000555555aecdbc in std::_Function_handler<void (void*), wf::render_manager::impl::impl(wf::output_t*)::{lambda(void*)#1}>::_M_invoke(std::_Any_data const&, void*&&) (__functor=..., __args#0=@0x7fffffffd9a0: 0x5555567916e0)
at /usr/include/c++/13/bits/std_function.h:290
#4 0x0000555555923011 in std::function<void (void*)>::operator()(void*) const (this=0x555555c6feb0, __args#0=0x5555567916e0)
at /usr/include/c++/13/bits/std_function.h:591
#5 0x0000555555922707 in wf::wl_listener_wrapper::emit (this=0x555555c6feb0, data=0x5555567916e0)
at ../src/wl-listener-wrapper.tpp:57
#6 0x0000555555922562 in wf::handle_wrapped_listener (listener=0x555555c6fed0, data=0x5555567916e0)
at ../src/wl-listener-wrapper.tpp:10
#7 0x00007ffff7f028fc in wl_signal_emit_mutable () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#8 0x00007ffff7ad3b16 in ??? () at /lib/x86_64-linux-gnu/libffi.so.8
#9 0x00007ffff7ad03ef in ??? () at /lib/x86_64-linux-gnu/libffi.so.8
#10 0x00007ffff7ad30be in ffi_call () at /lib/x86_64-linux-gnu/libffi.so.8
#11 0x00007ffff7657bfe in ??? () at /lib/x86_64-linux-gnu/libwayland-client.so.0
#12 0x00007ffff7658473 in ??? () at /lib/x86_64-linux-gnu/libwayland-client.so.0
#13 0x00007ffff765871c in wl_display_dispatch_queue_pending () at /lib/x86_64-linux-gnu/libwayland-client.so.0
#14 0x00007ffff7e34d8c in dispatch_events () at /usr/local/lib/x86_64-linux-gnu/libwlroots.so.12
#15 0x00007ffff7f04402 in wl_event_loop_dispatch () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#16 0x00007ffff7f04c45 in wl_display_run () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#17 0x0000555555918469 in main (argc=1, argv=0x7fffffffe558) at ../src/main.cpp:454
I can confirm that wf::get_core().session == NULL in this case.
Describe the bug Wayfire crashes when started in a nested way (e.g. on Wayfire). Reverting 3cbc6b4c871aeb3856a90d3a2a2794e73207f3f9 fixes the issue.
To Reproduce Try to start (e.g. from terminal)
Expected behavior No crash
Screenshots or stacktrace
I can confirm that
wf::get_core().session == NULL
in this case.Wayfire version latest git