sniffnet
sniffnet copied to clipboard
Create event loop panicked (`winit`)
Is there an existing issue for this?
- [X] I have searched the existing issues.
What's the problem?
latest release on crates and brew:
thread 'main' panicked at /home/linuxbrew/.cache/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.12.2/src/application.rs:119:10:
Create event loop: NotSupported(NotSupportedError)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
How did you install the app?
installed from crates.io
Operating System
Linux
Additional context
No response
Hey @ngmisl, this seems to be an upstream issue.
The program is crashing at this line of the iced_winit dependency.
And this is the method that's causing the crash.
It's pretty weird that you're the first one to face this problem. Can you please provide me with additional information about your OS and environment?
You also may find useful the following issue: https://github.com/rust-windowing/winit/issues/3603
Hi,
I use linux
I'd need some more info:
- Distribution
- Architecture
- Window system
I also encountered the same problem。 OS:ubuntu 22.04.4
sniffnet version: 1.3.1
Installation method:cargo install sniffnet --locked
start sniffnet error,
message:
thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.12.2/src/application.rs:119:10:
Create event loop: Os(OsError { line: 786, file: "/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/mod.rs", error: Misc("neither WAYLAND_DISPLAY nor WAYLAND_SOCKET nor DISPLAY is set.") })
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
After configuring environment variables env setup: export WAYLAND_DISPLAY=wayland-0 export WAYLAND_SOCKET=/run/user/1000/wayland-0 export DISPLAY=:0
error message:
thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.12.2/src/application.rs:119:10:
Create event loop: Os(OsError { line: 80, file: "/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/wayland/event_loop/mod.rs", error: WaylandError(Connection(InvalidFd)) })
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
I've also encountered the same problem.
Same here on Arch Linux with Gnome (Wayland):
thread 'main' panicked at /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.12.2/src/application.rs:119:10:
Create event loop: Os(OsError { line: 80, file: "/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/wayland/event_loop/mod.rs", error: WaylandError(Connection(NoCompositor)) })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Same there on Arch Linux
- kernel : Linux 6.12.10-arch1-1
- architecture: x86_64
FYI - command and logs
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json && RUST_BACKTRACE=full && ./target/debug/sniffnet
/---------------------------------------------------------\
| _____ _ __ __ _ |
| / ____| (_) / _| / _| | | |
| | (___ _ __ _ | |_ | |_ _ __ ___ | |_ |
| \___ \ | '_ \ | | | _| | _| | '_ \ / _ \ | __| |
| ____) | | | | | | | | | | | | | | | | __/ | |_ |
| |_____/ |_| |_| |_| |_| |_| |_| |_| \___| \__| |
| |
| ___________ |
| /___________\ |
| | ___________ | |
| | | | | |
| | | v1.3.2 | | |
| | |_________| |________________________ |
| \_____________/ by Giuliano Bellini ) |
| / ''''''''''' \ / |
| / ::::::::::::: \ =D-' |
| (_________________) |
\_________________________________________________________/
thread 'main' panicked at /home/yoonyoul/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.13.0/src/program.rs:192:10:
Create event loop: Os(OsError { line: 764, file: "/home/yoonyoul/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.30.8/src/platform_impl/linux/mod.rs", error: Misc("neither WAYLAND_DISPLAY nor WAYLAND_SOCKET nor DISPLAY is set.") })
stack backtrace:
0: 0x5fcec8c92aaa - std::backtrace_rs::backtrace::libunwind::trace::hfe0e1def394da018
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
1: 0x5fcec8c92aaa - std::backtrace_rs::backtrace::trace_unsynchronized::h96fbb6d117554616
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x5fcec8c92aaa - std::sys::backtrace::_print_fmt::he1169c6f8956325b
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/sys/backtrace.rs:66:9
3: 0x5fcec8c92aaa - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::ha4a311b32f6b4ad8
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/sys/backtrace.rs:39:26
4: 0x5fcec8cbfeb3 - core::fmt::rt::Argument::fmt::h8ccd2627d2418ed3
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/fmt/rt.rs:177:76
5: 0x5fcec8cbfeb3 - core::fmt::write::h1866771663f62b81
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/fmt/mod.rs:1189:21
6: 0x5fcec8c8df43 - std::io::Write::write_fmt::hb549e7444823135e
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/io/mod.rs:1884:15
7: 0x5fcec8c928f2 - std::sys::backtrace::BacktraceLock::print::hddd3a9918ce29aa7
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/sys/backtrace.rs:42:9
8: 0x5fcec8c93d7d - std::panicking::default_hook::{{closure}}::h791f75256b902d7d
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:268:22
9: 0x5fcec8c93bc3 - std::panicking::default_hook::h82cc572fcb0d8cd7
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:295:9
10: 0x5fcec6625863 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h40313a42a98921c4
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/alloc/src/boxed.rs:1986:9
11: 0x5fcec675b5f3 - sniffnet::main::{{closure}}::h84efd767195307df
at /home/yoonyoul/apps/sniffnet/src/main.rs:81:9
12: 0x5fcec8c94428 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h80408f032954f187
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/alloc/src/boxed.rs:1986:9
13: 0x5fcec8c94428 - std::panicking::rust_panic_with_hook::he21644cc2707f2c4
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:809:13
14: 0x5fcec8c941ea - std::panicking::begin_panic_handler::{{closure}}::h42f7c414fed3cad9
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:674:13
15: 0x5fcec8c92f89 - std::sys::backtrace::__rust_end_short_backtrace::ha26cf5766b4e8c65
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/sys/backtrace.rs:170:18
16: 0x5fcec8c93e7c - rust_begin_unwind
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:665:5
17: 0x5fcec63ca290 - core::panicking::panic_fmt::h74866b78e934b1c0
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/panicking.rs:76:14
18: 0x5fcec63ca776 - core::result::unwrap_failed::h899ed7ab2ccb8159
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/result.rs:1699:5
19: 0x5fcec6570cc0 - core::result::Result<T,E>::expect::hdd5510aac3b02041
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/result.rs:1061:23
20: 0x5fcec679792c - iced_winit::program::run::hfc3af38fa9b237df
at /home/yoonyoul/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.13.0/src/program.rs:190:22
21: 0x5fcec665a6c6 - iced::program::Program::run_with::h679dca1f86bfc1e0
at /home/yoonyoul/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced-0.13.1/src/program.rs:177:12
22: 0x5fcec64e3c1b - iced::application::Application<P>::run_with::hcbfd0eafc2f11cda
at /home/yoonyoul/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced-0.13.1/src/application.rs:176:9
23: 0x5fcec66aba53 - sniffnet::main::h6296445f46eff2f3
at /home/yoonyoul/apps/sniffnet/src/main.rs:103:5
24: 0x5fcec63ed9a2 - core::ops::function::FnOnce::call_once::h264ca52729ab3029
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/ops/function.rs:250:5
25: 0x5fcec67d4015 - std::sys::backtrace::__rust_begin_short_backtrace::h5d30cbc4fe4b2bed
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/sys/backtrace.rs:154:18
26: 0x5fcec6739ee6 - std::rt::lang_start::{{closure}}::h25a43355a7a53e31
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/rt.rs:195:18
27: 0x5fcec8c85837 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h39b9ecdfe07c1b40
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/ops/function.rs:284:13
28: 0x5fcec8c85837 - std::panicking::try::do_call::h195dec19c0e8d555
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:557:40
29: 0x5fcec8c85837 - std::panicking::try::h140b43e48373b310
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:520:19
30: 0x5fcec8c85837 - std::panic::catch_unwind::h82ff8b15455474e8
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panic.rs:358:14
31: 0x5fcec8c85837 - std::rt::lang_start_internal::{{closure}}::h68d9606a782b08fd
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/rt.rs:174:48
32: 0x5fcec8c85837 - std::panicking::try::do_call::h9b1efbc7212cd607
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:557:40
33: 0x5fcec8c85837 - std::panicking::try::h3c3a9bacfbed2ee5
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:520:19
34: 0x5fcec8c85837 - std::panic::catch_unwind::h92cc37461d0f445d
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panic.rs:358:14
35: 0x5fcec8c85837 - std::rt::lang_start_internal::h78dd36c15a6b42b8
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/rt.rs:174:20
36: 0x5fcec6739eba - std::rt::lang_start::h047b6b9b699967ab
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/rt.rs:194:17
37: 0x5fcec66abc8e - main
38: 0x7294506cae08 - <unknown>
39: 0x7294506caecc - __libc_start_main
40: 0x5fcec63cac75 - _start
41: 0x0 - <unknown>
Oh.. I was stupid. Please ignore previous my comments. My Arch Linux was sever profiled, which does not have any GUI. So I installed and set up KDE plasma. After that I can see sniffnet is up and running. :)
after the installation and setup, I checked the value from $XDG_SESSION_TYPE. that is wayland. :)
My reference for installation and setup KDE Plasma is https://itsfoss.com/install-kde-arch-linux/
Hey guys, a new version 1.3.2 was released the last month.
Can you please try running it and let me know if the problem was fixed?
If it still doesn't work, try setting the environment variable ICED_BACKEND=tiny-skia and run the app.
Hey guys, a new version 1.3.2 was released the last month.
Can you please try running it and let me know if the problem was fixed?
If it still doesn't work, try setting the environment variable ICED_BACKEND=tiny-skia and run the app.
It was definitely fixed for me in the latest version. I can now inspect any adapters or specific hosts and nothing crashes anymore.
Awesome 🎉