Skip to content

rust-analyzer service panics #13170

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

Closed
l3utterfly opened this issue Sep 2, 2022 · 5 comments
Closed

rust-analyzer service panics #13170

l3utterfly opened this issue Sep 2, 2022 · 5 comments
Labels
A-inlay-hints inlay/inline hints Broken Window Bugs / technical debt to be addressed immediately I-panic

Comments

@l3utterfly
Copy link

rust-analyzer version: 0.3.1186-standalone (e8e598f 2022-08-28)

rustc version: rustc 1.65.0-nightly (e1b28cd2f 2022-08-19)

relevant settings: VSCode install

Rust analyser stops working randomly in my project with the following panic message:

thread 'Worker' panicked at 'assertion failed: start <= end', C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\text-size-1.1.0\src\range.rs:48:9
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\panicking.rs:584
   1: core::panicking::panic_fmt
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src\panicking.rs:142
   2: core::panicking::panic
             at /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\core\src\panicking.rs:48
   3: rust_analyzer::from_proto::text_range
   4: rust_analyzer::from_proto::file_range
   5: rust_analyzer::handlers::handle_inlay_hints_resolve
   6: std::panicking::try
   7: <F as threadpool::FnBox>::call_box
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Unfortunately it happens in a big project of mine which I cannot share the source code.

@Veykril Veykril added the Broken Window Bugs / technical debt to be addressed immediately label Sep 7, 2022
@lnicola
Copy link
Member

lnicola commented Oct 10, 2022

Do you know if this happens in specific situations like switching git branches?

@Veykril
Copy link
Member

Veykril commented Oct 10, 2022

Oh this was already reported here, I didn't see that. I wrote down the likely cause here #13372

@Veykril
Copy link
Member

Veykril commented Nov 7, 2022

Closing as a duplicate of #13372

@Veykril Veykril closed this as completed Nov 7, 2022
@Veykril
Copy link
Member

Veykril commented Nov 7, 2022

Actually this is not a dupe, the explanation I gave in #13372 is relevant for this one, I misinterpreted #13372 😅

@Veykril Veykril reopened this Nov 7, 2022
bors added a commit that referenced this issue Nov 7, 2022
internal: error instead of panic on invalid file range

Fixes the panic in #13170
bors added a commit that referenced this issue Nov 29, 2022
…a, r=jonas-schievink

internal: Version the inlay hint resolve data

cc #13657
cc #13372
cc #13170

This will make us log an error and return the unmodified inlay hints when the client attempts to resolve inlay hints in a file that has since been modified.
bors added a commit that referenced this issue Nov 29, 2022
…a, r=jonas-schievink

internal: Version the inlay hint resolve data

cc #13657
cc #13372
cc #13170

This will make us log an error and return the unmodified inlay hints when the client attempts to resolve inlay hints in a file that has since been modified.
@Veykril Veykril added I-panic A-inlay-hints inlay/inline hints labels Feb 9, 2023
@Veykril
Copy link
Member

Veykril commented Feb 9, 2023

No longer relevant as we got rid of the resolve calls

@Veykril Veykril closed this as completed Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-inlay-hints inlay/inline hints Broken Window Bugs / technical debt to be addressed immediately I-panic
Projects
None yet
Development

No branches or pull requests

3 participants