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

Autocomplete causes panic #1262

Closed
zetanumbers opened this issue Dec 13, 2021 · 4 comments
Closed

Autocomplete causes panic #1262

zetanumbers opened this issue Dec 13, 2021 · 4 comments
Labels
C-bug Category: This is a bug R-duplicate Duplicated issue: please refer to the linked issue

Comments

@zetanumbers
Copy link

zetanumbers commented Dec 13, 2021

thread 'main' panicked at 'index out of bounds: the len is 6674 but the index is 6732', helix-tui/src/buffer.rs:173:14

RUST_BACKTRACE=full hx ./src/main.rs
thread 'main' panicked at 'index out of bounds: the len is 6674 but the index is 6732', helix-tui/src/buffer.rs:173:14
stack backtrace:
   0:     0x55da7ddaaecc - std::backtrace_rs::backtrace::libunwind::trace::hf6a6dfd7da937cb0
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x55da7ddaaecc - std::backtrace_rs::backtrace::trace_unsynchronized::hc596a19e4891f7f3
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55da7ddaaecc - std::sys_common::backtrace::_print_fmt::hb16700db31584325
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55da7ddaaecc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h231c4190cfa75162
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x55da7d88609c - core::fmt::write::h2a1462b5f8eea807
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/fmt/mod.rs:1163:17
   5:     0x55da7dda5325 - std::io::Write::write_fmt::h71ddfebc68685972
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/io/mod.rs:1696:15
   6:     0x55da7ddacfd0 - std::sys_common::backtrace::_print::hcc197d4bebf2b369
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x55da7ddacfd0 - std::sys_common::backtrace::print::h335a66af06738c7c
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x55da7ddacfd0 - std::panicking::default_hook::{{closure}}::h6fac9ac9c8b79e52
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:210:50
   9:     0x55da7ddacb90 - std::panicking::default_hook::h341c1030c6a1161b
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:227:9
  10:     0x55da7dc7423e - helix_term::application::Application::run::{{closure}}::{{closure}}::hd23f7bda5c3fa1f0
  11:     0x55da7ddad622 - std::panicking::rust_panic_with_hook::h50680ff4b44510c6
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:628:17
  12:     0x55da7ddad11a - std::panicking::begin_panic_handler::{{closure}}::h9371c0fbb1e8465a
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:521:13
  13:     0x55da7ddab5d4 - std::sys_common::backtrace::__rust_end_short_backtrace::h9b3efa22a5768c0f
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:139:18
  14:     0x55da7ddad09d - rust_begin_unwind
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:517:5
  15:     0x55da7d8299d1 - core::panicking::panic_fmt::h23b9203e89cc61cf
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:100:14
  16:     0x55da7d829992 - core::panicking::panic_bounds_check::h0ffbb3014c878e8a
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:76:5
  17:     0x55da7dbbf256 - helix_tui::buffer::Buffer::clear_with::h22f9fcabca941db2
  18:     0x55da7da9270e - <helix_term::ui::completion::Completion as helix_term::compositor::Component>::render::h581bc41bc846ed0c
  19:     0x55da7db971e9 - <helix_term::ui::editor::EditorView as helix_term::compositor::Component>::render::h688ea13a0ecc3fed
  20:     0x55da7da90633 - helix_term::compositor::Compositor::render::he9f5cfc5ebc2e779
  21:     0x55da7db6a8e4 - helix_term::application::Application::handle_terminal_events::h2c7e69d142392eb4
  22:     0x55da7dc706af - helix_term::application::Application::run::{{closure}}::h6ba09547ff3ef0e9
  23:     0x55da7dc7a265 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h23f332280c05ff1a
  24:     0x55da7dc555fd - tokio::park::thread::CachedParkThread::block_on::h185173c0ec4d3927
  25:     0x55da7dc5c383 - tokio::runtime::thread_pool::ThreadPool::block_on::h95e122e94487049e
  26:     0x55da7dc6db9e - tokio::runtime::Runtime::block_on::h5d5935da78f2cef7
  27:     0x55da7dc5721f - hx::main::h9258034886ae4e81
  28:     0x55da7dc50163 - std::sys_common::backtrace::__rust_begin_short_backtrace::h6d8bf8ec90714906
  29:     0x55da7dc6a22d - std::rt::lang_start::{{closure}}::h884ee6ee107c51a5
  30:     0x55da7ddaab7b - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hc56adab7a77ec6e3
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs:259:13
  31:     0x55da7ddaab7b - std::panicking::try::do_call::h29f013120c5abc65
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:403:40
  32:     0x55da7ddaab7b - std::panicking::try::h86d5b2b66caec4cf
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:367:19
  33:     0x55da7ddaab7b - std::panic::catch_unwind::h7dd136d787f51397
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:133:14
  34:     0x55da7ddaab7b - std::rt::lang_start_internal::{{closure}}::h4a199351e630a8a5
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/rt.rs:128:48
  35:     0x55da7ddaab7b - std::panicking::try::do_call::h20ceb9e5dff838c6
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:403:40
  36:     0x55da7ddaab7b - std::panicking::try::hc2abb46a5e41bd43
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:367:19
  37:     0x55da7ddaab7b - std::panic::catch_unwind::h52c3eb4408ad6dfb
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:133:14
  38:     0x55da7ddaab7b - std::rt::lang_start_internal::hd15a47be08101c28
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/rt.rs:128:20
  39:     0x55da7dc57462 - main
  40:     0x7faca4bfc565 - __libc_start_main
  41:     0x55da7d85402e - _start
  42:                0x0 - <unknown>

Reproduction steps

  1. cargo new hello-world
  2. cd hello-world
  3. hx ./src/main.rs
  4. Within main function try to autocomplete std::coll into std::collections with a tab

Environment

  • Platform: Linux
  • Helix version: v0.5.0-235-g94535fa

~/.cache/helix/helix.log is empty without -v flag, or doesn't fit inside this comment with -v

@kirawi
Copy link
Member

kirawi commented Dec 13, 2021

Is this a duplicate of #1256?

@zetanumbers
Copy link
Author

Is this a duplicate of #1256?

These are two different panic messages. I think this is because i used tab and not Ctrl+n (i edited top comment to mention it). So… yes but actually no?

@midnightexigent
Copy link
Contributor

I think the underlying problem is the same, @zetanumbers could you try my fork and see if it fixes the problem you're describing ?

@zetanumbers
Copy link
Author

I think the underlying problem is the same, @zetanumbers could you try my fork and see if it fixes the problem you're describing ?

Yes it does. I have mentioned it in your PR. Thank you.

@kirawi kirawi added the R-duplicate Duplicated issue: please refer to the linked issue label Dec 14, 2021
@kirawi kirawi closed this as completed Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug R-duplicate Duplicated issue: please refer to the linked issue
Projects
None yet
Development

No branches or pull requests

3 participants