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

Rust Analyzer randomly panicing. #18228

Open
augustocdias opened this issue Oct 2, 2024 · 4 comments
Open

Rust Analyzer randomly panicing. #18228

augustocdias opened this issue Oct 2, 2024 · 4 comments
Labels
C-bug Category: bug I-panic

Comments

@augustocdias
Copy link

I'm having this error popping up randomly on neovim and always when that happens I have to restart rust analyzer to have it working again:

   Error  16:50:51 notify.error rust-analyzer: -32603: request handler panicked: Can't find FN@0..364 in AstIdMap:
[SyntaxNodePtr { kind: MACRO_ITEMS, range: 0..684 }, SyntaxNodePtr { kind: FN, range: 0..363 }, SyntaxNodePtr { kind: FN, range: 363..684 }, SyntaxNodePtr { kind: BLOCK_EXPR, range: 158..363 }, SyntaxNodePtr { kind: BLOCK_EXPR, range: 469..684 }, SyntaxNodePtr { kind: MACRO_CALL, range: 173..256 }, SyntaxNodePtr { kind: BLOCK_EXPR, range: 496..682 }, SyntaxNodePtr { kind: BLOCK_EXPR, range: 502..681 }]

Analyzer version: rust-analyzer 0.3.2129-standalone (822644d 2024-09-29)
Rustc version: rustc 1.83.0-nightly (363ae4188 2024-09-24)
Cargo version: cargo 1.83.0-nightly (eaee77dc1 2024-09-19)

I'm not sure how to reproduce... I'm editing the code on this repo/branch: https://github.com/wireapp/core-crypto/tree/feat/transaction
Maybe it is because it has a lot of errors due to a lot of refactoring that is ongoing there, but it is happening quite frequently.

@augustocdias augustocdias added the C-bug Category: bug label Oct 2, 2024
@ChayimFriedman2
Copy link
Contributor

Does it have a backtrace in the logs? Also, what file were you editing?

@augustocdias
Copy link
Author

It was crashing with different files. I couldn't find any pattern... I still have to face it again to see if there's any backtrace. I forgot to look into. Do I have to specify any config to rust-analyzer to generate it, or it will do by default?

@ChayimFriedman2
Copy link
Contributor

It should generate backtraces by default when panicking. They will be at Output>Rust Analyzer Language Server (in VSCode, not sure about other editors).

@augustocdias
Copy link
Author

Now that the error to happen, it doesn't anymore... Mayte it was solved in the last releases... I'll keep an eye on it and if it happens I'll update this issue. Feel free to close it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug I-panic
Projects
None yet
Development

No branches or pull requests

3 participants