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

Crashed in a horizontal split #1782

Closed
nibon7 opened this issue Mar 10, 2022 · 5 comments
Closed

Crashed in a horizontal split #1782

nibon7 opened this issue Mar 10, 2022 · 5 comments
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@nibon7
Copy link
Contributor

nibon7 commented Mar 10, 2022

Reproduction steps

Environment

  • Platform: Linux
  • Terminal emulator: alacritty
  • Helix version: helix 0.6.0 (8d7a25b)
backtrace
thread 'main' panicked at 'no entry found for key', helix-view/src/document.rs:900:10
stack backtrace:
   0:     0x55dd562e191c - std::backtrace_rs::backtrace::libunwind::trace::h11dc6469a6e52543
                               at /rustc/1.59.0/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x55dd562e191c - std::backtrace_rs::backtrace::trace_unsynchronized::hd4036938d0c3ae29
                               at /rustc/1.59.0/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55dd562e191c - std::sys_common::backtrace::_print_fmt::hf909b4c4e1107d0b
                               at /rustc/1.59.0/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55dd562e191c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4becf6587ad7aa1d
                               at /rustc/1.59.0/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x55dd5630c8ac - core::fmt::write::h557b7f443eab4320
                               at /rustc/1.59.0/library/core/src/fmt/mod.rs:1168:17
   5:     0x55dd562d9085 - std::io::Write::write_fmt::h489ea24feb4a5ea4
                               at /rustc/1.59.0/library/std/src/io/mod.rs:1660:15
   6:     0x55dd562e4420 - std::sys_common::backtrace::_print::h2e67187980d82d1e
                               at /rustc/1.59.0/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x55dd562e4420 - std::sys_common::backtrace::print::ha1439b6972e85b57
                               at /rustc/1.59.0/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x55dd562e4420 - std::panicking::default_hook::{{closure}}::hfa0b382729055e14
                               at /rustc/1.59.0/library/std/src/panicking.rs:211:50
   9:     0x55dd562e3fd9 - std::panicking::default_hook::h41128bfd08e307a0
                               at /rustc/1.59.0/library/std/src/panicking.rs:228:9
  10:     0x55dd54f3ec63 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h8037bf218b1ee8f6
                               at /rustc/1.59.0/library/alloc/src/boxed.rs:1868:9
  11:     0x55dd54f91173 - helix_term::application::Application::run::{{closure}}::{{closure}}::h7c5d49b3d7052507
                               at /data/source/helix/helix-term/src/application.rs:842:13
  12:     0x55dd562e4b7b - std::panicking::rust_panic_with_hook::h9e4813ea689fc43b
                               at /rustc/1.59.0/library/std/src/panicking.rs:610:17
  13:     0x55dd562e48b0 - std::panicking::begin_panic_handler::{{closure}}::h522a2eaaa50f1034
                               at /rustc/1.59.0/library/std/src/panicking.rs:502:13
  14:     0x55dd562e1db4 - std::sys_common::backtrace::__rust_end_short_backtrace::h9cefd2b43c0486be
                               at /rustc/1.59.0/library/std/src/sys_common/backtrace.rs:139:18
  15:     0x55dd562e4619 - rust_begin_unwind
                               at /rustc/1.59.0/library/std/src/panicking.rs:498:5
  16:     0x55dd5630ac91 - core::panicking::panic_fmt::h8ef5ad8e70ca9bc8
                               at /rustc/1.59.0/library/core/src/panicking.rs:116:14
  17:     0x55dd5630abd1 - core::panicking::panic_display::hfee78fa4d6f663b4
                               at /rustc/1.59.0/library/core/src/panicking.rs:72:5
  18:     0x55dd5630ab7b - core::panicking::panic_str::hfb358f0f5ebccc98
                               at /rustc/1.59.0/library/core/src/panicking.rs:56:5
  19:     0x55dd5630a8d6 - core::option::expect_failed::h7a727beab1b34baf
                               at /rustc/1.59.0/library/core/src/option.rs:1817:5
  20:     0x55dd55d8359e - core::option::Option<T>::expect::hc9cfb16e89adf7aa
                               at /rustc/1.59.0/library/core/src/option.rs:692:21
  21:     0x55dd5578ce5a - <std::collections::hash::map::HashMap<K,V,S> as core::ops::index::Index<&Q>>::index::h6bafea8fc8c0a46e
                               at /rustc/1.59.0/library/std/src/collections/hash/map.rs:1164:9
  22:     0x55dd55750cb7 - helix_view::document::Document::selection::hfed0e05e901914f7
                               at /data/source/helix/helix-view/src/document.rs:900:10
  23:     0x55dd5574f5aa - helix_view::document::Document::apply::hc1a3dcc82fb6c891
                               at /data/source/helix/helix-view/src/document.rs:697:28
  24:     0x55dd5544b557 - helix_term::commands::make_format_callback::{{closure}}::{{closure}}::hfd75d6f4a31ab430
                               at /data/source/helix/helix-term/src/commands.rs:2213:17
  25:     0x55dd551d3060 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hd728f567bff75320
                               at /rustc/1.59.0/library/core/src/ops/function.rs:227:5
  26:     0x55dd550a60f5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h38ccfabc88556bed
                               at /rustc/1.59.0/library/alloc/src/boxed.rs:1854:9
  27:     0x55dd5520b059 - helix_term::job::Jobs::handle_callback::h4400c4d0259bdabe
                               at /data/source/helix/helix-term/src/job.rs:72:17
  28:     0x55dd54f85976 - helix_term::application::Application::event_loop::{{closure}}::hc110b2005cb891c3
                               at /data/source/helix/helix-term/src/application.rs:232:21
  29:     0x55dd54f82e6b - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hded66d7337c3261a
                               at /rustc/1.59.0/library/core/src/future/mod.rs:84:19
  30:     0x55dd54f90a64 - helix_term::application::Application::run::{{closure}}::hb5623c90eb302756
                               at /data/source/helix/helix-term/src/application.rs:845:26
  31:     0x55dd54f83021 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::heed277568a74782d
                               at /rustc/1.59.0/library/core/src/future/mod.rs:84:19
  32:     0x55dd54f663d1 - hx::main_impl::{{closure}}::h7d465919ae0a4de0
                               at /data/source/helix/helix-term/src/main.rs:130:30
  33:     0x55dd54f82121 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h1475ab61ef687e2f
                               at /rustc/1.59.0/library/core/src/future/mod.rs:84:19
  34:     0x55dd54f79f6e - tokio::park::thread::CachedParkThread::block_on::{{closure}}::h3fc653b3f0949edb
                               at /home/nibon7/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/park/thread.rs:263:54
  35:     0x55dd54f913b9 - tokio::coop::with_budget::{{closure}}::h9ab9b395edee5d05
                               at /home/nibon7/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/coop.rs:102:9
  36:     0x55dd54fa4e93 - std::thread::local::LocalKey<T>::try_with::heb0e36848661d447
                               at /rustc/1.59.0/library/std/src/thread/local.rs:412:16
  37:     0x55dd54fa4474 - std::thread::local::LocalKey<T>::with::h289edaa9d3150bde
                               at /rustc/1.59.0/library/std/src/thread/local.rs:388:9
  38:     0x55dd54f79c76 - tokio::coop::with_budget::hb60eb561fafac53c
                               at /home/nibon7/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/coop.rs:95:5
  39:     0x55dd54f79c76 - tokio::coop::budget::h8f921e4103605956
                               at /home/nibon7/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/coop.rs:72:5
  40:     0x55dd54f79c76 - tokio::park::thread::CachedParkThread::block_on::hf919691c9e470f9d
                               at /home/nibon7/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/park/thread.rs:263:31
  41:     0x55dd54fe7584 - tokio::runtime::enter::Enter::block_on::h3ad408baed9fa561
                               at /home/nibon7/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/runtime/enter.rs:151:13
  42:     0x55dd54f6cbf9 - tokio::runtime::thread_pool::ThreadPool::block_on::h47bef2063c4fead5
                               at /home/nibon7/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/runtime/thread_pool/mod.rs:73:9
  43:     0x55dd54f96fa4 - tokio::runtime::Runtime::block_on::hfc3554c7076c6e81
                               at /home/nibon7/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.17.0/src/runtime/mod.rs:477:43
  44:     0x55dd54f64f47 - hx::main_impl::h94c9ab864883f5d0
                               at /data/source/helix/helix-term/src/main.rs:132:5
  45:     0x55dd54f64d79 - hx::main::hd698bbe432ad8916
                               at /data/source/helix/helix-term/src/main.rs:37:21
  46:     0x55dd54f6d4fb - core::ops::function::FnOnce::call_once::h1d35336592bd1e9a
                               at /rustc/1.59.0/library/core/src/ops/function.rs:227:5
  47:     0x55dd54f9626e - std::sys_common::backtrace::__rust_begin_short_backtrace::h3927265e6b53d7a6
                               at /rustc/1.59.0/library/std/src/sys_common/backtrace.rs:123:18
  48:     0x55dd54f80e61 - std::rt::lang_start::{{closure}}::h312f173efde674f4
                               at /rustc/1.59.0/library/std/src/rt.rs:145:18
  49:     0x55dd562e111e - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hd1208b862f1fb9fd
                               at /rustc/1.59.0/library/core/src/ops/function.rs:259:13
  50:     0x55dd562e111e - std::panicking::try::do_call::hcc194fcbf1b91aa1
                               at /rustc/1.59.0/library/std/src/panicking.rs:406:40
  51:     0x55dd562e111e - std::panicking::try::ha62166a0d570ae0e
                               at /rustc/1.59.0/library/std/src/panicking.rs:370:19
  52:     0x55dd562e111e - std::panic::catch_unwind::hdbb49d505e2dff37
                               at /rustc/1.59.0/library/std/src/panic.rs:133:14
  53:     0x55dd562e111e - std::rt::lang_start_internal::{{closure}}::he1f6f465111b6703
                               at /rustc/1.59.0/library/std/src/rt.rs:128:48
  54:     0x55dd562e111e - std::panicking::try::do_call::h752b2472b65dc578
                               at /rustc/1.59.0/library/std/src/panicking.rs:406:40
  55:     0x55dd562e111e - std::panicking::try::h5e5e1df37906fd95
                               at /rustc/1.59.0/library/std/src/panicking.rs:370:19
  56:     0x55dd562e111e - std::panic::catch_unwind::h74042ea207983c3e
                               at /rustc/1.59.0/library/std/src/panic.rs:133:14
  57:     0x55dd562e111e - std::rt::lang_start_internal::h57d0ce2765e13f39
                               at /rustc/1.59.0/library/std/src/rt.rs:128:20
  58:     0x55dd54f80e30 - std::rt::lang_start::hac392211169f72f8
                               at /rustc/1.59.0/library/std/src/rt.rs:144:17
  59:     0x55dd54f6d26c - main
  60:     0x7f4086781310 - __libc_start_call_main
  61:     0x7f40867813c1 - __libc_start_main@GLIBC_2.2.5
  62:     0x55dd54ecc115 - _start
  63:                0x0 - <unknown>

