-
Notifications
You must be signed in to change notification settings - Fork 50
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
CompletionException - IndexOutOfBoundsException thrown #451
Comments
How pervasive is this error? Does it cause anything to fail? |
@cherylking I don't see any functionality affected. But i do see this error only on my windows-10 setup. It doesnt recreate on Mac. Frequency of the error in windows-10 : 4 to 5 times in 15 minutes of editing on jakarta specific java class. |
Mohan will re-test with latest build from @TrevCraw. Need to determine how pervasive this issue is. |
I am unable to reproduce with latest 23.0.6-SNAPSHOT version of vscode binary. |
In my testing with VSCode using the latest driver dated May 29th, liberty-dev-vscode-ext-23.0.6-SNAPSHOT.vsix, I was not able to recreate this exception. |
@dshimo could you please post the whole stacktrace? The stacktrace looks a bit different from the original reported exception. |
I realize the approach was wildly different from mohlogan's and may be an entirely different issue as I was not able to reproduce vscode#247 Here's the stacktrace regardless,
|
We made a fix related to this, the one that fixed the package name and class name of a snippet. Could you ensure you are using the latest lsp4jakarta? |
While trying to recreate code action failure for issue OpenLiberty/liberty-tools-vscode#247 i found following exception.
May 22, 2023 11:00:47 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
java.util.concurrent.CompletionException: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source)
at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source)
at java.base/java.util.Objects.checkIndex(Unknown Source)
at java.base/java.util.ArrayList.get(Unknown Source)
at org.eclipse.lsp4jakarta.commons.SnippetRegistry.lambda$getCompletionItem$0(SnippetRegistry.java:196)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
at org.eclipse.lsp4jakarta.commons.SnippetRegistry.getCompletionItem(SnippetRegistry.java:215)
at org.eclipse.lsp4jakarta.JakartaTextDocumentService.lambda$completion$2(JakartaTextDocumentService.java:122)
... 4 more
Issue recreated with following env:
OS: Windows
VSCode version:
Vscode extension: liberty-dev-vscode-ext-0.1.13-SNAPSHOT.vsix
Bundles: org.eclipse.lsp4jakarta.jdt.core-0.1.1-SNAPSHOT.jar, org.eclipse.lsp4jakarta.ls-0.1.1-SNAPSHOT-jar-with-dependencies.jar
To recreate: Type in and delete some text inside jakarta specific class.
The text was updated successfully, but these errors were encountered: