IntelliJ IDEA 2022.3.2版本中正常使用报告出现IDE错误,但软件正常运行无崩溃,插件仍可正常使用(不知道是不是win11 dev版的锅)
可能的解决方案
什么都不用干,插件仍能正常使用
重现错误场景
提供代码片段或截图
java.lang.Throwable: Stub index points to a file without PSI: file = jrt://C:/Program Files/Java/jdk-17!/java.base/jdk/internal/module/SystemModules$all.class, file type = com.intellij.ide.highlighter.JavaClassFileType@20bcb8d0, indexed file type = com.intellij.ide.highlighter.JavaClassFileType@20bcb8d0, indexing stamp info = indexing timestamp = 1674537769039, binary = true, byte size = 78887, char size = -1, used scope = com.intellij.psi.impl.search.JavaSourceFilterScope[Union: (Module-with-dependencies:ewrite compile-only:true include-libraries:true include-other-modules:true include-tests:false,File: LightVirtualFile: \GUI.java)]
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:52)
at com.intellij.psi.stubs.StubIndexEx.lambda$processElements$4(StubIndexEx.java:148)
at com.intellij.psi.stubs.StubIndexEx.processElements(StubIndexEx.java:212)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:103)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:91)
at com.intellij.psi.impl.java.stubs.index.JavaShortClassNameIndex.get(JavaShortClassNameIndex.java:35)
at com.intellij.psi.impl.PsiShortNamesCacheImpl.getClassesByName(PsiShortNamesCacheImpl.java:49)
at com.intellij.psi.impl.CompositeShortNamesCache.getClassesByName(CompositeShortNamesCache.java:68)
at com.intellij.psi.impl.search.AllClassesSearchExecutor.lambda$processByName$3(AllClassesSearchExecutor.java:80)
at com.intellij.openapi.project.DumbService.lambda$runReadActionInSmartMode$0(DumbService.java:112)
at com.intellij.openapi.project.DumbService.runReadActionInSmartMode(DumbService.java:143)
at com.intellij.openapi.project.DumbService.runReadActionInSmartMode(DumbService.java:112)
at com.intellij.psi.impl.search.AllClassesSearchExecutor.processByName(AllClassesSearchExecutor.java:80)
at com.intellij.psi.impl.search.AllClassesSearchExecutor.processClassesByNames(AllClassesSearchExecutor.java:70)
at com.intellij.codeInsight.completion.AllClassesGetter.processJavaClasses(AllClassesGetter.java:137)
at com.intellij.codeInsight.completion.JavaClassNameCompletionContributor.addAllClasses(JavaClassNameCompletionContributor.java:192)
at com.intellij.codeInsight.completion.JavaNoVariantsDelegator.suggestNonImportedClasses(JavaNoVariantsDelegator.java:208)
at com.intellij.codeInsight.completion.JavaNoVariantsDelegator.fillCompletionVariants(JavaNoVariantsDelegator.java:76)
at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributor(CompletionService.java:81)
at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.lambda$getVariantsFromContributor$1(CompletionServiceImpl.java:321)
at com.intellij.diagnostic.telemetry.TraceKt.runWithSpan(trace.kt:74)
at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.getVariantsFromContributor(CompletionServiceImpl.java:320)
at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:73)
at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:152)
at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:144)
at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:140)
at com.github.tuchg.nonasciicodecompletionhelper.completion.contributors.ChineseCompletionContributor.fillCompletionVariants(ChineseCompletionContributor.kt:50)
at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributor(CompletionService.java:81)
at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.lambda$getVariantsFromContributor$1(CompletionServiceImpl.java:321)
at com.intellij.diagnostic.telemetry.TraceKt.runWithSpan(trace.kt:74)
at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.getVariantsFromContributor(CompletionServiceImpl.java:320)
at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:73)
at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:152)
at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:144)
at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:140)
at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$1.addCompletions(LiveTemplateCompletionContributor.java:88)
at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:23)
at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155)
at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributor(CompletionService.java:81)
at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.lambda$getVariantsFromContributor$1(CompletionServiceImpl.java:321)
at com.intellij.diagnostic.telemetry.TraceKt.runWithSpan(trace.kt:74)
at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.getVariantsFromContributor(CompletionServiceImpl.java:320)
at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:73)
at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:56)
at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:132)
at com.intellij.codeInsight.completion.BaseCompletionService.performCompletion(BaseCompletionService.java:40)
at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.lambda$performCompletion$2(CompletionServiceImpl.java:338)
at com.intellij.diagnostic.telemetry.TraceKt.runWithSpan(trace.kt:74)
at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.performCompletion(CompletionServiceImpl.java:327)
at com.intellij.codeInsight.completion.CompletionProgressIndicator.lambda$calculateItems$11(CompletionProgressIndicator.java:870)
at com.intellij.util.indexing.FileBasedIndex.lambda$ignoreDumbMode$0(FileBasedIndex.java:202)
at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:112)
at com.intellij.util.indexing.FileBasedIndexEx.ignoreDumbMode(FileBasedIndexEx.java:727)
at com.intellij.util.indexing.FileBasedIndex.ignoreDumbMode(FileBasedIndex.java:201)
at com.intellij.util.indexing.DumbModeAccessType.ignoreDumbMode(DumbModeAccessType.java:43)
at com.intellij.codeInsight.completion.CompletionProgressIndicator.calculateItems(CompletionProgressIndicator.java:866)
at com.intellij.codeInsight.completion.CompletionProgressIndicator.runContributors(CompletionProgressIndicator.java:854)
at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$7(CodeCompletionHandlerBase.java:371)
at com.intellij.codeInsight.completion.AsyncCompletion.lambda$tryReadOrCancel$5(CompletionThreading.java:169)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1111)
at com.intellij.codeInsight.completion.AsyncCompletion.tryReadOrCancel(CompletionThreading.java:167)
at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$8(CodeCompletionHandlerBase.java:363)
at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$0(CompletionThreading.java:92)
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.codeInsight.completion.AsyncCompletion.lambda$startThread$1(CompletionThreading.java:88)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:246)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
请事先检查下列事项
编程语言
Java
预期表现
当前表现
IntelliJ IDEA 2022.3.2版本中正常使用报告出现IDE错误,但软件正常运行无崩溃,插件仍可正常使用(不知道是不是win11 dev版的锅)
可能的解决方案
什么都不用干,插件仍能正常使用
重现错误场景
java.lang.Throwable: Stub index points to a file without PSI: file = jrt://C:/Program Files/Java/jdk-17!/java.base/jdk/internal/module/SystemModules$all.class, file type = com.intellij.ide.highlighter.JavaClassFileType@20bcb8d0, indexed file type = com.intellij.ide.highlighter.JavaClassFileType@20bcb8d0, indexing stamp info = indexing timestamp = 1674537769039, binary = true, byte size = 78887, char size = -1, used scope = com.intellij.psi.impl.search.JavaSourceFilterScope[Union: (Module-with-dependencies:ewrite compile-only:true include-libraries:true include-other-modules:true include-tests:false,File: LightVirtualFile: \GUI.java)] at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202) at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:52) at com.intellij.psi.stubs.StubIndexEx.lambda$processElements$4(StubIndexEx.java:148) at com.intellij.psi.stubs.StubIndexEx.processElements(StubIndexEx.java:212) at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:103) at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:91) at com.intellij.psi.impl.java.stubs.index.JavaShortClassNameIndex.get(JavaShortClassNameIndex.java:35) at com.intellij.psi.impl.PsiShortNamesCacheImpl.getClassesByName(PsiShortNamesCacheImpl.java:49) at com.intellij.psi.impl.CompositeShortNamesCache.getClassesByName(CompositeShortNamesCache.java:68) at com.intellij.psi.impl.search.AllClassesSearchExecutor.lambda$processByName$3(AllClassesSearchExecutor.java:80) at com.intellij.openapi.project.DumbService.lambda$runReadActionInSmartMode$0(DumbService.java:112) at com.intellij.openapi.project.DumbService.runReadActionInSmartMode(DumbService.java:143) at com.intellij.openapi.project.DumbService.runReadActionInSmartMode(DumbService.java:112) at com.intellij.psi.impl.search.AllClassesSearchExecutor.processByName(AllClassesSearchExecutor.java:80) at com.intellij.psi.impl.search.AllClassesSearchExecutor.processClassesByNames(AllClassesSearchExecutor.java:70) at com.intellij.codeInsight.completion.AllClassesGetter.processJavaClasses(AllClassesGetter.java:137) at com.intellij.codeInsight.completion.JavaClassNameCompletionContributor.addAllClasses(JavaClassNameCompletionContributor.java:192) at com.intellij.codeInsight.completion.JavaNoVariantsDelegator.suggestNonImportedClasses(JavaNoVariantsDelegator.java:208) at com.intellij.codeInsight.completion.JavaNoVariantsDelegator.fillCompletionVariants(JavaNoVariantsDelegator.java:76) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributor(CompletionService.java:81) at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.lambda$getVariantsFromContributor$1(CompletionServiceImpl.java:321) at com.intellij.diagnostic.telemetry.TraceKt.runWithSpan(trace.kt:74) at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.getVariantsFromContributor(CompletionServiceImpl.java:320) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:73) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:152) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:144) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:140) at com.github.tuchg.nonasciicodecompletionhelper.completion.contributors.ChineseCompletionContributor.fillCompletionVariants(ChineseCompletionContributor.kt:50) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributor(CompletionService.java:81) at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.lambda$getVariantsFromContributor$1(CompletionServiceImpl.java:321) at com.intellij.diagnostic.telemetry.TraceKt.runWithSpan(trace.kt:74) at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.getVariantsFromContributor(CompletionServiceImpl.java:320) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:73) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:152) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:144) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:140) at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$1.addCompletions(LiveTemplateCompletionContributor.java:88) at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:23) at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributor(CompletionService.java:81) at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.lambda$getVariantsFromContributor$1(CompletionServiceImpl.java:321) at com.intellij.diagnostic.telemetry.TraceKt.runWithSpan(trace.kt:74) at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.getVariantsFromContributor(CompletionServiceImpl.java:320) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:73) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:56) at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:132) at com.intellij.codeInsight.completion.BaseCompletionService.performCompletion(BaseCompletionService.java:40) at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.lambda$performCompletion$2(CompletionServiceImpl.java:338) at com.intellij.diagnostic.telemetry.TraceKt.runWithSpan(trace.kt:74) at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.performCompletion(CompletionServiceImpl.java:327) at com.intellij.codeInsight.completion.CompletionProgressIndicator.lambda$calculateItems$11(CompletionProgressIndicator.java:870) at com.intellij.util.indexing.FileBasedIndex.lambda$ignoreDumbMode$0(FileBasedIndex.java:202) at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:112) at com.intellij.util.indexing.FileBasedIndexEx.ignoreDumbMode(FileBasedIndexEx.java:727) at com.intellij.util.indexing.FileBasedIndex.ignoreDumbMode(FileBasedIndex.java:201) at com.intellij.util.indexing.DumbModeAccessType.ignoreDumbMode(DumbModeAccessType.java:43) at com.intellij.codeInsight.completion.CompletionProgressIndicator.calculateItems(CompletionProgressIndicator.java:866) at com.intellij.codeInsight.completion.CompletionProgressIndicator.runContributors(CompletionProgressIndicator.java:854) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$7(CodeCompletionHandlerBase.java:371) at com.intellij.codeInsight.completion.AsyncCompletion.lambda$tryReadOrCancel$5(CompletionThreading.java:169) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1111) at com.intellij.codeInsight.completion.AsyncCompletion.tryReadOrCancel(CompletionThreading.java:167) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$8(CodeCompletionHandlerBase.java:363) at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$0(CompletionThreading.java:92) 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.codeInsight.completion.AsyncCompletion.lambda$startThread$1(CompletionThreading.java:88) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:246) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833)
使用环境