App becomes unresponsive and eventually freezes
Is there an existing issue for this?
- [x] I have searched the existing issues.
What's the problem?
The application was very slow and laggy at first. The hover effect of the buttons was several seconds behind where my cursor was. This got worse and it eventually froze and stopped responding completely.
How did you install the app?
downloaded one of the provided packages
Operating System
Linux
Additional context
I'm using OpenSUSE Linux and started it with sudo -E Sniffnet_LinuxAppImage_amd64.AppImage because of #686 (sudo setcap cap_net_raw,cap_net_admin=eip <your/Sniffnet/executable/path> did not work).
Operating System: openSUSE Tumbleweed 20260103 KDE Plasma Version: 6.5.4 KDE Frameworks Version: 6.21.0 Qt Version: 6.10.1 Kernel Version: 6.14.6-1-default (64-bit) Graphics Platform: Wayland
Can you try running it with the environment variable ICED_BACKEND set to wgpu and tiny-skia and see if one of the two works?
The hover lag is present with both wgpu and tiny-skia. It's not that clear in the videos, but you can see it hang every once in a while when looking closely.
https://github.com/user-attachments/assets/ac6ed998-e4d4-4f0b-815c-94cd15c129cf
https://github.com/user-attachments/assets/a5ae54eb-23e4-4e3c-8c77-fa00187cffa2
I'm now running it with wgpu to see if it freezes again.
EDIT: The UI doesn't freeze, but it does appear to stop capturing any traffic after a couple seconds. I can navigate Wikipedia without it registering any traffic.
https://github.com/user-attachments/assets/00e57144-a563-4072-b59e-6b10fa24be76
Pausing and unpausing doesn't help
Thanks for sharing additional infos. This is really weird. Even if traffic isn't captured, the chart should still update to show that no packets were captured, while in your case it's completely stuck. Given this and the fact that there's noticeable lag, I believe this isn't a problem in the networking logic but rather it's an issue of your graphical drivers not being properly supported by the GUI toolkit Sniffnet relies on (iced). You mentioned you're on openSUSE which might not receive first class support from it. If you have Rust installed and can compile and run one of their examples it'd be awesome, so that we can be sure that the problem is indeed on their side.
Can you also tell me if there's any output in your terminal when you run Sniffnet?
Given this and the fact that there's noticeable lag, I believe this isn't a problem in the networking logic but rather it's an issue of your graphical drivers not being properly supported by the GUI toolkit Sniffnet relies on (iced).
I considered that too, but I can switch between bits and bytes representation which does update the graph (see start of nothing_captured.webm). There is also a delay after pressing start (which is processed by the UI) which leads me to believe it's not just an issue with iced.
I'll try the iced example to know for sure
The iced examples (counter, stopwatch, solar_system) work fine
I really don't know, I've tested Sniffnet on macOS, Linux (Debian and Fedora), and Windows and never noticed delays and freezes.
The fact that the charts stop updating and you can still update data representation and other interactions with the UI can only mean that the thread parsing packets panicked, but that would leave some trace in stderr / stdout.
I've left it running for over an hour now, and it still seems to work. I have no clue what triggered the freeze. I'm seeing nothing in the console except the banner.
The input lag issue is still an issue. It doesn't seem to be caused by system resource usage, since my CPU usage is around 2% and GPU is at 1%.
Nice, interesting, and even weirder.
Another thing I forgot to mention is that you were facing the other sudo setcap issue because you're running from an AppImage which is a self-contained unit of execution that in fact requires sudo -E to run. On my Linux tests I've also tested the AppImage and it was working fine, but that is another possible layer that could add problems in your case.
NOTE: Since you were able to run the iced example I assume that you have rust installed, therefor you can try running cargo run --release from the main branch of this repo. This will also let you use the latest version of iced i migrated to a couple weeks ago.