You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"version": 1, "click_events": true}
[[],
thread 'main' panicked at 'overflow when adding duration to instant', src/libcore/option.rs:1185:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
focused_window block only sends updates (tx.send(...)) when it receives an update on the IPC channel
main thread expectsupdate_time to have been set by a block, otherwise it sets the timeout to std::u64::MAX which instantly causes the overflow panic to occur
Further investigation:
I changed the above std::u64::MAX to 10 seconds. As long as you keep changing the window focus within 10 seconds, i3status-rs works fine. But if you leave it for 10 seconds you will get the panic below which now points to the scheduler:
backtrace when timeout is set to 10s
{"version": 1, "click_events": true}
[[],
[{"background":null,"color":"#002b36","full_text":"","markup":"pango","separator":false,"separator_block_width":0},{"background":"#002b36","color":"#93a1a1","full_text":" /tmp | fish ","separator":false,"separator_block_width":0}],
[{"background":"#000000","color":"#dc322f","full_text":" Internal error in context 'scheduler': schedule is empty ","separator":false,"separator_block_width":0}]
Internal error in context 'scheduler': schedule is empty
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libcore/result.rs:1165:5
stack backtrace:
0: 0x55c0da414ce4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4c5e39dd6bf38933
1: 0x55c0da437c8c - core::fmt::write::h94b22f3cbda6422c
2: 0x55c0da4119a7 - std::io::Write::write_fmt::he7e02466cb3dc860
3: 0x55c0da41738e - std::panicking::default_hook::{{closure}}::h077f2d0f0f4550db
4: 0x55c0da417081 - std::panicking::default_hook::hcc1ceebfaf9d0a58
5: 0x55c0da417a8b - std::panicking::rust_panic_with_hook::h328d8e7ed959397b
6: 0x55c0da41762e - std::panicking::continue_panic_fmt::h745b12464b662c8f
7: 0x55c0da417516 - rust_begin_unwind
8: 0x55c0da433ace - core::panicking::panic_fmt::hdb91b8826feb6fc9
9: 0x55c0da433bc7 - core::result::unwrap_failed::haba3c6d5a6de1991
10: 0x55c0d9c3fdfc - core::result::Result<T,E>::unwrap::h62c1cc4849b4e08a
at /build/rust/src/rustc-1.40.0-src/src/libcore/result.rs:933
11: 0x55c0d9e9a283 - <i3status_rs::blocks::focused_window::FocusedWindow as i3status_rs::blocks::ConfigBlock>::new::{{closure}}::hca064e0f0147e248
at src/blocks/focused_window.rs:69
12: 0x55c0d9ee2000 - std::sys_common::backtrace::__rust_begin_short_backtrace::h49fe9e8f6df29001
at /build/rust/src/rustc-1.40.0-src/src/libstd/sys_common/backtrace.rs:129
13: 0x55c0d9e057d2 - std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}::hbcaf183d72c49056
at /build/rust/src/rustc-1.40.0-src/src/libstd/thread/mod.rs:469
14: 0x55c0d9dd8822 - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h861413b3c039f0f8
at /build/rust/src/rustc-1.40.0-src/src/libstd/panic.rs:317
15: 0x55c0d9caa4dc - std::panicking::try::do_call::hf8e4ef7e39c8ba81
at /build/rust/src/rustc-1.40.0-src/src/libstd/panicking.rs:287
16: 0x55c0da41f7ba - __rust_maybe_catch_panic
17: 0x55c0d9ca8c7e - std::panicking::try::h94b234fb9e84ef30
at /build/rust/src/rustc-1.40.0-src/src/libstd/panicking.rs:265
18: 0x55c0d9dd8b42 - std::panic::catch_unwind::h7bd6e96b94b73647
at /build/rust/src/rustc-1.40.0-src/src/libstd/panic.rs:396
19: 0x55c0d9e02ace - std::thread::Builder::spawn_unchecked::{{closure}}::h2c494a8806a81a27
at /build/rust/src/rustc-1.40.0-src/src/libstd/thread/mod.rs:468
20: 0x55c0d9c77dd3 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hb00a27c0d6380e5b
at /build/rust/src/rustc-1.40.0-src/src/libcore/ops/function.rs:227
21: 0x55c0da40a13f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h9c0116b07c5d124e
22: 0x55c0da41ec60 - std::sys::unix::thread::Thread::new::thread_start::h20a61bfd6b1bfdd0
23: 0x7faa5ba484cf - start_thread
24: 0x7faa5b95b2d3 - clone
25: 0x0 - <unknown>
This project seems dependent on each block to be sending updates, so this issue is probably just due to the focused_window block not following the correct pattern.
Note that this panic doesn't occur if you define another block or more alongside focused_window as those block will provide the updates to keep the code in main.rs/scheduler.rs happy.
The text was updated successfully, but these errors were encountered:
As per title.
config.toml contents
stdout at time of panic:
backtrace:
This is what I think is happening:
tx.send(...)
) when it receives an update on the IPC channelupdate_time
to have been set by a block, otherwise it sets the timeout tostd::u64::MAX
which instantly causes the overflow panic to occurFurther investigation:
I changed the above
std::u64::MAX
to 10 seconds. As long as you keep changing the window focus within 10 seconds, i3status-rs works fine. But if you leave it for 10 seconds you will get the panic below which now points to the scheduler:backtrace when timeout is set to 10s
Takeaways:
Should we really be using
std::u64::MAX
here?This project seems dependent on each block to be sending updates, so this issue is probably just due to the focused_window block not following the correct pattern.
Note that this panic doesn't occur if you define another block or more alongside focused_window as those block will provide the updates to keep the code in main.rs/scheduler.rs happy.
The text was updated successfully, but these errors were encountered: