Skip to content

Editor crash #4484

Closed
Closed
@prataprc

Description

@prataprc

Summary

While executing motion commands (j, k) in view-mode lead to the following crash.

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Line index out of bounds: line index 100, Rope/RopeSlice line count 97', /Users/prataprc/.cargo/registry/src/g.yxqyang.asia-1ecc6299db9ec823/ropey-1.5.0/src/slice.rs:424:41
stack backtrace:
   0:        0x104e848e4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdb141e7893323405
   1:        0x104757184 - core::fmt::write::hed96bcfc6342aee5
   2:        0x104e7ef04 - std::io::Write::write_fmt::h67807909d9a5a6e1
   3:        0x104e89798 - std::panicking::default_hook::{{closure}}::h23ab3d10a9c5bb0f
   4:        0x104e894dc - std::panicking::default_hook::hfa3eb92a01f5118c
   5:        0x104e89d7c - std::panicking::rust_panic_with_hook::h94fcfaabb5f8247c
   6:        0x104e89bd8 - std::panicking::begin_panic_handler::{{closure}}::h5c2b0281f2361f0b
   7:        0x104e87e58 - std::sys_common::backtrace::__rust_end_short_backtrace::h48848f94b4985ec4
   8:        0x104e89978 - _rust_begin_unwind
   9:        0x104f259cc - core::panicking::panic_fmt::hfc743f4016412d36
  10:        0x104f25a70 - core::result::unwrap_failed::h964512213a00d9f4
  11:        0x104a173c8 - helix_term::ui::editor::EditorView::doc_syntax_highlights::hcbe1f40d23906329
  12:        0x104a15e84 - helix_term::ui::editor::EditorView::render_view::ha5ad0032b19eb186
  13:        0x104a21340 - <helix_term::ui::editor::EditorView as helix_term::compositor::Component>::render::h41cb7e2815a69398
  14:        0x104a154cc - helix_term::compositor::Compositor::render::h732404bbabb4fd52
  15:        0x104bee50c - helix_term::application::Application::handle_terminal_events::h0d4ad66cca316417
  16:        0x104d400b4 - hx::main_impl::{{closure}}::h8f2f7170f476568d
  17:        0x104d300dc - std::thread::local::LocalKey<T>::with::hc533c273645dd684
  18:        0x104d268a8 - tokio::park::thread::CachedParkThread::block_on::hd2d048491914be9b
  19:        0x104cfe4c8 - tokio::runtime::scheduler::multi_thread::MultiThread::block_on::h30feeefd63cf4f37
  20:        0x104d4f7bc - tokio::runtime::Runtime::block_on::hcafa90c78ef7b46d
  21:        0x104d160e4 - hx::main::he67e5eef14377470
  22:        0x104d198d0 - std::sys_common::backtrace::__rust_begin_short_backtrace::he53ad0d8c0bf81be
  23:        0x104d441c4 - std::rt::lang_start::{{closure}}::hc5f08d150e2c52e9
  24:        0x104e794e0 - std::rt::lang_start_internal::hc453db0ee48af82e
  25:        0x104d161e8 - _main

Reproduction Steps

mostly motion command in view-mode.

Another point, not sure whether it matters, is that I was running tail -f ~/.cache/helix/helix.log on a different terminal window.

Helix log

~/.cache/helix/helix.log
2022-10-27T17:11:21.066 helix_view::editor [ERROR] editor error: Invalid regex: ?
2022-10-27T17:11:21.538 helix_view::editor [ERROR] editor error: Invalid regex: ?
2022-10-27T17:11:21.737 helix_view::editor [ERROR] editor error: Invalid regex: ?
2022-10-27T17:22:36.871 helix_view::editor [ERROR] editor error: failed to load theme `rpc-hx-theme` - Failed to deserialize theme
2022-10-27T17:26:27.361 helix_view::editor [ERROR] editor error: failed to load theme `rpc-hx-theme` - Failed to deserialize theme
2022-10-27T17:28:07.334 helix_view::editor [ERROR] editor error: failed to load theme `rpc-hx-theme` - Failed to deserialize theme
2022-10-27T17:28:29.032 helix_view::editor [ERROR] editor error: failed to load theme `rpc-hx-theme` - Failed to deserialize theme
2022-10-27T17:29:00.605 helix_term::application [WARN] failed to load theme `rpc-hx-theme` - Failed to deserialize theme
2022-10-27T17:29:04.109 helix_view::editor [ERROR] editor error: Register [@] empty
2022-10-27T17:30:01.741 helix_view::editor [ERROR] editor error: failed to load theme `rpc-hx-theme` - Failed to deserialize theme

Platform

mac m1

Terminal Emulator

iterm2

Helix Version

65edf9c

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions