Closed teeratpitakrat closed 3 years ago
Can you please compile from source in debug mode (i.e. just cargo build
) and then post output of $ RUST_BACKTRACE=full <path-to-i3status-rs> config.toml
?
$ RUST_BACKTRACE=full ./i3status-rs config.toml
{"version": 1, "click_events": true}
[
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }', src/blocks/net.rs:668:60
stack backtrace:
0: 0x55cbbb418720 - std::backtrace_rs::backtrace::libunwind::trace::h90af754674ffafa4
at /build/rust/src/rustc-1.53.0-src/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
1: 0x55cbbb418720 - std::backtrace_rs::backtrace::trace_unsynchronized::hd35318b4e6e81148
at /build/rust/src/rustc-1.53.0-src/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x55cbbb418720 - std::sys_common::backtrace::_print_fmt::h7571a6f5687a20d1
at /build/rust/src/rustc-1.53.0-src/library/std/src/sys_common/backtrace.rs:67:5
3: 0x55cbbb418720 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he0119e0b769c2e9a
at /build/rust/src/rustc-1.53.0-src/library/std/src/sys_common/backtrace.rs:46:22
4: 0x55cbbb4405df - core::fmt::write::h2b69bbb8432077e1
at /build/rust/src/rustc-1.53.0-src/library/core/src/fmt/mod.rs:1094:17
5: 0x55cbbb4149b5 - std::io::Write::write_fmt::h46cf1a7fb24b0a65
at /build/rust/src/rustc-1.53.0-src/library/std/src/io/mod.rs:1584:15
6: 0x55cbbb41aa9b - std::sys_common::backtrace::_print::h78ae9eccd44fa022
at /build/rust/src/rustc-1.53.0-src/library/std/src/sys_common/backtrace.rs:49:5
7: 0x55cbbb41aa9b - std::sys_common::backtrace::print::h09e94b2c5bb4dae0
at /build/rust/src/rustc-1.53.0-src/library/std/src/sys_common/backtrace.rs:36:9
8: 0x55cbbb41aa9b - std::panicking::default_hook::{{closure}}::hfc3b9f31beb26f15
at /build/rust/src/rustc-1.53.0-src/library/std/src/panicking.rs:208:50
9: 0x55cbbb41a56d - std::panicking::default_hook::h24b36b429c561a5b
at /build/rust/src/rustc-1.53.0-src/library/std/src/panicking.rs:225:9
10: 0x55cbbb41b0bd - std::panicking::rust_panic_with_hook::hcd8fcee5516a9191
at /build/rust/src/rustc-1.53.0-src/library/std/src/panicking.rs:591:17
11: 0x55cbbb41ac47 - std::panicking::begin_panic_handler::{{closure}}::h19af3da01a9817bd
at /build/rust/src/rustc-1.53.0-src/library/std/src/panicking.rs:497:13
12: 0x55cbbb418bbc - std::sys_common::backtrace::__rust_end_short_backtrace::h0a6d1565730521c9
at /build/rust/src/rustc-1.53.0-src/library/std/src/sys_common/backtrace.rs:141:18
13: 0x55cbbb41aba9 - rust_begin_unwind
at /build/rust/src/rustc-1.53.0-src/library/std/src/panicking.rs:493:5
14: 0x55cbba84c661 - core::panicking::panic_fmt::h4cabb5e7744685f2
at /build/rust/src/rustc-1.53.0-src/library/core/src/panicking.rs:92:14
15: 0x55cbba84c753 - core::result::unwrap_failed::ha412bb7b0e63ae4c
at /build/rust/src/rustc-1.53.0-src/library/core/src/result.rs:1355:5
16: 0x55cbba900302 - core::result::Result<T,E>::unwrap::he20d9fb8ab64251c
at /build/rust/src/rustc-1.53.0-src/library/core/src/result.rs:1037:23
17: 0x55cbbac66001 - i3status_rs::blocks::net::decode_escaped_unicode::hcd6c88f4524b67ac
at /tmp/i3status-rust/src/blocks/net.rs:668:32
18: 0x55cbbac5d72d - i3status_rs::blocks::net::NetworkDevice::wifi_info::h75f1afc777660df1
at /tmp/i3status-rust/src/blocks/net.rs:178:55
19: 0x55cbbac6489c - <i3status_rs::blocks::net::Net as i3status_rs::blocks::Block>::update::h9b39e525b4eaf810
at /tmp/i3status-rust/src/blocks/net.rs:603:36
20: 0x55cbbaa3c19a - <i3status_rs::blocks::base_block::BaseBlock<T> as i3status_rs::blocks::Block>::update::h78949974ca266e3b
at /tmp/i3status-rust/src/blocks/base_block.rs:28:9
21: 0x55cbbabdefde - i3status_rs::scheduler::UpdateScheduler::do_scheduled_updates::hd7c39949c161a272
at /tmp/i3status-rust/src/scheduler.rs:107:32
22: 0x55cbbac77fff - i3status_rs::run::hf7bdd8b703c3c934
at /tmp/i3status-rust/src/main.rs:225:17
23: 0x55cbbac75e9b - i3status_rs::main::h35bc860824e7d247
at /tmp/i3status-rust/src/main.rs:117:25
24: 0x55cbbaba0efb - core::ops::function::FnOnce::call_once::hb4479b9a875f1b30
at /build/rust/src/rustc-1.53.0-src/library/core/src/ops/function.rs:227:5
25: 0x55cbbaa15a4e - std::sys_common::backtrace::__rust_begin_short_backtrace::h6b1e012f024705de
at /build/rust/src/rustc-1.53.0-src/library/std/src/sys_common/backtrace.rs:125:18
26: 0x55cbba882741 - std::rt::lang_start::{{closure}}::hed9be66ca3164534
at /build/rust/src/rustc-1.53.0-src/library/std/src/rt.rs:49:18
27: 0x55cbbb41b5ba - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h38252fcc236f7c8b
at /build/rust/src/rustc-1.53.0-src/library/core/src/ops/function.rs:259:13
28: 0x55cbbb41b5ba - std::panicking::try::do_call::h1ec5110d27df1229
at /build/rust/src/rustc-1.53.0-src/library/std/src/panicking.rs:379:40
29: 0x55cbbb41b5ba - std::panicking::try::h8d5e4776be23290c
at /build/rust/src/rustc-1.53.0-src/library/std/src/panicking.rs:343:19
30: 0x55cbbb41b5ba - std::panic::catch_unwind::hf36a3ca3a68c9a49
at /build/rust/src/rustc-1.53.0-src/library/std/src/panic.rs:431:14
31: 0x55cbbb41b5ba - std::rt::lang_start_internal::h82c01d0d3e63445d
at /build/rust/src/rustc-1.53.0-src/library/std/src/rt.rs:34:21
32: 0x55cbba882720 - std::rt::lang_start::h7ee6163310c37b8b
at /build/rust/src/rustc-1.53.0-src/library/std/src/rt.rs:48:5
33: 0x55cbbac8cc4c - main
34: 0x7f51f3416b25 - __libc_start_main
35: 0x55cbba84ce0e - _start
36: 0x0 - <unknown> /0.7s
Looks like net::decode_escaped_unicode()
detects an (invalid?) escape sequence and tries to parse it as hex, which then fails because the characters aren't valid hex.
Sounds to me like it either shouldn't be detected as an escape sequence or result in a block_error
.
That entire function looks very unsafe though anyways.
@teeratpitakrat do you have an example of the SSID of the wifi network you were connected to at the time? Maybe it happens to contain a backslash? Thanks!
The SSID is a Windows path containing some symbols like C:\Program Files(x86)\Custom\Utilities\Tool.exe
.
Oh yeah okay the decoder definitely thinks those backslashes are escape sequences. I can probably fix this tomorrow if nobody else wants to
@teeratpitakrat could you try #1274 ? Thanks!
@GladOSkar Seems to be fixed. Thanks!
i3status-rust crashes when I add a net block for the wireless device on my laptop. I'm on Archlinux.
ethtool
,iw
, andip
are installed. I'm running i3status-rust 0.20.2. This problem occurs since 0.20.0 in May.