asciicast

@nibon7 nibon7 added the C-bug Category: This is a bug label Mar 10, 2022
@archseer
Copy link
Member

archseer commented Mar 10, 2022

Can you write down the reproduction case? For some reason that mp4 is lagging and skipping frames for me. asciinema.org works as well

@nibon7
Copy link
Contributor Author

nibon7 commented Mar 10, 2022

I have uploaded it to asciinema.org.

https://asciinema.org/a/JWWzrh4LllEF3eZIrKFU3hYpN

  1. create a rust project and cd to the directory
  2. exec hx
  3. open a horizontal split to edit src/main.rs (:hs src/main.rs)
  4. select whole text (%)
  5. delete the text (d)
  6. exit helix (:x)

@kirawi kirawi added the A-helix-term Area: Helix term improvements label Mar 11, 2022
@archseer
Copy link
Member

Ok I managed to reproduce this locally. This seems to happen in some callback that's using doc.apply() with a view reference that no longer exists. My guess is the make_format_callback function.

@gabydd
Copy link
Member

gabydd commented Dec 18, 2022

Can't reproduce on master, I think it can be closed

@the-mikedavis
Copy link
Member

This was most likely fixed by either #2267 or with the series of PRs for applying transactions to jumplist selections

- Apply transactions to jumplist selections ([#4186](https://github.com/helix-editor/helix/pull/4186), [#4227](https://github.com/helix-editor/helix/pull/4227), [#4733](https://github.com/helix-editor/helix/pull/4733), [#4865](https://github.com/helix-editor/helix/pull/4865), [#4912](https://github.com/helix-editor/helix/pull/4912), [#4965](https://github.com/helix-editor/helix/pull/4965), [#4981](https://github.com/helix-editor/helix/pull/4981))

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

5 participants