Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread 'main' panicked at 'attempt to subtract with overflow' #365

Closed
venth opened this issue Feb 6, 2022 · 3 comments
Closed

thread 'main' panicked at 'attempt to subtract with overflow' #365

venth opened this issue Feb 6, 2022 · 3 comments

Comments

@venth
Copy link

venth commented Feb 6, 2022

Rust: 1.58.0
Indicatif version: 0.17.0-rc.2
OS: macOS Montery
Terminal: iTerm
Terminal's Tab: divided into 2 parts
Progress type: MultiProgress

Every time, when the progress is rendered on a split terminal's tab, a panic exception happens. If the split terminal's tab is setup on max size progress is rendered without any issue.

The stack trace:

thread 'main' panicked at 'attempt to subtract with overflow', /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.17.0-rc.2/src/draw_target.rs:402:44
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }', /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.17.0-rc.2/src/draw_target.rs:165:22
stack backtrace:
   0:        0x107af39d1 - std::backtrace_rs::backtrace::libunwind::trace::haa51d71de8c12f2c
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:        0x107af39d1 - std::backtrace_rs::backtrace::trace_unsynchronized::hcd4ce94258793c68
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:        0x107af39d1 - std::sys_common::backtrace::_print_fmt::hdd3daf13a4020acc
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/sys_common/backtrace.rs:67:5
   3:        0x107af39d1 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h428cf6d3383daa9c
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/sys_common/backtrace.rs:46:22
   4:        0x107b0fceb - core::fmt::write::hcf88e896ec23e052
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/core/src/fmt/mod.rs:1149:17
   5:        0x107af007a - std::io::Write::write_fmt::h58c3052bb04c456d
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/io/mod.rs:1697:15
   6:        0x107af5225 - std::sys_common::backtrace::_print::h8e57757c05894dea
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/sys_common/backtrace.rs:49:5
   7:        0x107af5225 - std::sys_common::backtrace::print::h105de75e3b91cab9
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/sys_common/backtrace.rs:36:9
   8:        0x107af5225 - std::panicking::default_hook::{{closure}}::h99b76afd6b358916
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:211:50
   9:        0x107af4e0f - std::panicking::default_hook::hd7fbc9eda5da2259
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:228:9
  10:        0x107af5910 - std::panicking::rust_panic_with_hook::h48eeb24de18c027c
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:606:17
  11:        0x107af53ae - std::panicking::begin_panic_handler::{{closure}}::h1cb76dc2cf734090
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:502:13
  12:        0x107af3e47 - std::sys_common::backtrace::__rust_end_short_backtrace::h6ba95b68f495d865
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/sys_common/backtrace.rs:139:18
  13:        0x107af531a - rust_begin_unwind
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/std/src/panicking.rs:498:5
  14:        0x107b23a6f - core::panicking::panic_fmt::h91749835f0f98da6
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/core/src/panicking.rs:107:14
  15:        0x107b23b55 - core::result::unwrap_failed::h27bd9e37a763047a
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/core/src/result.rs:1613:5
  16:        0x10750ff38 - core::result::Result<T,E>::unwrap::hf087214c2edd276d
                               at /rustc/02072b482a8b5357f7fb5e5637444ae30e423c40/library/core/src/result.rs:1295:23
  17:        0x10751664a - indicatif::draw_target::ProgressDrawTarget::apply_draw_state::he00430a96d706384
                               at /Users/XXX/.cargo/registry/src/github.com-1ecc6299db9ec823/indicatif-0.17.0-rc.2/src/draw_target.rs:163:24
@djc
Copy link
Member

djc commented Feb 6, 2022

I think this was fixed with #364, try with main?

@venth
Copy link
Author

venth commented Feb 6, 2022

Tomorrow, I’ll try main and let you know

@venth
Copy link
Author

venth commented Feb 10, 2022

Sorry for the delay. This issue doesn't exists on the main branch.

@venth venth closed this as completed Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants