Atwix / phpstorm-plugin-feedback

6 stars 0 forks source link

[Bug] java.lang.AssertionError: File text mismatch: tree.length=552; psi.length=567; this=PHP file; vp=com.jetbrains.php.lang.PhpFileViewProvider{vFile=file:///Users/rifferte/Source/18f-magento/app/code/Sooryen/HomePage/Model/ResourceModel/Company/Collection.php, vFileId=3886, content=VirtualFileContent{size=567}, eventSystemEnabled=true} #36

Closed rifferte1800 closed 11 months ago

rifferte1800 commented 11 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

java.lang.AssertionError: File text mismatch: tree.length=552; psi.length=567; this=PHP file; vp=com.jetbrains.php.lang.PhpFileViewProvider{vFile=file:///Users/rifferte/Source/18f-magento/app/code/Sooryen/HomePage/Model/ResourceModel/Company/Collection.php, vFileId=3886, content=VirtualFileContent{size=567}, eventSystemEnabled=true}
    at com.intellij.psi.impl.source.PsiFileImpl.getText(PsiFileImpl.java:313)
    at com.intellij.psi.stubs.StubTextInconsistencyException.<init>(StubTextInconsistencyException.java:35)
    at com.intellij.psi.stubs.StubTextInconsistencyException.checkStubTextConsistency(StubTextInconsistencyException.java:81)
    at com.intellij.psi.stubs.StubProcessingHelperBase.inconsistencyDetected(StubProcessingHelperBase.java:150)
    at com.intellij.psi.stubs.StubProcessingHelperBase.checkType(StubProcessingHelperBase.java:93)
    at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:72)
    at com.intellij.psi.stubs.StubIndexEx.lambda$processElements$4(StubIndexEx.java:150)
    at com.intellij.psi.stubs.StubIndexEx.processElements(StubIndexEx.java:214)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:102)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:90)
    at com.jetbrains.php.PhpIndexImpl.getElements(PhpIndexImpl.java:746)
    at com.jetbrains.php.PhpIndexImpl.getByName(PhpIndexImpl.java:1183)
    at com.jetbrains.php.PhpIndexImpl.getByFQN(PhpIndexImpl.java:1160)
    at com.jetbrains.php.PhpIndexImpl.getByFqnCacheAware(PhpIndexImpl.java:1241)
    at com.jetbrains.php.PhpIndexImpl.getClassesByFQNInternal(PhpIndexImpl.java:1236)
    at com.jetbrains.php.PhpIndexImpl.getClassesByFQN(PhpIndexImpl.java:1225)
    at com.jetbrains.php.PhpClassHierarchyUtils.getSuperClasses(PhpClassHierarchyUtils.java:615)
    at com.jetbrains.php.lang.psi.elements.impl.PhpClassImpl.getSuperClasses(PhpClassImpl.java:502)
    at com.jetbrains.php.lang.psi.elements.impl.PhpClassImpl.getSuperClass(PhpClassImpl.java:496)
    at com.atwix.magento.framework.test.MagentoTestSourceVerifier.getAllSupperClasses(MagentoTestSourceVerifier.java:147)
    at com.atwix.magento.framework.test.MagentoTestSourceVerifier.isTestClass(MagentoTestSourceVerifier.java:128)
    at com.atwix.magento.framework.test.MagentoTestSourceVerifier.isTestSource(MagentoTestSourceVerifier.java:124)
    at com.atwix.magento.framework.test.MagentoTestSourceVerifier.isTestSource(MagentoTestSourceVerifier.java:111)
    at com.atwix.magento.project.configurator.MagentoTestSourceFilterService.isTestSource(MagentoTestSourceFilterService.java:37)
    at com.intellij.openapi.roots.TestSourcesFilter.isTestSources(TestSourcesFilter.java:31)
    at com.intellij.psi.search.scope.TestsScope$1.contains(TestsScope.java:25)
    at com.intellij.psi.search.scope.packageSet.FilteredPackageSet.contains(FilteredPackageSet.java:22)
    at com.intellij.ui.tabs.FileColorsModel.findConfiguration(FileColorsModel.java:246)
    at com.intellij.ui.tabs.FileColorsModel.lambda$getColor$0(FileColorsModel.java:212)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:923)
    at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:76)
    at com.intellij.ui.tabs.FileColorsModel.getColor(FileColorsModel.java:211)
    at com.intellij.ui.tabs.FileColorManagerImpl.getFileColor(FileColorManagerImpl.java:166)
    at com.intellij.ui.tabs.EditorTabColorProviderImpl.getProjectViewColor(EditorTabColorProviderImpl.java:31)
    at com.intellij.openapi.fileEditor.impl.EditorTabPresentationUtil.getFileBackgroundColor(EditorTabPresentationUtil.kt:47)
    at com.intellij.openapi.vfs.newvfs.VfsPresentationUtil.getFileBackgroundColor(VfsPresentationUtil.java:48)
    at com.intellij.presentation.impl.FilePresentationServiceImpl.getFileBackgroundColor(FilePresentationServiceImpl.kt:22)
    at com.intellij.presentation.impl.FilePresentationServiceImpl.getFileBackgroundColor(FilePresentationServiceImpl.kt:31)
    at com.intellij.ide.util.treeView.AbstractTreeNode.computeBackgroundColor(AbstractTreeNode.java:275)
    at com.intellij.ide.projectView.ProjectViewNode.computeBackgroundColor(ProjectViewNode.java:298)
    at com.intellij.ide.util.treeView.PresentableNodeDescriptor.getUpdatedPresentation(PresentableNodeDescriptor.java:87)
    at com.intellij.ide.util.treeView.PresentableNodeDescriptor.update(PresentableNodeDescriptor.java:32)
    at com.intellij.ui.tree.StructureTreeModel$Node.update(StructureTreeModel.java:486)
    at com.intellij.ui.tree.StructureTreeModel$Node.<init>(StructureTreeModel.java:467)
    at com.intellij.ui.tree.StructureTreeModel$Node.<init>(StructureTreeModel.java:460)
    at com.intellij.ui.tree.StructureTreeModel.getValidChildren(StructureTreeModel.java:418)
    at com.intellij.ui.tree.StructureTreeModel.validateChildren(StructureTreeModel.java:329)
    at com.intellij.ui.tree.StructureTreeModel.getNode(StructureTreeModel.java:323)
    at com.intellij.ui.tree.StructureTreeModel.getChildren(StructureTreeModel.java:343)
    at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.getNode(AsyncTreeModel.java:568)
    at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:464)
    at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:430)
    at com.intellij.util.concurrency

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 11 months ago

Hi @rifferte1800,

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

Please, reopen this issue if you need more help here. Regards,