Netflix / dgs-intellij-plugin

Apache License 2.0
22 stars 11 forks source link

Must be executed under progress indicator: com.intellij.openapi.progress.EmptyProgressIndicator@5a0e5166. Please see e.g. ProgressManager.runProcess() #33

Closed NitroBlade91 closed 2 years ago

NitroBlade91 commented 2 years ago

Hi all, since last two weeks I get error thrown by "DGS plugin" over and over again making it impossible to use the plugin.

System: MacOS Monterey

Intellij Version

IntelliJ IDEA 2022.1.1 (Ultimate Edition)
Runtime version: 11.0.14.1+1-b2043.45 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

image

Stack trace :

java.lang.NullPointerException
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:603)
    at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:678)
    at java.base/java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:722)
    at com.intellij.concurrency.JobLauncherImpl.processQueue(JobLauncherImpl.java:357)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.processInOrder(InspectionRunner.java:293)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.visitElements(InspectionRunner.java:268)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$inspect$5(InspectionRunner.java:121)
    at com.intellij.codeInspection.InspectionEngine.withSession(InspectionEngine.java:226)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.inspect(InspectionRunner.java:109)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:132)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:97)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:419)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1152)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:412)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:411)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:387)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:213)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:385)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:184)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.NullPointerException: null cannot be cast to non-null type org.jetbrains.uast.UMethod
    at com.netflix.dgs.plugin.hints.DgsInputArgumentInspector$buildVisitor$1.visitMethod(DgsInputArgumentInspector.kt:69)
    at org.jetbrains.uast.UMethod$DefaultImpls.accept(UMethod.kt:42)
    at org.jetbrains.uast.kotlin.KotlinUMethod.accept(KotlinUMethod.kt:18)
    at com.intellij.uast.UastVisitorAdapter.visitElement(UastVisitorAdapter.java:32)
    at org.jetbrains.kotlin.psi.KtElementImplStub.accept(KtElementImplStub.java:52)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$10(InspectionRunner.java:317)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1152)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$11(InspectionRunner.java:296)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:213)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$12(InspectionRunner.java:330)
    at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:159)
    at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:151)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$13(InspectionRunner.java:294)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$14(InspectionRunner.java:294)
    at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:297)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:282)
    at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:270)
    at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1448)
    ... 5 more
srinivasankavitha commented 2 years ago

Thanks for reporting. Could you also describe if you were doing anything in particular to reproduce the problem?

On Wed, Jun 1, 2022 at 11:28 PM NitroBlade91 @.***> wrote:

Hi all, since last two weeks I get error thrown by "DGS plugin" over and over again making it impossible to use the plugin.

System: MacOS Monterey

Intellij Version

IntelliJ IDEA 2022.1.1 (Ultimate Edition) Runtime version: 11.0.14.1+1-b2043.45 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

Stack trace :

