egui: libwayland-client segfault introduced in a dep update
Describe the bug
Some time after d486c76a9f146c12321b2a3fd0cedfe732e5783d an updated dep (winit?) is now causing a segfault.
This happens only after I do a close and re-open of the window using run_and_return.
Thread 1 "rog-control-cen" received signal SIGSEGV, Segmentation fault.
0x00007ffff68cc3a9 in wl_list_insert () from /lib64/libwayland-client.so.0
Missing separate debuginfos, use: dnf debuginfo-install at-spi2-atk-2.48.0-1.fc38.x86_64 at-spi2-core-2.48.0-1.fc38.x86_64 atk-2.48.0-1.fc38.x86_64 bzip2-libs-1.0.8-13.fc38.x86_64 cairo-1.17.8-3.fc38.x86_64 cairo-gobject-1.17.8-3.fc38.x86_64 dbus-libs-1.14.6-1.fc38.x86_64 dconf-0.40.0-8.fc38.x86_64 elfutils-libelf-0.189-1.fc38.x86_64 expat-2.5.0-2.fc38.x86_64 fontconfig-2.14.2-1.fc38.x86_64 freetype-2.13.0-2.fc38.x86_64 fribidi-1.0.12-3.fc38.x86_64 gdk-pixbuf2-2.42.10-2.fc38.x86_64 glib2-2.76.1-1.fc38.x86_64 glibc-2.37-1.fc38.x86_64 graphite2-1.3.14-11.fc38.x86_64 gtk3-3.24.37-1.fc38.x86_64 harfbuzz-7.1.0-1.fc38.x86_64 json-glib-1.6.6-4.fc38.x86_64 libX11-1.8.4-1.fc38.x86_64 libX11-xcb-1.8.4-1.fc38.x86_64 libXau-1.0.11-2.fc38.x86_64 libXcomposite-0.4.5-9.fc38.x86_64 libXcursor-1.2.1-3.fc38.x86_64 libXdamage-1.1.5-9.fc38.x86_64 libXext-1.3.5-2.fc38.x86_64 libXfixes-6.0.0-5.fc38.x86_64 libXi-1.8-4.fc38.x86_64 libXinerama-1.1.5-2.fc38.x86_64 libXrender-0.9.11-2.fc38.x86_64 libappindicator-gtk3-12.10.1-1.fc38.x86_64 libblkid-2.38.1-4.fc38.x86_64 libcap-2.48-6.fc38.x86_64 libcloudproviders-0.3.1-7.fc38.x86_64 libdatrie-0.2.13-5.fc38.x86_64 libdbusmenu-16.04.0-21.fc38.x86_64 libdbusmenu-gtk3-16.04.0-21.fc38.x86_64 libdrm-2.4.114-2.fc38.x86_64 libedit-3.1-45.20221030cvs.fc38.x86_64 libepoxy-1.5.10-3.fc38.x86_64 libffi-3.4.4-2.fc38.x86_64 libgcc-13.0.1-0.12.fc38.x86_64 libglvnd-1.6.0-2.fc38.x86_64 libjpeg-turbo-2.1.4-2.fc38.x86_64 libmount-2.38.1-4.fc38.x86_64 libpciaccess-0.16-8.fc38.x86_64 libpng-1.6.37-14.fc38.x86_64 libstdc++-13.0.1-0.12.fc38.x86_64 libthai-0.1.29-4.fc38.x86_64 libtracker-sparql-3.5.0-1.fc38.x86_64 libwayland-client-1.22.0-1.fc38.x86_64 libwayland-cursor-1.22.0-1.fc38.x86_64 libwayland-egl-1.22.0-1.fc38.x86_64 libwayland-server-1.22.0-1.fc38.x86_64 libxcb-1.13.1-11.fc38.x86_64 libxkbcommon-1.5.0-2.fc38.x86_64 libxshmfence-1.3-12.fc38.x86_64 libzstd-1.5.5-1.fc38.x86_64 llvm-libs-16.0.0-2.fc38.x86_64 mesa-libEGL-23.0.2-2.fc38.x86_64 mesa-libgbm-23.0.2-2.fc38.x86_64 pango-1.50.14-1.fc38.x86_64 pixman-0.42.2-1.fc38.x86_64 sqlite-libs-3.40.1-2.fc38.x86_64 xz-libs-5.4.1-1.fc38.x86_64 zlib-1.2.13-3.fc38.x86_64
(gdb) bt
#0 0x00007ffff68cc3a9 in wl_list_insert () at /lib64/libwayland-client.so.0
#1 0x00007ffff68cdb7a in wl_display_read_events () at /lib64/libwayland-client.so.0
#2 0x000055555644ec70 in wayland_client::imp::event_queue::EventQueueInner::read_events (self=0x5555567e1160) at src/native_lib/event_queue.rs:118
#3 wayland_client::event_queue::ReadEventsGuard::read_events (self=...) at src/event_queue.rs:264
#4 0x0000555555e9ba2c in smithay_client_toolkit::event_loop::{impl#1}::process_events::{closure#0}<calloop::sources::{impl#4}::process_events::{closure_env#0}<winit::platform_impl::platform::wayland::event_loop::state::WinitState, smithay_client_toolkit::event_loop::WaylandSource, winit::platform_impl::platform::wayland::event_loop::{impl#1}::new::{closure_env#0}<eframe::native::run::UserEvent>>> () at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/smithay-client-toolkit-0.16.0/src/event_loop.rs:88
#5 calloop::sources::generic::{impl#2}::process_events<i32, std::io::error::Error, smithay_client_toolkit::event_loop::{impl#1}::process_events::{closure_env#0}<calloop::sources::{impl#4}::process_events::{closure_env#0}<winit::platform_impl::platform::wayland::event_loop::state::WinitState, smithay_client_toolkit::event_loop::WaylandSource, winit::platform_impl::platform::wayland::event_loop::{impl#1}::new::{closure_env#0}<eframe::native::run::UserEvent>>>>
(self=<optimized out>, readiness=..., token=..., callback=...) at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/calloop-0.10.5/src/sources/generic.rs:121
#6 0x0000555555e7a98d in smithay_client_toolkit::event_loop::{impl#1}::process_events<calloop::sources::{impl#4}::process_events::{closure_env#0}<winit::platform_impl::platform::wayland::event_loop::state::WinitState, smithay_client_toolkit::event_loop::WaylandSource, winit::platform_impl::platform::wayland::event_loop::{impl#1}::new::{closure_env#0}<eframe::native::run::UserEvent>>> (self=<optimized out>, callback=..., readiness=..., token=...)
at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/smithay-client-toolkit-0.16.0/src/event_loop.rs:84
#7 calloop::sources::{impl#4}::process_events<winit::platform_impl::platform::wayland::event_loop::state::WinitState, smithay_client_toolkit::event_loop::WaylandSource, winit::platform_impl::platform::wayland::event_loop::{impl#1}::new::{closure_env#0}<eframe::native::run::UserEvent>> (self=<optimized out>, readiness=..., token=..., data=<optimized out>) at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/calloop-0.10.5/src/sources/mod.rs:305
#8 0x0000555555e78456 in calloop::loop_logic::EventLoop<winit::platform_impl::platform::wayland::event_loop::state::WinitState>::dispatch_events<winit::platform_impl::platform::wayland::event_loop::state::WinitState>
(self=0x5555567e8ce0, timeout=..., data=0x5555567e8d88) at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/calloop-0.10.5/src/loop_logic.rs:300
#9 0x0000555555e7907c in calloop::loop_logic::EventLoop<winit::platform_impl::platform::wayland::event_loop::state::WinitState>::dispatch<winit::platform_impl::platform::wayland::event_loop::state::WinitState, core::option::Option<core::time::Duration>>
(self=0x5555567e8ce0, timeout=..., data=0x5555567e8d88) at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/calloop-0.10.5/src/loop_logic.rs:415
#10 0x0000555555e86fad in winit::platform_impl::platform::wayland::event_loop::EventLoop<eframe::native::run::UserEvent>::loop_dispatch<eframe::native::run::UserEvent, core::option::Option<core::time::Duration>> (self=<optimized out>, timeout=...)
at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.28.3/src/platform_impl/linux/wayland/event_loop/mod.rs:598
#11 winit::platform_impl::platform::wayland::event_loop::EventLoop<eframe::native::run::UserEvent>::run_return<eframe::native::run::UserEvent, eframe::native::run::run_and_return::{closure_env#0}<eframe::native::run::glow_integration::GlowWinitApp>>
(self=<optimized out>, callback=...) at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.28.3/src/platform_impl/linux/wayland/event_loop/mod.rs:327
#12 0x0000555555ea41de in winit::platform_impl::platform::EventLoop<eframe::native::run::UserEvent>::run_return<eframe::native::run::UserEvent, eframe::native::run::run_and_return::{closure_env#0}<eframe::native::run::glow_integration::GlowWinitApp>>
(self=0x7ffff5e45b68, callback=...) at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.28.3/src/platform_impl/linux/mod.rs:785
#13 winit::platform::run_return::{impl#0}::run_return<eframe::native::run::UserEvent, eframe::native::run::run_and_return::{closure_env#0}<eframe::native::run::glow_integration::GlowWinitApp>> (self=0x7ffff5e45b68, event_handler=...)
at /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.28.3/src/platform/run_return.rs:51
#14 eframe::native::run::run_and_return<eframe::native::run::glow_integration::GlowWinitApp> (event_loop=0x7ffff5e45b68, winit_app=...) at src/native/run.rs:132
#15 eframe::native::run::glow_integration::run_glow::{closure#0} (event_loop=0x7ffff5e45b68, native_options=<error reading variable: Cannot access memory at address 0x0>) at src/native/run.rs:1038
#16 eframe::native::run::with_event_loop::{closure#0}<core::result::Result<(), eframe::Error>, eframe::native::run::glow_integration::run_glow::{closure_env#0}> (event_loop=<optimized out>) at src/native/run.rs:116
#17 std::thread::local::LocalKey<core::cell::RefCell<core::option::Option<winit::event_loop::EventLoop<eframe::native::run::UserEvent>>>>::try_with<core::cell::RefCell<core::option::Option<winit::event_loop::EventLoop<eframe::native::run::UserEvent>>>, eframe::native::run::with_event_loop::{closure_env#0}<core::result::Result<(), eframe::Error>, eframe::native::run::glow_integration::run_glow::{closure_env#0}>, core::result::Result<(), eframe::Error>> (self=<optimized out>, f=...)
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/thread/local.rs:445
#18 std::thread::local::LocalKey<core::cell::RefCell<core::option::Option<winit::event_loop::EventLoop<eframe::native::run::UserEvent>>>>::with<core::cell::RefCell<core::option::Option<winit::event_loop::EventLoop<eframe::native::run::UserEvent>>>, eframe::native::run::with_event_loop::{closure_env#0}<core::result::Result<(), eframe::Error>, eframe::native::run::glow_integration::run_glow::{closure_env#0}>, core::result::Result<(), eframe::Error>> (self=<optimized out>, f=...)
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/thread/local.rs:421
#19 0x0000555555ed0134 in eframe::native::run::with_event_loop<core::result::Result<(), eframe::Error>, eframe::native::run::glow_integration::run_glow::{closure_env#0}> (f=..., native_options=<error reading variable: Cannot access memory at address 0x0>)
at src/native/run.rs:109
#20 eframe::native::run::glow_integration::run_glow (app_name=..., native_options=..., app_creator=...) at src/native/run.rs:1035
#21 0x0000555555ed7fb3 in eframe::run_native (app_name=..., native_options=..., app_creator=...) at src/lib.rs:161
#22 0x0000555555b37287 in rog_control_center::start_app (states=..., native_options=...) at rog-control-center/src/main.rs:254
#23 rog_control_center::main () at rog-control-center/src/main.rs:197
#24 0x0000555555b31b36 in core::ops::function::FnOnce::call_once<fn() -> core::result::Result<(), rog_control_center::error::Error>, ()> () at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248
#25 std::sys_common::backtrace::__rust_begin_short_backtrace<fn() -> core::result::Result<(), rog_control_center::error::Error>, core::result::Result<(), rog_control_center::error::Error>> (f=0x5555570161c0)
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:122
#26 0x0000555555b31fd5 in std::rt::lang_start::{closure#0}<core::result::Result<(), rog_control_center::error::Error>> () at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/rt.rs:166
#27 0x000055555657698f in core::ops::function::impls::{impl#2}::call_once<(), (dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe)> () at library/core/src/ops/function.rs:283
#28 std::panicking::try::do_call<&(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe), i32> () at library/std/src/panicking.rs:492
#29 std::panicking::try<i32, &(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe)> () at library/std/src/panicking.rs:456
#30 std::panic::catch_unwind<&(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe), i32> () at library/std/src/panic.rs:137
#31 std::rt::lang_start_internal::{closure#2} () at library/std/src/rt.rs:148
#32 std::panicking::try::do_call<std::rt::lang_start_internal::{closure_env#2}, isize> () at library/std/src/panicking.rs:492
#33 std::panicking::try<isize, std::rt::lang_start_internal::{closure_env#2}> () at library/std/src/panicking.rs:456
#34 std::panic::catch_unwind<std::rt::lang_start_internal::{closure_env#2}, isize> () at library/std/src/panic.rs:137
#35 std::rt::lang_start_internal () at library/std/src/rt.rs:148
#36 0x0000555555b38bbf in main ()
#37 0x00007ffff6d2cb4a in __libc_start_call_main () at /lib64/libc.so.6
#38 0x00007ffff6d2cc0b in __libc_start_main_impl () at /lib64/libc.so.6
#39 0x0000555555b2f6f5 in _start ()
(gdb) q
A debugging session is active.
Desktop Operating System: Fedora Linux 38 KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.105.0 Qt Version: 5.15.9 Kernel Version: 6.3.0-0.rc7.20230420gitcb0856346a60.59.fc38.x86_64 (64-bit) Graphics Platform: Wayland Processors: 20 × 12th Gen Intel® Core™ i9-12900H Memory: 31.0 GiB of RAM Graphics Processor: Mesa Intel® Graphics System Version: 1.0
As I know which commit was good, I should be able to work from there with a git bisect and the serial-windows example.
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 2
- Comments: 15 (6 by maintainers)
@margual56 , you’re right it looks like it’s a different issue. I’ll do a few tests on different WM with different GPU and see if I can narrow it down. I’ll post a new issue when I have more of an idea of what triggers it.
It does fix the issue for me. Just had to specify
eframe = { git = "https://github.com/emilk/egui.git" }inCargo.toml. Crashing resolved, and “…still attached” lines gone from log.