-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fly check panic #18954
Comments
There seems to be something else going on, the index there should always be in bounds, though we might be racing when the workspaces switch. |
Let me know if I can help diagnosing the issue |
Do you have a reproduction? |
I just have my huge project requiring some setup ... I would need to figure out how to repro the issue on a small repository but I have not the time for this right now ! |
I tried to build a minimal repro project for several hours but in vain ... Yet I do still have the error even with the latest version of r-a. The particularities of that project that may trigger the error above are the following:
I hope this will help you ... |
Even though I didn't find a way to reproduce the issue I may have found why this happens: My project is configured with
Moreover in the
Maybe I missed something but nowhere I found that the size of
Maybe you guys (more familiar with r-a code) know how to reproduce a case where that condition (1 element in flycheck and n>1 elements in workspaces) triggers but I am definitely not able to reproduce it elsewhere than in my big project you probably don't want to clone and look at. Nevertheless, this issue prevents r-a to perform well (because of the panic) on some part of my code, which is very annoying. This is why I made a low impact working patch: master...qjerome:rust-analyzer:fix-notification-panic Please let me know if you want me to make a PR or if you plan to find and fix the root cause. |
rust-analyzer version: 0.3.2264
rustc version: rustc 1.81.0 (eeb90cda1 2024-09-04)
editor or extension: VSCode
I am getting this error:
I checked the code at https://github.com/rust-lang/rust-analyzer/blob/1f717b0acdccf6969655a8a1ddf6b718dfba6ca6/crates/rust-analyzer/src/handlers/notification.rs#L333C1-L333C82 and it seems the accessed index is not checked against OOB access. As I am not very familiar with the r-a code base I am tempted to fix this just checking that
idx
is in bounds usingget
methods instead of[]
access but maybe it is the symptom of an issue that needs to be corrected elsewhere in the code.Cheers,
The text was updated successfully, but these errors were encountered: