Skip to content

Crash on opening jumplist picker #3763

Closed
@Jummit

Description

@Jummit

Summary

Helix randomly crashed after I opened the jumplist picker with Ctrl+J.

Reproduction Steps

I tried this:

  1. hx
  2. Ctrl+J
  3. Crash

Helix log

~/.cache/helix/helix.log
2022-09-09T15:28:58.160 helix_lsp::transport [ERROR] <- ServerError(-32900): rustfmt exited with:
                           Status: exit status: 101
                           stdout: 
                           stderr: error[E0765]: unterminated double quote string
   --> <stdin>:450:33
    |
450 |       let expected = String::from("dict\nx\nint\");
    |  _________________________________^
451 | | }
    | |__^


2022-09-09T15:28:58.160 helix_view::document [WARN] LSP formatting failed: protocol error: ServerError(-32900): rustfmt exited with:
                           Status: exit status: 101
                           stdout: 
                           stderr: error[E0765]: unterminated double quote string
   --> <stdin>:450:33
    |
450 |       let expected = String::from("dict\nx\nint\");
    |  _________________________________^
451 | | }
    | |__^


2022-09-09T15:30:01.999 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 449, character: 8 }, end: Position { line: 449, character: 16 } }, severity: Some(Warning), code: Some(String("unused_variables")), code_description: None, source: Some("rustc"), message: "unused variable: `expected`\n`#[warn(unused_variables)]` on by default", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/home/jummit/Programming/rust/src/serializer.rs", query: None, fragment: None }, range: Range { start: Position { line: 449, character: 8 }, end: Position { line: 449, character: 16 } } }, message: "if this is intentional, prefix it with an underscore: `_expected`" }]), tags: Some([Unnecessary]), data: None }
2022-09-09T15:30:01.999 helix_term::application [WARN] lsp position out of bounds - Diagnostic { range: Range { start: Position { line: 449, character: 8 }, end: Position { line: 449, character: 16 } }, severity: Some(Hint), code: Some(String("unused_variables")), code_description: None, source: Some("rustc"), message: "if this is intentional, prefix it with an underscore: `_expected`", related_information: Some([DiagnosticRelatedInformation { location: Location { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/home/jummit/Programming/rust/src/serializer.rs", query: None, fragment: None }, range: Range { start: Position { line: 449, character: 8 }, end: Position { line: 449, character: 16 } } }, message: "original diagnostic" }]), tags: None, data: None }

Stack trace:

[1]  + 70856 continued  hx
thread 'main' panicked at 'Attempt to slice past end of RopeSlice: slice end 14045, RopeSlice length 11978', /home/jummit/.local/share/cargo/registry/src/g.yxqyang.asia-1ecc6299db9ec823/ropey-1.5.0/src/slice.rs:645:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14
   2: ropey::slice::RopeSlice::slice
   3: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
   4: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
   5: <core::iter::adapters::flatten::FlatMap<I,U,F> as core::iter::traits::iterator::Iterator>::next
   6: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
   7: helix_term::commands::jumplist_picker
   8: helix_term::ui::editor::EditorView::handle_keymap_event::{{closure}}
   9: helix_term::ui::editor::EditorView::handle_keymap_event
  10: <helix_term::ui::editor::EditorView as helix_term::compositor::Component>::handle_event
  11: helix_term::compositor::Compositor::handle_event
  12: helix_term::application::Application::handle_terminal_events
  13: helix_term::application::Application::event_loop_until_idle::{{closure}}
  14: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  15: std::thread::local::LocalKey<T>::with
  16: tokio::park::thread::CachedParkThread::block_on
  17: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
  18: tokio::runtime::Runtime::block_on
  19: hx::main

Platform

Linux

Terminal Emulator

qterminal

Helix Version

helix 22.08.1 (44b4479)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-helix-termArea: Helix term improvementsC-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