KronicDeth / intellij-elixir

Elixir plugin for JetBrain's IntelliJ Platform (including Rubymine)
Other
1.84k stars 154 forks source link

Stub ids not found for key in index = elixir.all.name #1947

Open delitescere opened 3 years ago

delitescere commented 3 years ago

Version

11.10.0

What I was doing

Newly set up project, added Erlang (23) and Elixir (1.12.0-otp-23) SDKs, finished indexing

Exceptions

Exception 0

Stacktrace

java.lang.Throwable: Stub ids not found for key in index = elixir.all.name, file = file:///Users/josh.graham/Code/VuYa/pitch/test/pitch/account_test.exs, file type = org.elixir_lang.ElixirScriptFileType@74657c91, indexed file type = org.elixir_lang.ElixirScriptFileType@74657c91
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:161)
    at com.intellij.psi.stubs.StubProcessingHelper.retrieveStubIdList(StubProcessingHelper.java:65)
    at com.intellij.psi.stubs.StubIndexImpl.lambda$processElements$4(StubIndexImpl.java:323)
    at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1737)
    at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:322)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:92)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:80)
    at org.elixir_lang.psi.scope.module.Variants.projectNameElements(Variants.kt:117)
    at org.elixir_lang.psi.scope.module.Variants.access$projectNameElements(Variants.kt:23)
    at org.elixir_lang.psi.scope.module.Variants$Companion.lookupElementList(Variants.kt:153)
    at org.elixir_lang.reference.Module.getVariants(Module.kt:16)
    at org.elixir_lang.reference.Module.getVariants(Module.kt:13)
    at com.intellij.codeInsight.completion.CompletionData.completeReference(CompletionData.java:247)
    at com.intellij.codeInsight.completion.CompletionVariant.addReferenceCompletions(CompletionVariant.java:124)
    at com.intellij.codeInsight.completion.CompletionData.completeReference(CompletionData.java:67)
    at com.intellij.codeInsight.completion.LegacyCompletionContributor.lambda$completeReference$0(LegacyCompletionContributor.java:75)
    at com.intellij.codeInsight.completion.LegacyCompletionContributor.processReference(LegacyCompletionContributor.java:129)
    at com.intellij.codeInsight.completion.LegacyCompletionContributor.processReferences(LegacyCompletionContributor.java:112)
    at com.intellij.codeInsight.completion.LegacyCompletionContributor.completeReference(LegacyCompletionContributor.java:73)
    at com.intellij.codeInsight.completion.LegacyCompletionContributor.fillCompletionVariants(LegacyCompletionContributor.java:54)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:77)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:154)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:146)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:142)
    at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$1.addCompletions(LiveTemplateCompletionContributor.java:89)
    at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:34)
    at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:156)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:77)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:60)
    at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:133)
    at com.intellij.codeInsight.completion.BaseCompletionService.performCompletion(BaseCompletionService.java:41)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.lambda$calculateItems$12(CompletionProgressIndicator.java:863)
    at com.intellij.util.indexing.FileBasedIndex.lambda$ignoreDumbMode$0(FileBasedIndex.java:163)
    at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
    at com.intellij.util.indexing.FileBasedIndexEx.ignoreDumbMode(FileBasedIndexEx.java:574)
    at com.intellij.util.indexing.FileBasedIndex.ignoreDumbMode(FileBasedIndex.java:162)
    at com.intellij.util.indexing.DumbModeAccessType.ignoreDumbMode(DumbModeAccessType.java:43)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.calculateItems(CompletionProgressIndicator.java:859)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.runContributors(CompletionProgressIndicator.java:847)
    at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$6(CodeCompletionHandlerBase.java:353)
    at com.intellij.codeInsight.completion.AsyncCompletion.lambda$tryReadOrCancel$5(CompletionThreading.java:172)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096)
    at com.intellij.codeInsight.completion.AsyncCompletion.tryReadOrCancel(CompletionThreading.java:170)
    at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$7(CodeCompletionHandlerBase.java:345)
    at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$0(CompletionThreading.java:95)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
    at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$1(CompletionThreading.java:91)
    at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
    at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:265)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:834)
KronicDeth commented 3 years ago

I'm not sure how this can happen with the Stub Index API. I would assume that it should just return no results. I don't understand why it is an error.

KronicDeth commented 3 years ago

@delitescere I opened https://youtrack.jetbrains.com/issue/IDEA-272704 to see if JetBrains can explain how to avoid the error when calling the API.