at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182) at com.intellij.openapi.progress.impl.CoreProgressManager.assertUnderProgress(CoreProgressManager.java:996) at com.intellij.psi.impl.search.PsiSearchHelperImpl.processFilesConcurrentlyDespiteWriteActions(PsiSearchHelperImpl.java:428) at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processPsiFileRoots$8(PsiSearchHelperImpl.java:397) at com.intellij.psi.impl.PsiManagerImpl.runInBatchFilesMode(PsiManagerImpl.java:451) at com.intellij.psi.impl.search.PsiSearchHelperImpl.processPsiFileRoots(PsiSearchHelperImpl.java:393) at com.intellij.psi.impl.search.PsiSearchHelperImpl.processCandidates(PsiSearchHelperImpl.java:908) at com.intellij.psi.impl.search.PsiSearchHelperImpl.processGlobalRequests(PsiSearchHelperImpl.java:878) at com.intellij.psi.impl.search.PsiSearchHelperImpl.processGlobalRequestsOptimized(PsiSearchHelperImpl.java:844) at com.intellij.psi.impl.search.PsiSearchHelperImpl.processRequests(PsiSearchHelperImpl.java:769) at com.intellij.psi.search.SearchRequestQuery.processResults(SearchRequestQuery.java:24) at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:91) at com.intellij.util.AbstractQuery.delegateProcessResults(AbstractQuery.java:108) at com.intellij.util.MergeQuery.processResults(MergeQuery.java:22) at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:91) at com.intellij.util.AbstractQuery.delegateProcessResults(AbstractQuery.java:108) at com.intellij.util.UniqueResultsQuery.processResults(UniqueResultsQuery.java:37) at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:91) at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:83) at com.intellij.model.search.impl.XQuery.processResults(XQuery.kt:13) at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:91) at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:83) at com.intellij.util.AbstractQuery.findAll(AbstractQuery.java:28) at com.intellij.util.Query.iterator(Query.java:129) at com.intellij.util.AbstractQuery.iterator(AbstractQuery.java:39) at com.squareup.sqldelight.intellij.SqlDelightGotoDeclarationHandler.targetData(SqlDelightGotoDeclarationHandler.kt:213) at com.squareup.sqldelight.intellij.SqlDelightGotoDeclarationHandler.getGotoDeclarationTargets(SqlDelightGotoDeclarationHandler.kt:61) at com.intellij.codeInsight.navigation.impl.GtdProvidersKt.fromGTDProvidersInner(gtdProviders.kt:31) at com.intellij.codeInsight.navigation.impl.GtdProvidersKt.access$fromGTDProvidersInner(gtdProviders.kt:1) at com.intellij.codeInsight.navigation.impl.GtdProvidersKt$fromGTDProviders$1.invoke(gtdProviders.kt:18) at com.intellij.codeInsight.navigation.impl.GtdProvidersKt$fromGTDProviders$1.invoke(gtdProviders.kt) at com.intellij.codeInsight.navigation.impl.CommonKt.processInjectionThenHost(common.kt:25) at com.intellij.codeInsight.navigation.impl.GtdProvidersKt.fromGTDProviders(gtdProviders.kt:17) at com.intellij.codeInsight.navigation.actions.GotoDeclarationOrUsageHandler2.gotoDeclarationOrUsages(GotoDeclarationOrUsageHandler2.kt:30) at com.intellij.codeInsight.navigation.actions.GotoDeclarationOrUsageHandler2.getCtrlMouseData(GotoDeclarationOrUsageHandler2.kt:41) at com.intellij.codeInsight.navigation.actions.GotoDeclarationAction.getCtrlMouseData(GotoDeclarationAction.java:95) at com.intellij.codeInsight.navigation.CtrlMouseHandler2$computeInReadAction$1.invoke(CtrlMouseHandler.kt:235) at com.intellij.codeInsight.navigation.CtrlMouseHandler2$computeInReadAction$1.invoke(CtrlMouseHandler.kt:77) at com.intellij.lang.documentation.ide.impl.DocumentationTargetHoverInfoKt.injectedThenHost(DocumentationTargetHoverInfo.kt:76) at com.intellij.codeInsight.navigation.CtrlMouseHandler2.computeInReadAction(CtrlMouseHandler.kt:234) at com.intellij.codeInsight.navigation.CtrlMouseHandler2.access$computeInReadAction(CtrlMouseHandler.kt:77) at com.intellij.codeInsight.navigation.CtrlMouseHandler2$compute$2$1.invoke(CtrlMouseHandler.kt:222) at com.intellij.codeInsight.navigation.CtrlMouseHandler2$compute$2$1.invoke(CtrlMouseHandler.kt:77) at com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:96) at com.intellij.openapi.application.rw.InternalReadAction.access$insideReadAction(InternalReadAction.kt:13) at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$1.invoke(InternalReadAction.kt:81) at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$1.invoke(InternalReadAction.kt:13) at com.intellij.openapi.progress.CancellationKt$sam$com_intellij_openapi_util_ThrowableComputable$0.compute(cancellation.kt) at com.intellij.openapi.progress.Cancellation.withJob(Cancellation.java:60) at com.intellij.openapi.progress.CancellationKt.withJob(cancellation.kt:14) at com.intellij.openapi.progress.CancellationKt.executeWithJobAndCompleteIt(cancellation.kt:111) at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$2$1.run(cancellableReadAction.kt:34) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1152) at com.intellij.openapi.application.rw.CancellableReadActionKt$cancellableReadActionInternal$2.run(cancellableReadAction.kt:32) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:158) at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:30) at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable(InternalReadAction.kt:80) at com.intellij.openapi.application.rw.InternalReadAction.access$tryReadCancellable(InternalReadAction.kt:13) at com.intellij.openapi.application.rw.InternalReadAction$tryReadAction$2.invoke(InternalReadAction.kt:66) at com.intellij.openapi.application.rw.InternalReadAction$tryReadAction$2.invoke(InternalReadAction.kt:13) at com.intellij.openapi.progress.CancellationKt$sam$com_intellij_openapi_util_ThrowableComputable$0.compute(cancellation.kt) at com.intellij.openapi.progress.Cancellation.withJob(Cancellation.java:60) at com.intellij.openapi.progress.CancellationKt.withJob(cancellation.kt:14) at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:138) at com.intellij.openapi.application.rw.InternalReadAction.tryReadAction(InternalReadAction.kt:61) at com.intellij.openapi.application.rw.InternalReadAction.readLoop(InternalReadAction.kt:53) at com.intellij.openapi.application.rw.InternalReadAction.access$readLoop(InternalReadAction.kt:13) at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invokeSuspend(InternalReadAction.kt:33) at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$4.invoke(InternalReadAction.kt) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89) at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264) at com.intellij.openapi.application.rw.InternalReadAction.runReadAction(InternalReadAction.kt:32) at com.intellij.openapi.application.rw.PlatformReadActionSupport.executeReadAction(PlatformReadActionSupport.kt:24) at com.intellij.openapi.application.CoroutinesKt.constrainedReadAction(coroutines.kt:50) at com.intellij.codeInsight.navigation.CtrlMouseHandler2$compute$2.invokeSuspend(CtrlMouseHandler.kt:221) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

