Skip to content

Panic on program start #8

@hreikin

Description

@hreikin

When trying to start fast-ssh from the command line using fast-ssh it fails and freezes the terminal, I am trying this on Fedora 34 and have tested both the downloadable tar.gz file from the latest release (v0.2.1) as well as via the cargo install fast-ssh method. I have run the command with RUST_BACKTRACE=full as suggested and have provided the output below.

EDIT: Downgrading to an earlier version (v0.2.0) fixes the issue.

$ RUST_BACKTRACE=full fast-ssh > backtrace
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /home/hreikin/.cargo/registry/src/github.com-1ecc6299db9ec823/fast-ssh-0.2.1/src/app.rs:67:10
                                                                                                                                                                               stack backtrace:
                                                                                                                                                                                                  0:     0x559d745f8b80 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb81dd1a78bb96f60
                                                                                   1:     0x559d7461a5dc - core::fmt::write::h205940cafbb98a3d
                                                                                                                                                 2:     0x559d745f48f5 - std::io::Write::write_fmt::h4d30a65b89df279f
                                                                                                                                                                                                                        3:     0x559d745fa80b - std::panicking::default_hook::{{closure}}::h3c5425a3f4b5ee21
                                                                 4:     0x559d745fa380 - std::panicking::default_hook::h7c2827a5a7a96663
                                                                                                                                           5:     0x559d745faee4 - std::panicking::rust_panic_with_hook::hceee634f9d20b4f1
                                                                                                                                                                                                                             6:     0x559d745fa9b0 - std::panicking::begin_panic_handler::{{closure}}::h7de468b3df6750a8
                                                                             7:     0x559d745f9044 - std::sys_common::backtrace::__rust_end_short_backtrace::h87b00be28d10817a
                                                                                                                                                                                 8:     0x559d745fa919 - rust_begin_unwind
                                                                                                                                                                                                                             9:     0x559d74554291 - core::panicking::panic_fmt::h29a3e96afa0a0daa
                                                      10:     0x559d74554252 - core::panicking::panic_bounds_check::h8ecc421189d7d0f8
                                                                                                                                       11:     0x559d7456d623 - fast_ssh::app::App::get_items_based_on_mode::h189e8b590dbebaa5
                                                                                                                                                                                                                                12:     0x559d7455a0e5 - fast_ssh::widgets::hosts_widget::HostsWidget::render::ha6b60b69a568cd08
                                                                                    13:     0x559d7455f44a - tui::terminal::Terminal<B>::draw::hb733d0ac6f0e10f8
                                                                                                                                                                  14:     0x559d7456845e - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::ha27021561155e11e
                                                    15:     0x559d7455ca5f - tokio::park::thread::CachedParkThread::block_on::hf6c8bc90ccaeb030
                                                                                                                                                 16:     0x559d7455cbbe - tokio::runtime::thread_pool::ThreadPool::block_on::h7f84fdd4a7709496
                                                                                                                                                                                                                                               17:     0x559d7456ed38 - tokio::runtime::Runtime::block_on::h68ec888ceb8f60e5
                                                                                18:     0x559d7456dba4 - fast_ssh::main::he09aef1402a62e66
                                                                                                                                            19:     0x559d7455b6c3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h74eefc0530100569
    20:     0x559d74569dad - std::rt::lang_start::{{closure}}::hedf0d1c98cec7b9e
                                                                                  21:     0x559d745fb4ea - std::rt::lang_start_internal::ha108655af4bf2480
                                                                                                                                                            22:     0x559d7456dc92 - main
                                                                                                                                                                                           23:     0x7ff65671eb75 - __libc_start_main
                                                                                                                                                                                                                                       24:     0x559d74554a0e - _start
                          25:                0x0 - <unknown>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions