Giter VIP home page Giter VIP logo

Comments (9)

wofwofwof avatar wofwofwof commented on May 18, 2024 1

Hello GyulyVGC,

thanks a lot for your help, now it works.

I think the reason for the crash was that vulkan was installed, but not with support for X. I think wgpu has only detected the vulkan driver but not that it doesn't work so it hasn't used OpenGL. After adding "media-libs/vulkan-loader X" to my use flags it starts and works. For the start the XDG_RUNTIME_DIR doesn't matter.

from sniffnet.

GyulyVGC avatar GyulyVGC commented on May 18, 2024

Try with

echo "XDG_RUNTIME_DIR=/run/user/<YOURID>" >> ~/.pam_environment

where <YOURID> is the output of id -u

from sniffnet.

wofwofwof avatar wofwofwof commented on May 18, 2024

Hello GyulyVGC,

thank you very much for your help.

I've tried:

% sudo sh -c "id -u; echo "XDG_RUNTIME_DIR=/run/user/0"; /home/myuser/.cargo/bin/sniffnet"
0
XDG_RUNTIME_DIR=/run/user/0
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/myuser/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-core-0.12.2/src/hub.rs:960:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
% cat ~/.pam_environment
XDG_RUNTIME_DIR=/run/user/0

I also tried to set the uid to 1000 as this is my user without sudo, but the result is the same. I've also tried to set the .pam_environment to /root/.pam_environment, but it doesn't work, too.

from sniffnet.

GyulyVGC avatar GyulyVGC commented on May 18, 2024

Looking online I saw a bunch of discussions mentioning this problem, try checking this one for instance.

Keep me updated!

from sniffnet.

wofwofwof avatar wofwofwof commented on May 18, 2024

Hello GyulyVGC,

The thread you've linked seems to have the problem of missing entries for the XDG_RUNTIME_DIR variable.
I've tried a few things:

% sudo bash
# export XDG_RUNTIME_DIR=/run/user/0
# RUST_BACKTRACE=full /home/myuser/.cargo/bin/sniffnet
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/myuser/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-core-0.12.2/src/hub.rs:960:9
stack backtrace:
   0:     0x5578cd61d2c0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h591808416c41e0db
   1:     0x5578cd3b06be - core::fmt::write::h32120f18eb099fb0
   2:     0x5578cd5f4c04 - std::io::Write::write_fmt::h5120f968441dcf61
   3:     0x5578cd61e6e3 - std::panicking::default_hook::{{closure}}::ha3b399c84dfd3950
   4:     0x5578cd61e39b - std::panicking::default_hook::h23c1de61997507b7
   5:     0x5578cd59132e - sniffnet::main::{{closure}}::h2c85f031d1de39f3
   6:     0x5578cd61f37b - std::panicking::rust_panic_with_hook::hf54f54e71167af35
   7:     0x5578cd61f1b3 - std::panicking::begin_panic_handler::{{closure}}::h507de2259e8e1ea3
   8:     0x5578cd61f14c - std::sys_common::backtrace::__rust_end_short_backtrace::h9db799e5e5917087
   9:     0x5578cd61f121 - rust_begin_unwind
  10:     0x5578cd313db2 - core::panicking::panic_fmt::h597fac4e15471a4b
  11:     0x5578cd313eac - core::panicking::panic::h1f1b2313b7733f31
  12:     0x5578cd53e552 - futures_executor::local_pool::block_on::h5e774598ae7dfe12
  13:     0x5578cd34c218 - iced_winit::application::run::he46ceeedf6e69262
  14:     0x5578cd5903f6 - sniffnet::main::h741f633be61b02cc
  15:     0x5578cd5a7b83 - std::sys_common::backtrace::__rust_begin_short_backtrace::h74c5e3cdc50ff1e7
  16:     0x5578cd58f06c - main
  17:     0x7f69ad5e634c - <unknown>
  18:     0x7f69ad5e63fc - __libc_start_main
  19:     0x5578cd33bac1 - _start
  20:                0x0 - <unknown>

Do you have any other idea how I can debug that problem?

Thank you very much.

from sniffnet.

GyulyVGC avatar GyulyVGC commented on May 18, 2024

In the next days I'll do more careful researches.

In the meantime, let me know if you manage to fix the issue.

from sniffnet.

GyulyVGC avatar GyulyVGC commented on May 18, 2024

Can you try doing sudo apt-get install xdg-utils --fix-missing, closing the shell and opening Sniffnet from a new shell?

Also try checking issue #23. It has the same error message when trying to push a button after the application is started. I don’t think it’s much related even if the error is the same, but who knows.

from sniffnet.

wofwofwof avatar wofwofwof commented on May 18, 2024

Can you try doing sudo apt-get install xdg-utils --fix-missing, closing the shell and opening Sniffnet from a new shell?

I've reinstalled xdg-utils (emerge -av xdg-utils as it is gentoo) and opened a new shell but it doesn't change anything.

Also try checking issue #23. It has the same error message when trying to push a button after the application is started. I don’t think it’s much related even if the error is the same, but who knows.

I don't think the problem is with xdg-utils. If I use

export XDG_RUNTIME_DIR=/run/user/0

the XDG_RUNTIME_DIR is not shown anymore. I still get only a glimps of the frame of the application, and then it crashes with the above error message. The libpcap-dev is installed. Is there a dependency that you use for the graphic that is missing? As I use gentoo and not a debian distribution maybe there is some difference here?

from sniffnet.

GyulyVGC avatar GyulyVGC commented on May 18, 2024

Actually yes and that may be the problem.
The GUI library I used relies on wgpu and here you can find the supported platforms.

from sniffnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.