— Reply to this email directly, view it on GitHub https://github.com/Netflix/dgs-intellij-plugin/issues/33, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ5JPXI23TLKMYI7AG63HATVNBIAXANCNFSM5XT4HQTA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

NitroBlade91 commented 2 years ago

Unfortunately this happens as soon as I open any project with the plugin enabled. I am not doing anything special to cause this error.

berngp commented 2 years ago

@NitroBlade91 , is that the complete stacktrace? I don't see any reference of the DGS Plugin's code in it. Could you please include the error message along with the full stacktrace please?

NitroBlade91 commented 2 years ago

@berngp Sorry, my mistake. I have corrected the request with the full stacktrace.

berngp commented 2 years ago

@NitroBlade91 , this should have been fixed in the later version.

berngp commented 2 years ago

@NitroBlade91 , will close this issue since I think it was addressed already. Please feel free to re-open and please keep your feedback coming.

srinivasankavitha commented 2 years ago

It's hard to troubleshoot without a repro scenario. You could try updating IntelliJ if you haven't already and ensure you have the latest DGS plugin installed.

On Thu, Jun 2, 2022 at 10:26 PM NitroBlade91 @.***> wrote:

Unfortunately this happens as soon as I open any project with the plugin enabled. I am not doing anything special to cause this error.

— Reply to this email directly, view it on GitHub https://github.com/Netflix/dgs-intellij-plugin/issues/33#issuecomment-1145596917, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ5JPXICILPOHWUTPJ2ADULVNGJQLANCNFSM5XT4HQTA . You are receiving this because you commented.Message ID: @.***>