Skip to content
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

Exception in log: Stub index points to a file with PSI stubs #684

Closed
ahus1 opened this issue Feb 23, 2021 · 6 comments
Closed

Exception in log: Stub index points to a file with PSI stubs #684

ahus1 opened this issue Feb 23, 2021 · 6 comments
Assignees

Comments

@ahus1
Copy link
Contributor

ahus1 commented Feb 23, 2021

Reported Exception by Sentry.

Plugin Version: 0.32.20
IntelliJ Details: IU 2020.3.2

Plugin Version
.ignore 4.0.3
AsciiDoc 0.32.20
Codota AI Autocomplete for Java and JavaScript 4.2.3
HashiCorp Terraform / HCL language support 0.7.10
Key Promoter X 2020.2.2
Kotlin 203-1.4.30-release-IJ7148.5
Kubernetes 203.7148.15
Makefile support 3.5.2
Maven Helper 4.10.193.000.0
PlantUML integration 4.3.1
Presentation Assistant 1.0.9
SonarLint 4.14.1.27745
String Manipulation 8.10.191.000.0
java.lang.Throwable: Stub index points to a file with PSI stubs (instead of non-PSI ones): file = file:///Users/***/.idea/libraries/Maven__io_zipkin_brave_brave_instrumentation_messaging_5_10_1.xml, file type = com.intellij.ide.highlighter.XmlFileType@788f5797, indexed file type = com.intellij.ide.highlighter.XmlFileType@788f5797
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:159)
    at com.intellij.psi.stubs.StubProcessingHelperBase.handleNonPsiStubs(StubProcessingHelperBase.java:135)
    at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:66)
    at com.intellij.psi.stubs.StubIndexImpl.lambda$processElements$2(StubIndexImpl.java:291)
    at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:327)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:105)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:93)
    at org.asciidoc.intellij.psi.AsciiDocSectionKeyIndex.get(AsciiDocSectionKeyIndex.java:35)
    at org.asciidoc.intellij.psi.AsciiDocFileUtil.findSections(AsciiDocFileUtil.java:38)
    at org.asciidoc.intellij.psi.AsciiDocChooseByNameContributor.getNames(AsciiDocChooseByNameContributor.java:17)
    at com.intellij.ide.util.gotoByName.ContributorsBasedGotoByModel.processContributorNames(ContributorsBasedGotoByModel.java:127)
    at com.intellij.ide.util.gotoByName.ContributorsBasedGotoByModel$1.processInReadAction(ContributorsBasedGotoByModel.java:86)
    at com.intellij.ide.util.gotoByName.ContributorsBasedGotoByModel$1.processInReadAction(ContributorsBasedGotoByModel.java:80)
    at com.intellij.openapi.application.ReadActionProcessor.lambda$process$0(ReadActionProcessor.java:25)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:885)
    at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
    at com.intellij.openapi.application.ReadActionProcessor.process(ReadActionProcessor.java:25)
    at com.intellij.concurrency.JobLauncherImpl.lambda$invokeConcurrentlyUnderProgress$0(JobLauncherImpl.java:50)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
    at com.intellij.concurrency.JobLauncherImpl.lambda$invokeConcurrentlyUnderProgress$1(JobLauncherImpl.java:50)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1137)
    at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
    at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
    at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:86)
    at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
@ahus1 ahus1 self-assigned this Feb 23, 2021
@ahus1
Copy link
Contributor Author

ahus1 commented Feb 23, 2021

Note to future self: I'm tempted to add

    if (!(stub.getPsi().getContainingFile() instanceof PsiFileWithStubSupport)) {
      return;
    }

to AsciiDocSectionStubElementType#indexStub to avoid having Stubs in the wrong places.

@YannCebron
Copy link

FTR this is fixed in 2021.1 in platform. waiting for more information

@YannCebron
Copy link

Unfortunately we do not plan to backport these fixes to earlier platforms.

@ahus1
Copy link
Contributor Author

ahus1 commented Feb 24, 2021

@YannCebron - thanks for investigating this. As it looked like an issue for the plugin I didn't open an issue on YouTrack.

As there is no plan to back-port the fix, is there I workaround I can apply in the plugin? If you could provide a link to an issue, or a link to a commit I might investigate myself. Thanks!

@YannCebron
Copy link

There is no workaround for this unfortunately.

@ahus1
Copy link
Contributor Author

ahus1 commented Feb 24, 2021

Closing this as unable to fix/waiting for upstream to fix it.

@ahus1 ahus1 closed this as completed Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants