redhat-developer / lsp4ij

LSP Client for IntelliJ
Eclipse Public License 2.0
85 stars 16 forks source link

Argument for @NotNull parameter 'cancellationSupport' of com/redhat/devtools/lsp4ij/features/highlight/LSPHighlightSupport.getHighlights must not be null #486

Open hc42 opened 2 weeks ago

hc42 commented 2 weeks ago

Happens after opening a project:

java.lang.IllegalArgumentException: Argument for @NotNull parameter 'cancellationSupport' of com/redhat/devtools/lsp4ij/features/highlight/LSPHighlightSupport.getHighlights must not be null
    at com.redhat.devtools.lsp4ij.features.highlight.LSPHighlightSupport.$$$reportNull$$$0(LSPHighlightSupport.java)
    at com.redhat.devtools.lsp4ij.features.highlight.LSPHighlightSupport.getHighlights(LSPHighlightSupport.java)
    at com.redhat.devtools.lsp4ij.features.highlight.LSPHighlightSupport.doLoad(LSPHighlightSupport.java:51)
    at com.redhat.devtools.lsp4ij.features.highlight.LSPHighlightSupport.doLoad(LSPHighlightSupport.java:38)
    at com.redhat.devtools.lsp4ij.features.AbstractLSPFeatureSupport.load(AbstractLSPFeatureSupport.java:88)
    at com.redhat.devtools.lsp4ij.features.AbstractLSPDocumentFeatureSupport.load(AbstractLSPDocumentFeatureSupport.java:65)
    at com.redhat.devtools.lsp4ij.features.AbstractLSPFeatureSupport.getFeatureData(AbstractLSPFeatureSupport.java:49)
    at com.redhat.devtools.lsp4ij.features.highlight.LSPHighlightSupport.getHighlights(LSPHighlightSupport.java:45)
    at com.redhat.devtools.lsp4ij.features.highlight.LSPHighlightUsagesHandlerFactory.getTargets(LSPHighlightUsagesHandlerFactory.java:79)
    at com.redhat.devtools.lsp4ij.features.highlight.LSPHighlightUsagesHandlerFactory.createHighlightUsagesHandler(LSPHighlightUsagesHandlerFactory.java:58)
    at com.intellij.codeInsight.highlighting.HighlightUsagesHandlerFactory.createHighlightUsagesHandler(HighlightUsagesHandlerFactory.java:30)
    at com.intellij.codeInsight.highlighting.HighlightUsagesHandler.createCustomHandler(HighlightUsagesHandler.java:108)
    at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:77)
    at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$submitIdentifierHighlighterPass$8(BackgroundHighlighter.java:317)
    at com.intellij.codeInsight.daemon.impl.HighlightingSessionImpl.runInsideHighlightingSession(HighlightingSessionImpl.java:170)
    at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$submitIdentifierHighlighterPass$9(BackgroundHighlighter.java:314)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:66)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:155)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:138)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:96)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:217)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:96)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:135)
    at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$submitIdentifierHighlighterPass$10(BackgroundHighlighter.java:311)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor.callWrapped(NonBlockingReadActionImpl.java:840)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor$MonitoredComputation.call(NonBlockingReadActionImpl.java:872)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:604)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$4(NonBlockingReadActionImpl.java:567)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:291)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:93)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:66)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:155)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:138)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:96)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:217)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:96)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:135)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:93)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:567)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:466)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$2(NonBlockingReadActionImpl.java:481)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
    at java.base/java.lang.Thread.run(Thread.java:1583)

IDE information:

IntelliJ IDEA 2024.2.0.2 (Ultimate Edition)
Build #IU-242.20224.419, built on August 19, 2024
Runtime version: 21.0.3+13-b509.4 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 5.19.0-50-generic
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 16384M
Cores: 8
Registry:
  debugger.watches.in.variables=false
  ide.experimental.ui=true
Non-Bundled Plugins:
  .....
  com.redhat.devtools.lsp4ij (0.4.1-20240823-013250)
Kotlin: 242.20224.419-IJ
Current Desktop: ubuntu:GNOME
fbricon commented 2 weeks ago

what language server are you using?

turkeylurkey commented 2 weeks ago

Not suspicious at all.

hc42 commented 2 weeks ago

what language server are you using?

Java / OpenJDK11

fbricon commented 2 weeks ago

That's not a language server. Given you've opened issues on intellij-quarkus, I imagine this might be the Microprofile or Qute LS. Any particular files were opened when the error occured?

angelozerr commented 2 weeks ago

@hc42 I cannot reproduce your issue.

Could you please download the zip from https://github.com/redhat-developer/lsp4ij/actions/runs/10633923459 and install it (see https://github.com/redhat-developer/lsp4ij?tab=readme-ov-file#testing-the-ci-builds) and tell me if it fixes your issue.

Thanks!

hc42 commented 2 weeks ago

Yes, I will try it. But it will take me two weeks until I find time to do so. I'm sorry for that.