This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Description
When editing one file of mine, RLS crashes very often with the stack trace below.
thread 'main' panicked at 'error committing to VFS: InternalError("Out of bounds access in `byte_in_str`")', libcore/result.rs:1009:5
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::_print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: rustc::util::common::panic_hook
5: std::panicking::rust_panic_with_hook
6: std::panicking::continue_panic_fmt
7: rust_begin_unwind
8: core::panicking::panic_fmt
9: core::result::unwrap_failed
10: rls::actions::notifications::<impl rls::server::message::BlockingNotificationAction for languageserver_types::notification::DidChangeTextDocument>::handle
11: <rls::server::LsService<O>>::dispatch_message
12: rls::server::run_server
13: rls::main_inner
14: rls::main
15: std::rt::lang_start::{{closure}}
16: std::panicking::try::do_call
17: __rust_maybe_catch_panic
18: std::rt::lang_start_internal
19: main
query stack during panic:
end of query stack
[Info - 3:54:52 PM] Connection to server got closed. Server will restart.
It might be related to #557, but I guessed creating a new issue might be more convenient.
To reproduce:
- clone https://github.com/vincentisambart/parser, checkout commit bd04c72b1d50c1b615dfce9bac20a93f0b665055 (the current latest commit on
master
)
- open
src/parser/tests.rs
- go for example to line 200
- add a few spaces at the start of the line
- reformat the file using the shortcut cmd+shift+f
- RLS crashes
I'm currently using RLS from the latest nightly.