GyulyVGC / sniffnet

Comfortably monitor your Internet traffic 🕵️‍♂️
https://sniffnet.net
Apache License 2.0
18.59k stars 558 forks source link

Start Panic Failed to call XMapRaised: XError { description: "BadMatch (invalid parameter attributes)", error_code: 8, request_code: 149, minor_code: 4 } #593

Closed shenshouer closed 3 months ago

shenshouer commented 3 months ago

Is there an existing issue for this?

What's the problem?

Panic when start app

Both from deb package and cargo install

$ sudo RUST_BACKTRACE=full sniffnet 

  /---------------------------------------------------------\
 |     _____           _    __    __                  _      |
 |    / ____|         (_)  / _|  / _|                | |     |
 |   | (___    _ __    _  | |_  | |_   _ __     ___  | |_    |
 |    \___ \  | '_ \  | | |  _| |  _| | '_ \   / _ \ | __|   |
 |    ____) | | | | | | | | |   | |   | | | | |  __/ | |_    |
 |   |_____/  |_| |_| |_| |_|   |_|   |_| |_|  \___|  \__|   |
 |                                                           |
 |                   ___________                             |
 |                  /___________\                            |
 |                 | ___________ |                           |
 |                 | |         | |                           |
 |                 | | v1.3.1  | |                           |
 |                 | |_________| |________________________   |
 |                 \_____________/   by Giuliano Bellini  )  |
 |                 / ''''''''''' \                       /   |
 |                / ::::::::::::: \                  =D-'    |
 |               (_________________)                         |
  \_________________________________________________________/
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/x11/window.rs:1208:18:
Failed to call XMapRaised: XError { description: "BadMatch (invalid parameter attributes)", error_code: 8, request_code: 149, minor_code: 4 }
stack backtrace:
   0:     0x65035aeb1ea2 - <unknown>
   1:     0x65035a810ccb - <unknown>
   2:     0x65035ae82f52 - <unknown>
   3:     0x65035aeb7849 - <unknown>
   4:     0x65035aeb706e - <unknown>
   5:     0x65035aeb6b89 - <unknown>
   6:     0x65035adf096e - <unknown>
   7:     0x65035aeb7e1d - <unknown>
   8:     0x65035aeb7bb2 - <unknown>
   9:     0x65035aeb7b09 - <unknown>
  10:     0x65035aeb7af6 - <unknown>
  11:     0x65035a735052 - <unknown>
  12:     0x65035a7354a5 - <unknown>
  13:     0x65035ad85826 - <unknown>
  14:     0x65035ad7dc1e - <unknown>
  15:     0x65035a7b0535 - <unknown>
  16:     0x65035ad6f334 - <unknown>
  17:     0x65035adee784 - <unknown>
  18:     0x65035adcb3e3 - <unknown>
  19:     0x65035adec004 - <unknown>
  20:     0x754c9e629d90 - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  21:     0x754c9e629e40 - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:392:3
  22:     0x65035a795aae - <unknown>
  23:                0x0 - <unknown>

How did you install the app?

downloaded one of the provided packages

Operating System

Linux

Additional context

Operating System: Ubuntu 22.04.4 LTS              
          Kernel: Linux 6.8.0-40-generic
    Architecture: x86-64
 Hardware Vendor: Dell Inc.
  Hardware Model: Precision 3640 Tower
GyulyVGC commented 3 months ago

Hi @shenshouer, browsing online (https://github.com/iced-rs/iced/issues/2314) I found that this seems to be related with Vulkan settings. You can try to follow the suggestions from that link and see if it works.

Alternatively, you can try setting the environment variable ICED_BACKEND=tiny-skia.

Let me know if you have news.

shenshouer commented 3 months ago

The same issue with ENV

# ICED_BACKEND=tiny-skia sniffnet 

  /---------------------------------------------------------\
 |     _____           _    __    __                  _      |
 |    / ____|         (_)  / _|  / _|                | |     |
 |   | (___    _ __    _  | |_  | |_   _ __     ___  | |_    |
 |    \___ \  | '_ \  | | |  _| |  _| | '_ \   / _ \ | __|   |
 |    ____) | | | | | | | | |   | |   | | | | |  __/ | |_    |
 |   |_____/  |_| |_| |_| |_|   |_|   |_| |_|  \___|  \__|   |
 |                                                           |
 |                   ___________                             |
 |                  /___________\                            |
 |                 | ___________ |                           |
 |                 | |         | |                           |
 |                 | | v1.3.1  | |                           |
 |                 | |_________| |________________________   |
 |                 \_____________/   by Giuliano Bellini  )  |
 |                 / ''''''''''' \                       /   |
 |                / ::::::::::::: \                  =D-'    |
 |               (_________________)                         |
  \_________________________________________________________/
thread 'main' panicked at /home/runner/.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: "/home/runner/.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
shenshouer commented 3 months ago

@GyulyVGC Worked fine with ENV

VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json VK_LAYER_PATH=/usr/share/vulkan/explicit_layer.d sniffnet
GyulyVGC commented 3 months ago

Awesome 🎉