Atwix / phpstorm-plugin-feedback

6 stars 0 forks source link

[Bug] Outdated stub in index: file:///generated/code/Magento/Quote/Model/QuoteFactory.php indexing timestamp = 1698259891939, binary = false, byte size = 1061, char size = 1061, doc=DocumentImpl[file:///generated/code/Magento/Quote/Model/QuoteFactory.php], docSaved=true, wasIndexedAlready=true, queried at 1698259891939 #44

Closed JorgeGhosty closed 8 months ago

JorgeGhosty commented 8 months ago

Describe the bug (*)

Please, describe as much as possible about of what the bug is. It will help to solve this issue faster.

StackTrace from IDE

*** exception class was changed or removed

   Outdated stub in index: file:///generated/code/Magento/Quote/Model/QuoteFactory.php indexing timestamp = 1698259891939, binary = false, byte size = 1061, char size = 1061, doc=DocumentImpl[file://generated/code/Magento/Quote/Model/QuoteFactory.php], docSaved=true, wasIndexedAlready=true, queried at 1698259891939
doc length=0
file length=0
cached PSI class com.jetbrains.php.lang.psi.PhpFileImpl
PSI length=0
projects with file: 1
physical file doesn't exist; length = /generated/code/Magento/Quote/Model/QuoteFactory.php

   java.lang.Exception
    at com.intellij.psi.stubs.StubTreeLoaderImpl.diagnoseLengthMismatch(StubTreeLoaderImpl.java:189)
    at com.intellij.psi.stubs.StubTreeLoaderImpl.checkLengthMatch(StubTreeLoaderImpl.java:155)
    at com.intellij.psi.stubs.StubTreeLoaderImpl.readFromVFile(StubTreeLoaderImpl.java:122)
    at com.intellij.psi.stubs.StubTreeLoader$StubTreeAndIndexUnmatchCoarseException.doCreateCompleteException(StubTreeLoader.java:184)
    at com.intellij.psi.stubs.StubTreeLoader$StubTreeAndIndexUnmatchCoarseException.lambda$createCompleteException$0(StubTreeLoader.java:178)
    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.lambda$computeInNonCancelableSection$4(CoreProgressManager.java:230)
    at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:64)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeInNonCancelableSection(CoreProgressManager.java:230)
    at com.intellij.psi.stubs.StubTreeLoader$StubTreeAndIndexUnmatchCoarseException.createCompleteException(StubTreeLoader.java:177)
    at com.intellij.psi.impl.source.PsiFileImpl.loadTreeElement(PsiFileImpl.java:228)
    at com.intellij.psi.impl.source.PsiFileImpl.calcTreeElement(PsiFileImpl.java:727)
    at com.intellij.extapi.psi.StubBasedPsiElementBase.getNode(StubBasedPsiElementBase.java:127)
    at com.intellij.extapi.psi.ASTDelegatePsiElement.getFirstChild(ASTDelegatePsiElement.java:84)
    at com.intellij.psi.PsiWalkingState$PsiTreeGuide.getFirstChild(PsiWalkingState.java:32)
    at com.intellij.psi.PsiWalkingState$PsiTreeGuide.getFirstChild(PsiWalkingState.java:14)
    at com.intellij.util.WalkingState.next(WalkingState.java:72)
    at com.intellij.util.WalkingState.walkChildren(WalkingState.java:51)
    at com.intellij.util.WalkingState.elementStarted(WalkingState.java:42)
    at com.intellij.psi.PsiWalkingState.elementStarted(PsiWalkingState.java:62)
    at com.intellij.psi.PsiRecursiveElementWalkingVisitor.visitElement(PsiRecursiveElementWalkingVisitor.java:48)
    at com.intellij.psi.util.PsiTreeUtil$4.visitElement(PsiTreeUtil.java:940)
    at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:270)
    at com.jetbrains.php.lang.psi.elements.impl.PhpPsiElementImpl.accept(PhpPsiElementImpl.java:76)
    at com.intellij.psi.util.PsiTreeUtil.processElements(PsiTreeUtil.java:936)
    at com.intellij.psi.util.PsiTreeUtil.findChildrenOfAnyType(PsiTreeUtil.java:316)
    at com.intellij.psi.util.PsiTreeUtil.findChildrenOfType(PsiTreeUtil.java:279)
    at com.atwix.magento.feature.plugin.inspection.PluginCyclicCallLoopInspection.stepIntoMethod(PluginCyclicCallLoopInspection.kt:116)
    at com.atwix.magento.feature.plugin.inspection.PluginCyclicCallLoopInspection.findWrappedMethodCalls(PluginCyclicCallLoopInspection.kt:96)
    at com.atwix.magento.feature.plugin.inspection.PluginCyclicCallLoopInspection.findWrappedMethodCalls(PluginCyclicCallLoopInspection.kt:103)
    at com.atwix.magento.feature.plugin.inspection.PluginCyclicCallLoopInspection.findWrappedMethodCalls(PluginCyclicCallLoopInspection.kt:103)
    at com.atwix.magento.feature.plugin.inspection.PluginCyclicCallLoopInspection.findWrappedMethodCalls$default(PluginCyclicCallLoopInspection.kt:73)
    at com.atwix.magento.feature.plugin.inspection.PluginCyclicCallLoopInspection$buildVisitor$1.visitPhpMethodReference(PluginCyclicCallLoopInspection.kt:55)
    at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.accept(MethodReferenceImpl.java:46)
    at com.jetbrains.php.lang.psi.elements.impl.PhpASTElementImpl.accept(PhpASTElementImpl.java:26)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$10(InspectionRunner.java:334)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$11(InspectionRunner.java:342)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:201)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:207)
    at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$12(InspectionRunner.java:348)
    at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:159)
    at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:151)
    at com.intellij.codeIn

To Reproduce (*)

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Screenshots

If applicable, add screenshots to help explain your problem.

System information:

bohdan-harniuk commented 8 months ago

Hello @JorgeGhosty,

Thank you for your report. This issue is related to the PHPStorm native indexes and should not appear after invalidating all indexes: https://www.jetbrains.com/help/phpstorm/invalidate-caches.html

If you encounter any issues or have more feedback, please let us know.

Regards,