-
Notifications
You must be signed in to change notification settings - Fork 51
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.NullPointerException: Cannot invoke "java.util.concurrent.CompletableFuture.thenRun(java.lang.Runnable)" because "this.initializeFuture" is null #748
Comments
…f `initializeFuture` is null or already done - Fixes redhat-developer#748
…f `initializeFuture` is null or already done - Fixes redhat-developer#748
I can confirm this, it happened to me. |
"java.util.concurrent.CompletableFuture.thenRun(java.lang.Runnable)" because "this.initializeFuture" is null Fixes redhat-developer#748 Signed-off-by: azerr <[email protected]>
"java.util.concurrent.CompletableFuture.thenRun(java.lang.Runnable)" because "this.initializeFuture" is null Fixes #748 Signed-off-by: azerr <[email protected]>
We merged a fix which seems to resolve the issue. The issue being intermittent (it's a race condition) makes it hard to be fully sure though. Feel free to reopen if it still happens to you. |
This is still appearing in 1.17.0.338. Any chance to cut a release soon with the fix? This is really annoying |
@adietish 1.17.0.338 contains this fix? |
Thanks @jeffmaury Anyway I plan to refactor this initialization to align it with LSP4E which has improved the start of the language server. |
The fix #765 for this was included in 1.17.1. See 02ba90c
Reopening. |
I would like to improve the start of language server, after I will finish #819 |
This error appeared again in 1.18.0.373:
|
Another NPE, maybe unrelated: Internal error: java.lang.NullPointerException: Cannot invoke "String.length()" because "suffix" is null
java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "String.length()" because "suffix" is null
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347)
at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:708)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162)
at com.redhat.devtools.intellij.quarkus.lsp4ij.IndexAwareLanguageClient.runTask(IndexAwareLanguageClient.java:101)
at com.redhat.devtools.intellij.quarkus.lsp4ij.IndexAwareLanguageClient$1.run(IndexAwareLanguageClient.java:76)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:429)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressInCurrentThread$11(CoreProgressManager.java:557)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressInCurrentThread(CoreProgressManager.java:557)
at com.intellij.openapi.progress.impl.CoreProgressManager.run(CoreProgressManager.java:363)
at com.redhat.devtools.intellij.quarkus.lsp4ij.IndexAwareLanguageClient.lambda$runAsBackground$0(IndexAwareLanguageClient.java:73)
at com.redhat.devtools.intellij.quarkus.lsp4ij.IndexAwareLanguageClient.lambda$runAsBackground$1(IndexAwareLanguageClient.java:87)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.NullPointerException: Cannot invoke "String.length()" because "suffix" is null
at java.base/java.lang.String.endsWith(String.java:2313)
at com.redhat.devtools.intellij.qute.psi.utils.AnnotationUtils.isMatchAnnotation(AnnotationUtils.java:85)
at com.redhat.devtools.intellij.qute.psi.internal.java.AbstractQuteTemplateLinkCollector.visitClass(AbstractQuteTemplateLinkCollector.java:139)
at com.intellij.psi.impl.source.PsiClassImpl.accept(PsiClassImpl.java:464)
at com.intellij.psi.impl.source.tree.SharedImplUtil.acceptChildren(SharedImplUtil.java:185)
at com.intellij.psi.impl.source.PsiFileImpl.acceptChildren(PsiFileImpl.java:765)
at com.intellij.psi.JavaRecursiveElementVisitor.visitElement(JavaRecursiveElementVisitor.java:44)
at com.intellij.psi.PsiElementVisitor.visitFile(PsiElementVisitor.java:51)
at com.intellij.psi.JavaElementVisitor.visitJavaFile(JavaElementVisitor.java:212)
at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.accept(PsiJavaFileBaseImpl.java:478)
at com.redhat.devtools.intellij.qute.psi.internal.java.QuarkusIntegrationForQute.diagnostics(QuarkusIntegrationForQute.java:51)
at com.redhat.devtools.intellij.qute.psi.QuteSupportForJava.diagnostics(QuteSupportForJava.java:86)
at com.redhat.devtools.intellij.qute.lsp.QuteLanguageClient.lambda$getJavaDiagnostics$12(QuteLanguageClient.java:134)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:891)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:69)
at com.redhat.devtools.intellij.qute.lsp.QuteLanguageClient.lambda$getJavaDiagnostics$13(QuteLanguageClient.java:134)
at com.redhat.devtools.intellij.quarkus.lsp4ij.IndexAwareLanguageClient.runTask(IndexAwareLanguageClient.java:97)
... 22 more |
My plan is to provide a console to see the lsp request responses which will help us to understand what it happens. After that I will work on #835 to improve start/stop of language server |
There is a line in LanguageServerWrapper.logMessage() that can echo the messages to the current console if you just want to debug it. The issue seems to be that some local threads are shutting down LS's on project switch and other threads are starting LS's for the new project and they need to be synchronised. |
Indeed there is this piece of code which seems causing some problem but I think that there are another piece of code which causes some other problem. My plan is to align LSP4IJ from LSP4E which improves the start/stop of language server and play with the start/stop of language server by debugging a language server (like microProfile) to emulate long time in itinitalize, etc. |
Performance and freeze problem should be fixed with #849 Please repoen if you find some again troubles |
Using 1.16.0.329 version. Getting the following error while working with the Quarkus project in https://github.com/quarkusio/registry.quarkus.io
The text was updated successfully, but these errors were encountered: