Chleba / netscanner

Terminal Network scanner & diagnostic tool with modern TUI
MIT License
865 stars 20 forks source link

Crash Report #26

Closed DominicOrsi closed 6 months ago

DominicOrsi commented 6 months ago

Hello, below you will see the crash report I got when running netscanner on Arch Linux. This does seem to be a ratatui issue though from the the location I was given.

"name" = "netscanner"
"operating_system" = "Arch Linux [64-bit]"
"crate_version" = "0.4.4"
"explanation" = """
Panic occurred in file '/home/dominic/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.2/src/text/line.rs' at line 477
"""
"cause" = "byte index 9 is not a char boundary; it is inside '▨' (bytes 8..11) of `(-13)▨▨▨▨▨▨▨▨▨▨`"
"method" = "Panic"
"backtrace" = """

   0: 0x6498d4c3bb13 - core::str::slice_error_fail_rt::hae2b0a3e014351e1
   1: 0x6498d484bc17 - core::str::slice_error_fail::he2ff12236fb0c056
   2: 0x6498d4ba55cd - <ratatui::text::line::Line as ratatui::widgets::WidgetRef>::render_ref::hf85b3ce30e249d1e
   3: 0x6498d4ba49dc - <ratatui::text::text::Text as ratatui::widgets::WidgetRef>::render_ref::h4311ee12ca8cb2b8
   4: 0x6498d4ba4737 - <ratatui::text::text::Text as ratatui::widgets::Widget>::render::h27d3ee0b70273775
   5: 0x6498d4bab305 - <ratatui::widgets::table::table::Table as ratatui::widgets::StatefulWidgetRef>::render_ref::h2553aac80eea5d15
   6: 0x6498d4ba9f74 - <ratatui::widgets::table::table::Table as ratatui::widgets::Widget>::render::h6867d16e7531d857
   7: 0x6498d48e08f5 - <netscanner::components::wifi_scan::WifiScan as netscanner::components::Component>::draw::h5fcba14db8b0fd25
   8: 0x6498d4894d6f - ratatui::terminal::terminal::Terminal<B>::draw::h63672dac935d5885
   9: 0x6498d48d152a - tokio::runtime::park::CachedParkThread::block_on::hc746d3a3333158cc
  10: 0x6498d48517a5 - netscanner::main::h53cae8b28baf63b7
  11: 0x6498d4886a43 - std::sys_common::backtrace::__rust_begin_short_backtrace::hccb5716a323ff96c
  12: 0x6498d488ea4d - std::rt::lang_start::{{closure}}::h69b8d611fcb84024
  13: 0x6498d4bff691 - std::rt::lang_start_internal::h4d236095b69a230b
  14: 0x6498d48525f5 - main
  15: 0x7e177c586cd0 - <unresolved>
  16: 0x7e177c586d8a - __libc_start_main
  17: 0x6498d484bc45 - _start
  18:        0x0 - <unresolved>"""

Terminal report

Well, this is embarrassing.

netscanner had a problem and crashed. To help us diagnose the problem you can send us a crash report.

We have generated a report file at "/tmp/report-5621de57-1fdf-4eb7-88da-8cc74e646d05.toml". Submit an issue or email with the subject of "netscanner Crash Report" and include the report as an attachment.

- Homepage: https://github.com/Chleba/netscanner
- Authors: Chleba <chlebik@gmail.com>

We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports.

Thank you kindly!
The application panicked (crashed).
Message:  byte index 9 is not a char boundary; it is inside '▨' (bytes 8..11) of `(-13)▨▨▨▨▨▨▨▨▨▨`
Location: /home/dominic/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.2/src/text/line.rs:477

This is a bug. Consider reporting it at https://github.com/Chleba/netscanner
Chleba commented 6 months ago

Hi, This is my "widget" for signals. Thank You for this report. I assume that this signal strength for that WiFi network is very good, right? So that visualization will fail to draw because something is out of index.

DominicOrsi commented 6 months ago

Yes, WiFi signal is really good, as in right next to the router good.

Chleba commented 6 months ago

btw. @DominicOrsi - You may be right. Looking at the ratatui code, truncating line (I guess that window where netscanner is running is pretty small) have some issues with span content filled with unicode chars.

Chleba commented 6 months ago

Got it. It looks like my WiFi signal strength limit was badly set. I didn't count with a better signal value than -30. So here's the fix for that: https://github.com/Chleba/netscanner/commit/8db619c4bb566c5a3b1364493ccdada21ce977b2 Please wait for the next version v0.4.5, but I am in the middle of implementing the next big feature (open ports scanning), which I would like to put into it along with this fix. If You would try to build it from the source and give it a try, just let me know if that fixes it for You and go ahead and close this issue. It would be much appreciated. Thanks

DominicOrsi commented 6 months ago

I built from source and all seems to be working well. Thanks for fixing it so fast! Netscanner-WiFi-Signal