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

[IDEA] PSI and index do not match exception #10

Open
lisachenko opened this issue May 2, 2016 · 6 comments
Open

[IDEA] PSI and index do not match exception #10

lisachenko opened this issue May 2, 2016 · 6 comments

Comments

@lisachenko
Copy link
Member

This exception is raised by IDEA after switching Git branches:

PSI and index do not match
Please report the problem to JetBrains with the file attached
 file=PHP file, file.class=class com.jetbrains.php.lang.psi.PhpFileImpl, file.lang=Language: PHP, modStamp=5
 tree consistent
 stub debugInfo=created in getStubTree(), no AST; with backReference
 document before=null
latestIndexedStub=null
 viewProvider=PhpFileViewProvider{myVirtualFile=file:///Users/lisachenko/Work/go-aop-php/src/Proxy/AbstractProxy.php, content=VirtualFileContent{size=5066}}
 viewProvider stamp: 250109; file stamp: 266044; file modCount: 1462134443000; file length: 5066
 doc saved: true; doc stamp: 250109; doc size: 7162; committed: true
in many projects: false
indexing info: indexed at 1462134443000 with size 5066
java.lang.Throwable
    at com.intellij.psi.impl.DebugUtil.currentStackTrace(DebugUtil.java:497)
    at com.intellij.psi.stubs.StubProcessingHelper.stubTreeAndIndexDoNotMatch(StubProcessingHelper.java:43)
    at com.intellij.psi.stubs.StubProcessingHelperBase.a(StubProcessingHelperBase.java:172)
    at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:162)
    at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:52)
    at com.intellij.psi.stubs.StubIndexImpl$1.process(StubIndexImpl.java:231)
    at com.intellij.psi.stubs.StubIndexImpl$StubIdListContainerAction.perform(StubIndexImpl.java:582)
    at com.intellij.psi.stubs.StubIndexImpl$StubIdListContainerAction.perform(StubIndexImpl.java:570)
    at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:81)
    at com.intellij.psi.stubs.StubIndexImpl.a(StubIndexImpl.java:252)
    at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:223)
    at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:212)
    at com.aopphp.go.pointcut.PointcutAdvisor.getMatchedElements(PointcutAdvisor.java:95)
    at com.aopphp.go.line.marker.AdvisorLineMarkerProvider.collectNavigationMarkers(AdvisorLineMarkerProvider.java:53)
    at com.intellij.codeInsight.daemon.RelatedItemLineMarkerProvider.collectNavigationMarkers(RelatedItemLineMarkerProvider.java:48)
    at com.intellij.codeInsight.daemon.RelatedItemLineMarkerProvider.collectSlowLineMarkers(RelatedItemLineMarkerProvider.java:39)
    at com.intellij.codeInsight.daemon.impl.SlowLineMarkersPass.addLineMarkers(SlowLineMarkersPass.java:78)
    at com.intellij.codeInsight.daemon.impl.SlowLineMarkersPass.doCollectInformation(SlowLineMarkersPass.java:65)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:67)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:444)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1169)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:435)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:446)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:432)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:206)
    at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
    at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
    at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
    at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)
@lisachenko lisachenko added the bug label May 2, 2016
@artspb
Copy link
Contributor

artspb commented Nov 17, 2017

I don't think this relates to your code as you don't have any stub indices.

@lisachenko
Copy link
Member Author

@artspb but there are lines in trace from my plugin:

at com.aopphp.go.pointcut.PointcutAdvisor.getMatchedElements(PointcutAdvisor.java:95)
at com.aopphp.go.line.marker.AdvisorLineMarkerProvider.collectNavigationMarkers(AdvisorLineMarkerProvider.java:53)

So maybe there should be some synchronization between threads, etc...

@artspb
Copy link
Contributor

artspb commented Nov 20, 2017

No, not really. It seems that the stub index is corrupted for some reason. Do you have the .gitignore plugin installed BTW?

Also, you can rewrite this code using PhpIndex. It also relies on the stub index but has one huge advantage: it's backed by the cache.

@lisachenko
Copy link
Member Author

lisachenko commented Nov 21, 2017

Do you have the .gitignore plugin installed BTW?

No, I haven't.

Also, you can rewrite this code using PhpIndex. It also relies on the stub index but has one huge advantage: it's backed by the cache.

This could be interesting ) But if I remember correctly, stub index was recommended for use, because it is fast, isn't it? Or PhpIndex use additional runtime caching?

@lisachenko
Copy link
Member Author

Removed the "bug" label because it doesn't relate directly to the plugin and is not reproducing in new versions of PhpStorm.

@artspb
Copy link
Contributor

artspb commented Nov 21, 2017

But if I remember correctly, stub index was recommended for use, because it is fast, isn't it? Or PhpIndex use additional runtime caching?

Yes, PhpIndex does basically the same as you do but with additional in-memory cache which is shared between all its users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants