Open kasvith opened 4 years ago
I have the same problem, but mine shows up when I use q or esc with interact_opt, only when I restrict the amount of items to <40 then it works on windows, but on linux it works perfectly with a lot more items.
thread 'main' panicked at 'attempt to subtract with overflow', C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\cons
ole-0.13.0\src\windows_term.rs:153:32
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4\/library\std\src\panicking.rs:483
1: core::panicking::panic_fmt
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4\/library\core\src\panicking.rs:85
2: core::panicking::panic
at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4\/library\core\src\panicking.rs:50
3: console::windows_term::move_cursor_up
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\console-0.13.0\src\windows_term.rs:153
4: console::term::Term::move_cursor_up
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\console-0.13.0\src\term.rs:357
5: console::term::Term::clear_last_lines
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\console-0.13.0\src\term.rs:391
6: dialoguer::prompts::select::Select::_interact_on
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\dialoguer-0.7.1\src\prompts\select.rs:308
7: dialoguer::prompts::select::Select::interact_on_opt
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\dialoguer-0.7.1\src\prompts\select.rs:242
8: go_version_manager::ask_for_version
at .\src\main.rs:65
9: go_version_manager::main::{{closure}}::{{closure}}
at .\src\main.rs:1
10: core::future::from_generator::{{impl}}::poll<generator-0>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\future\mod.r
s:80
11: tokio::runtime::enter::{{impl}}::block_on::{{closure}}<core::future::from_generator::GenFuture<generator-0>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\enter.rs:160
12: tokio::coop::with_budget::{{closure}}<core::task::poll::Poll<core::result::Result<tuple<>, go_version_manager::error::Erro
r>>,closure-0>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\coop.rs:127
13: std::thread::local::LocalKey<core::cell::Cell<tokio::coop::Budget>>::try_with<core::cell::Cell<tokio::coop::Budget>,closur
e-0,core::task::poll::Poll<core::result::Result<tuple<>, go_version_manager::error::Error>>>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\thread\local.
rs:272
14: std::thread::local::LocalKey<core::cell::Cell<tokio::coop::Budget>>::with<core::cell::Cell<tokio::coop::Budget>,closure-0,
re-0,core::task::poll::Poll<core::result::Result<tuple<>, go_version_manager::error::Error>>>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\thread\local
.rs:272
14: std::thread::local::LocalKey<core::cell::Cell<tokio::coop::Budget>>::with<core::cell::Cell<tokio::coop::Budget>,closure-0
,core::task::poll::Poll<core::result::Result<tuple<>, go_version_manager::error::Error>>>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\thread\local
.rs:248
15: tokio::coop::with_budget
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\coop.rs:120
16: tokio::coop::budget
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\coop.rs:96
17: tokio::runtime::enter::Enter::block_on<core::future::from_generator::GenFuture<generator-0>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\enter.rs:160
18: tokio::runtime::thread_pool::ThreadPool::block_on<core::future::from_generator::GenFuture<generator-0>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\thread_pool\mod.rs:82
19: tokio::runtime::{{impl}}::block_on::{{closure}}<core::future::from_generator::GenFuture<generator-0>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\mod.rs:446
20: tokio::runtime::context::enter<closure-0,core::result::Result<tuple<>, go_version_manager::error::Error>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\context.rs:72
21: tokio::runtime::handle::Handle::enter<closure-0,core::result::Result<tuple<>, go_version_manager::error::Error>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\handle.rs:76
22: tokio::runtime::Runtime::block_on<core::future::from_generator::GenFuture<generator-0>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.22\src\runtime\mod.rs:441
23: go_version_manager::main::{{closure}}
at .\src\main.rs:27
24: std::panicking::try::do_call<closure-0,core::result::Result<tuple<>, go_version_manager::error::Error>>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs
:381
25: std::panicking::try::do_catch<std::panic::AssertUnwindSafe<closure-0>,core::task::poll::Poll<core::result::Result<core::r
esult::Result<tuple<>, std::io::error::Error>, tokio::runtime::task::error::JoinError>>>
26: std::panicking::try<core::result::Result<tuple<>, go_version_manager::error::Error>,closure-0>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs
:345
27: std::panic::catch_unwind<closure-0,core::result::Result<tuple<>, go_version_manager::error::Error>>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panic.rs:382
28: quit::__run<closure-0,core::result::Result<tuple<>, go_version_manager::error::Error>>
at C:\Users\xC5\.cargo\registry\src\github.com-1ecc6299db9ec823\quit-1.1.2\src\lib.rs:74
29: go_version_manager::main
at .\src\main.rs:1
30: core::ops::function::FnOnce::call_once<fn() -> core::result::Result<tuple<>, go_version_manager::error::Error>,tuple<>>
at C:\Users\xC5\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\functio
n.rs:227
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
When I used
Select
as followsthe terminal in
Windows
gives me the following error.I tried GitBash, Powershell, Cmd and result are the same. When you scroll down with arrow keys program crashes