Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Panic in ropey when deleting chars with multiple selections collapsed #9490

Closed
lisael opened this issue Feb 1, 2024 · 1 comment
Closed
Labels
C-bug Category: This is a bug

Comments

@lisael
Copy link

lisael commented Feb 1, 2024

Summary

❯ RUST_BACKTRACE=1 hx
thread 'main' panicked at 'assertion failed: start <= end', /home/lisael/.cargo/registry/src/github.com-1ecc6299db9ec823/ropey-1.2.0/src/rope.rs:601:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/4e3e6db011c5b482d2bef8ba02274657f93b5e0d/library/std/src/panicking.rs:515:5
   1: core::panicking::panic_fmt
             at /rustc/4e3e6db011c5b482d2bef8ba02274657f93b5e0d/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/4e3e6db011c5b482d2bef8ba02274657f93b5e0d/library/core/src/panicking.rs:50:5
   3: ropey::rope::Rope::remove
   4: helix_core::transaction::ChangeSet::apply
   5: helix_view::document::Document::_apply
   6: helix_view::document::Document::apply
   7: hx::commands::insert::delete_char_backward
   8: <hx::ui::editor::EditorView as hx::compositor::Component>::handle_event
   9: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  10: tokio::park::thread::CachedParkThread::block_on
  11: tokio::runtime::thread_pool::ThreadPool::block_on
  12: tokio::runtime::Runtime::block_on
  13: hx::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

see reproduction steps for detail

Reproduction Steps

I tried this:

  1. hx
  2. iccccabcab<esc>xsab<ret>i<bs><bs><bs><bs>

I expected this to happen:

the buffer contains a

Instead, this happened:

panic

Helix log

~/.cache/helix/helix.log
please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines

Platform

Linux

Terminal Emulator

xfce-terminal

Installation Method

AUR 23.10-1

Helix Version

helix 23.10 (hx -V panics too, searching for main.rs)

@lisael lisael added the C-bug Category: This is a bug label Feb 1, 2024
@pascalkuthe
Copy link
Member

can not reproduce this on laster master. I suspect that you may be using an out of date version of helix somehow. This sounds exactly like the bugs that were fixed in #6024. We even have similar testcases in our integration test suite

@helix-editor helix-editor locked and limited conversation to collaborators Feb 1, 2024
@pascalkuthe pascalkuthe converted this issue into discussion #9491 Feb 1, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants