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

Crash on jump_backward #10847

Open
MikeSS8 opened this issue May 29, 2024 · 0 comments
Open

Crash on jump_backward #10847

MikeSS8 opened this issue May 29, 2024 · 0 comments
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@MikeSS8
Copy link

MikeSS8 commented May 29, 2024

This is my config file:

[keys.normal]
"A-o" = ["save_selection", "open_below", "normal_mode", "jump_backward"]

Using A-o thus defined near the end of any file (an empty file, for example) reliably crashes with this error:

thread 'main' panicked at helix-core/src/transaction.rs:483:9:
Positions [(15796, Before)] are out of range for changeset len 15795!

stack backtrace:
   0:     0x55bc44439e7f - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h92d9a192caa2b3c6
   1:     0x55bc436c8f30 - core::fmt::write::h8e9667b43323ebf1
   2:     0x55bc444359b3 - std::io::Write::write_fmt::h6af72a8d71de8ea1
   3:     0x55bc44439c34 - std::sys_common::backtrace::print::hb74a723253d935d2
   4:     0x55bc4443bb90 - std::panicking::default_hook::{{closure}}::h2c0afc23b1c64123
   5:     0x55bc4443b8b9 - std::panicking::default_hook::h913b398f51e9f3cd
   6:     0x55bc4443c25f - std::panicking::rust_panic_with_hook::ha35ca58df37ac5d9
   7:     0x55bc4443bfb2 - std::panicking::begin_panic_handler::{{closure}}::hdc63c9e6d9a79c41
   8:     0x55bc4443a366 - std::sys_common::backtrace::__rust_end_short_backtrace::h237dd761b36e0dff
   9:     0x55bc4443bd14 - rust_begin_unwind
  10:     0x55bc435c8085 - core::panicking::panic_fmt::h832577c8a3091696
  11:     0x55bc439bc531 - helix_core::transaction::ChangeSet::update_positions::haefa41a39000407f
  12:     0x55bc43955534 - helix_core::selection::Selection::map_no_normalize::he8c7ffc97da9e02a
  13:     0x55bc4413393a - helix_view::view::View::apply::h2a7608eab561dfb4
  14:     0x55bc44161429 - helix_view::document::Document::append_changes_to_history::he757dba746d61f6c
  15:     0x55bc43f06df5 - <helix_term::ui::editor::EditorView as helix_term::compositor::Component>::handle_event::hfa4ca972ca896c80
  16:     0x55bc43ef6335 - helix_term::compositor::Compositor::handle_event::hb3599a4a36cc6cff
  17:     0x55bc441bb917 - hx::main_impl::{{closure}}::h8b0b43b2bd99161c
  18:     0x55bc441b90f8 - tokio::runtime::park::CachedParkThread::block_on::hb08148173bd3d453
  19:     0x55bc442096bb - tokio::runtime::runtime::Runtime::block_on::hbf6b31ab212a194c
  20:     0x55bc441ff813 - hx::main::h96a63873d2f97976
  21:     0x55bc4421a953 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc221f358ff8d70eb
  22:     0x55bc4424af3d - std::rt::lang_start::{{closure}}::h4b03604eb2b7b74c
  23:     0x55bc4442c1f5 - std::rt::lang_start_internal::hed8fea55313e96fb
  24:     0x55bc441ff905 - main
  25:     0x7f361ba85c4c - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  26:     0x7f361ba85d05 - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:360:3
  27:     0x55bc43645ba1 - _start
  28:                0x0 - <unknown>

If I remove the jump_backward instruction, no crash occurs.
There's also no crash on running each instruction of the command individually: C-s o <esc> C-o

Helix commit 1796735 built using cargo build --release
rustc 1.78.0 (9b00956e5 2024-04-29) (Void Linux)
Terminal: alacritty 0.13.2

@kirawi kirawi added C-bug Category: This is a bug A-helix-term Area: Helix term improvements labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants
@kirawi @MikeSS8 and others