-
Notifications
You must be signed in to change notification settings - Fork 54
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
java.lang.IndexOutOfBoundsException after deleting text when editing application.properties #1116
Comments
Do you have steps to reproduce this issue? did you delete/overwrite large chunks of the file? |
@fbricon I don't know the exact steps, but I could reproduce it again by deleting several lines in that file |
@gastaldi have you this issue with 1.25? |
@angelozerr yes, |
@gastaldi hard as I try, I can't reproduce. Which version of IJ are you using? |
IntelliJ IDEA 2023.2 (Ultimate Edition) - Build #IU-232.8660.185, built on July 26, 2023 |
After a troubleshooting session with @gastaldi we figured out the problem occurred when GitHub Copilot is turned on and provides suggestions. The workaround is to disable GitHub Copilot for properties files |
I dont understand the explanation. The original issue is about diagnostics not about completion suggestion, no? The issue is that à diagnostic is reported but with wrong line. We should take care of that when textrange is built. The question after that is why there is a wrong diagnostic? I hope really that it is bot à problem with document synch. @gastaldi when yiu have this issue if you type à property have you completion, diagnostics? |
@angelozerr @fbricon actually I now managed to reproduce it having the GitHub Copilot disabled, so I can confirm this isn't a problem with the plugin and GitHub Copilot. To reproduce you need to delete lines from Here are a couple of videos showing how to reproduce the error. You need to restart the IDE when the error happens to reproduce it again: With GitHub Pilot enabledScreen.Recording.2023-08-22.at.23.52.16.movWithout GH PilotScreen.Recording.2023-08-22.at.23.59.28.mov |
Thanks @gastaldi for your demo. I cannot reproduce it, but we need to take care of wrong diagnostic text editor that we should ignore. |
editing application.properties Fixes redhat-developer#1116 Signed-off-by: azerr <azerr@redhat.com>
@gastaldi I cannot reproduce your issue but I have created a PR #1123 which catch this error. This catch is important because LSP client cannot trust the language server and should take care of invalid text range for diagnostic. if you have time please test the PR.
I think the error is evry time but IJ caches the log error to avoid showing it on each key stroke. |
editing application.properties Fixes redhat-developer#1116 Signed-off-by: azerr <azerr@redhat.com>
editing application.properties Fixes #1116 Signed-off-by: azerr <azerr@redhat.com>
While editing an application.properties (like the one in https://github.com/quarkiverse/quarkus-ironjacamar/blob/main/integration-tests/src/main/resources/application.properties), I get the following IDE internal error:
The text was updated successfully, but these errors were encountered: