Haehnchen / idea-php-symfony2-plugin

IntelliJ IDEA / PhpStorm Symfony Plugin
https://plugins.jetbrains.com/plugin/7219
MIT License
912 stars 137 forks source link

Plugin breaks PhpStorm 2020.2 #1529

Closed chx closed 2 years ago

chx commented 4 years ago

https://intellij-support.jetbrains.com/hc/en-us/community/posts/360009489860-2020-2-doesn-t-clear-errors-on-the-fly support told me this is casued by the Symfony plugin and disabling it fixed the problem.

Also note https://github.com/Haehnchen/idea-php-generics-plugin/issues/54 is likely the same issue. And https://intellij-support.jetbrains.com/hc/en-us/community/posts/360008269680/comments/360001711799 likely contains the solution.

After I sent logs to support and they told me it's Symfony, I reviewed my logs:

grep -i symfony idea.log|sort |uniq -dc
994 at fr.adrienbrault.idea.symfony2plugin.dic.SymfonyContainerTypeProvider.getBySignature(SymfonyContainerTypeProvider.java:72)
994 at fr.adrienbrault.idea.symfony2plugin.util.PhpTypeProviderUtil.getTypeSignature(PhpTypeProviderUtil.java:173)

The full error seems to be:

2020-07-30 23:44:33,184 [53844327]  ERROR - aemon.impl.PassExecutorService - PhpStorm 2020.2  Build #PS-202.6397.115 
2020-07-30 23:44:33,184 [53844327]  ERROR - aemon.impl.PassExecutorService - JDK: 11.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2020-07-30 23:44:33,184 [53844327]  ERROR - aemon.impl.PassExecutorService - OS: Windows 10 
2020-07-30 23:44:33,185 [53844328]  ERROR - aemon.impl.PassExecutorService - Last Action: EditorPageDown 
2020-07-30 23:44:35,145 [53846288]  ERROR - aemon.impl.PassExecutorService - null 
java.lang.AssertionError
  at com.jetbrains.php.lang.psi.resolve.types.PhpExcludeTypeTP.complete(PhpExcludeTypeTP.java:31)
  at com.jetbrains.php.PhpIndexImpl.lambda$completeType$1(PhpIndexImpl.java:128)
  at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:112)
  at com.jetbrains.php.PhpIndexImpl.completeType(PhpIndexImpl.java:128)
  at com.jetbrains.php.PhpIndexImpl.getClasses(PhpIndexImpl.java:700)
  at com.jetbrains.php.PhpIndexImpl.getBySignatureInternal(PhpIndexImpl.java:609)
  at com.jetbrains.php.PhpIndexImpl.getBySignature(PhpIndexImpl.java:501)
  at fr.adrienbrault.idea.symfony2plugin.util.PhpTypeProviderUtil.getTypeSignature(PhpTypeProviderUtil.java:173)
  at fr.adrienbrault.idea.symfony2plugin.dic.SymfonyContainerTypeProvider.getBySignature(SymfonyContainerTypeProvider.java:72)
  at com.jetbrains.php.PhpIndexImpl.getBySignatureInternal(PhpIndexImpl.java:636)
  at com.jetbrains.php.PhpIndexImpl.getBySignature(PhpIndexImpl.java:501)
  at com.jetbrains.php.PhpIndexImpl.completeType(PhpIndexImpl.java:137)
  at com.jetbrains.php.PhpIndexImpl.getClasses(PhpIndexImpl.java:700)
  at com.jetbrains.php.PhpIndexImpl.getBySignatureInternal(PhpIndexImpl.java:609)
  at com.jetbrains.php.PhpIndexImpl.getBySignature(PhpIndexImpl.java:501)
  at com.jetbrains.php.PhpIndexImpl.completeType(PhpIndexImpl.java:137)
  at com.jetbrains.php.PhpIndexImpl.completeType(PhpIndexImpl.java:101)
  at com.jetbrains.php.lang.psi.resolve.types.PhpType.global(PhpType.java:556)
  at com.jetbrains.php.lang.inspections.type.PhpExpressionAlwaysConstantInspection$ConstantValue.fromValue(PhpExpressionAlwaysConstantInspection.java:106)
  at com.jetbrains.php.lang.inspections.type.PhpExpressionAlwaysConstantInspection$1$1.processAccessVariableInstruction(PhpExpressionAlwaysConstantInspection.java:193)
  at com.jetbrains.php.codeInsight.controlFlow.instructions.impl.PhpAccessVariableInstructionImpl.process(PhpAccessVariableInstructionImpl.java:45)
  at com.jetbrains.php.codeInsight.controlFlow.PhpControlFlowUtil.processPredecessors(PhpControlFlowUtil.java:225)
  at com.jetbrains.php.codeInsight.controlFlow.PhpControlFlowUtil.processPredecessors(PhpControlFlowUtil.java:188)
  at com.jetbrains.php.lang.inspections.type.PhpExpressionAlwaysConstantInspection$1.getConstantValue(PhpExpressionAlwaysConstantInspection.java:175)
  at com.jetbrains.php.lang.inspections.type.PhpExpressionAlwaysConstantInspection$1.visitPhpVariable(PhpExpressionAlwaysConstantInspection.java:162)
  at com.jetbrains.php.lang.psi.elements.impl.VariableImpl.accept(VariableImpl.java:129)
  at com.jetbrains.php.lang.psi.elements.impl.PhpPsiElementImpl.accept(PhpPsiElementImpl.java:73)
  at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:65)
  at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitRestElementsAndCleanup$6(LocalInspectionsPass.java:317)
  at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:168)
  at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:126)
  at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:115)
  at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:110)
  at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitRestElementsAndCleanup$7(LocalInspectionsPass.java:317)
  at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
  at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:162)
  at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:162)
  at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1110)
  at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
  at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
  at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
  at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
  at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:117)
  at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
  at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:170)
  at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:182)
  at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
  at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
  at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
  at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
  at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
  at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
  at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Haehnchen commented 4 years ago

@chx thanks for this really good investigation, helps alot.

There is now also a build against PhpStorm 2020.2. Often that also helps, too. Will check if problem there still exists

Vaynt commented 3 years ago

Commenting to track and say that I am experiencing the exact same issue. Symfony Support: 0.21.203 PHPStorm: 2020.2.3

arjona commented 3 years ago

Hello, I've been directed here from the IDEA bugtracker where I have an issue open. https://youtrack.jetbrains.com/issue/WI-57828 While in the reports mentioned up top seems the issue causes error logs, in my case it's preventing the opening of the file, so it's quite blocking. On the ticket I've linked there's code that reproduces the issue and I can provide a sample project if needed.

gggeek commented 3 years ago

Hello. Not sure if it is the same bug, but I noticed a weird behaviour today

This is the error log:

2021-01-06 16:17:51,558 [ 910459]  ERROR - llij.ide.plugins.PluginManager - PSI and index do not match.
Please report the problem to JetBrains with the files attached
 file=PHP file, file.class=class com.jetbrains.php.lang.psi.PhpFileImpl, file.lang=Language: PHP, modStamp=1
 tree consistent
 stub debugInfo=created in getStubTree(), with AST = false; with backReference
latestIndexedStub=StubTree{myDebugInfo='created from index; with backReference', myRoot=PhpFileStubImpl}1181644314
   same size=true
   debugInfo=created from index; with backReference
 viewProvider=com.jetbrains.php.lang.PhpFileViewProvider{vFile=file://Q:/kaliop-tools/ezmigrationbundle/vendor_kezmbt_cp/ezsystems/ezpublish-kernel/eZ/Publish/API/Repository/Values/Content/ContentInfo.php, vFileId=175483, content=VirtualFileContent{size=3910}, eventSystemEnabled=true}
 viewProvider stamp: 0; file stamp: 0; file modCount: 1422256186000; file length: 3910
 doc saved: true; doc stamp: 0; doc size: 3910; committed: true
indexing info: null 
com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: PSI and index do not match.
Please report the problem to JetBrains with the files attached
 file=PHP file, file.class=class com.jetbrains.php.lang.psi.PhpFileImpl, file.lang=Language: PHP, modStamp=1
 tree consistent
 stub debugInfo=created in getStubTree(), with AST = false; with backReference
latestIndexedStub=StubTree{myDebugInfo='created from index; with backReference', myRoot=PhpFileStubImpl}1181644314
   same size=true
   debugInfo=created from index; with backReference
 viewProvider=com.jetbrains.php.lang.PhpFileViewProvider{vFile=file://Q:/kaliop-tools/ezmigrationbundle/vendor_kezmbt_cp/ezsystems/ezpublish-kernel/eZ/Publish/API/Repository/Values/Content/ContentInfo.php, vFileId=175483, content=VirtualFileContent{size=3910}, eventSystemEnabled=true}
 viewProvider stamp: 0; file stamp: 0; file modCount: 1422256186000; file length: 3910
 doc saved: true; doc stamp: 0; doc size: 3910; committed: true
indexing info: null
    at com.intellij.psi.stubs.StubTreeLoader.stubTreeAndIndexDoNotMatch(StubTreeLoader.java:129)
    at com.intellij.psi.impl.source.FileTrees.reconcilePsi(FileTrees.java:201)
    at com.intellij.psi.impl.source.FileTrees.withAst(FileTrees.java:149)
    at com.intellij.psi.impl.source.PsiFileImpl.loadTreeElement(PsiFileImpl.java:216)
    at com.intellij.psi.impl.source.PsiFileImpl.calcTreeElement(PsiFileImpl.java:734)
    at com.intellij.extapi.psi.StubBasedPsiElementBase.getNode(StubBasedPsiElementBase.java:128)
    at com.jetbrains.php.lang.psi.elements.impl.PhpNamedElementImpl.getNameNode(PhpNamedElementImpl.java:63)
    at com.jetbrains.php.lang.psi.elements.impl.PhpNamedElementImpl.getTextOffset(PhpNamedElementImpl.java:104)
    at com.intellij.ide.util.EditSourceUtil.getDescriptor(EditSourceUtil.java:41)
    at com.intellij.ide.util.PsiNavigationSupportImpl.getDescriptor(PsiNavigationSupportImpl.java:31)
    at com.intellij.psi.impl.PsiElementBase.navigate(PsiElementBase.java:194)
    at com.intellij.codeInsight.navigation.NavigationUtil.lambda$openFileWithPsiElement$2(NavigationUtil.java:178)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:220)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:177)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:167)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:153)
    at com.intellij.codeInsight.navigation.NavigationUtil.openFileWithPsiElement(NavigationUtil.java:171)
    at com.jetbrains.php.projectView.PhpFileNode.navigate(PhpFileNode.java:51)
    at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.navigate(AbstractPsiBasedNode.java:245)
    at com.intellij.ide.projectView.impl.nodes.PsiFileNode.navigate(PsiFileNode.java:116)
    at com.intellij.util.OpenSourceUtil.navigateToSource(OpenSourceUtil.java:119)
    at com.intellij.util.OpenSourceUtil.navigate(OpenSourceUtil.java:74)
    at com.intellij.util.OpenSourceUtil.navigate(OpenSourceUtil.java:58)
    at com.intellij.util.OpenSourceUtil.navigate(OpenSourceUtil.java:51)
    at com.intellij.util.OpenSourceUtil.openSourcesFrom(OpenSourceUtil.java:19)
    at com.intellij.util.EditSourceOnDoubleClickHandler$TreeMouseListener.processDoubleClick(EditSourceOnDoubleClickHandler.java:166)
    at com.intellij.util.EditSourceOnDoubleClickHandler$TreeMouseListener.onDoubleClick(EditSourceOnDoubleClickHandler.java:160)
    at com.intellij.ui.DoubleClickListener.onClick(DoubleClickListener.java:30)
    at com.intellij.ui.ClickListener$1.mouseReleased(ClickListener.java:59)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6652)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
    at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:385)
    at com.intellij.ide.dnd.aware.DnDAwareTree.processMouseEvent(DnDAwareTree.java:45)
    at java.desktop/java.awt.Component.processEvent(Component.java:6417)
    at java.desktop/java.awt.Container.processEvent(Container.java:2263)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976)
    at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:911)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:840)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:507)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.AssertionError: Stub count doesn't match stubbed node length
    at com.intellij.psi.impl.source.FileTrees.lambda$reconcilePsi$5(FileTrees.java:189)
    at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:577)
    at com.intellij.psi.impl.source.FileTrees.reconcilePsi(FileTrees.java:182)
    ... 71 more
2021-01-06 16:17:51,559 [ 910460]  ERROR - llij.ide.plugins.PluginManager - PhpStorm 2020.3.1  Build #PS-203.6682.180 
2021-01-06 16:17:51,559 [ 910460]  ERROR - llij.ide.plugins.PluginManager - JDK: 11.0.9.1; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-01-06 16:17:51,560 [ 910461]  ERROR - llij.ide.plugins.PluginManager - OS: Windows 10 
2021-01-06 16:18:00,018 [ 918919]   INFO - rationStore.ComponentStoreImpl - Saving appXmlEditorOptions took 11 ms  

Hand here's how it looks:

Clipboard01

gggeek commented 3 years ago

PS: i did more testing and it seems that my comment above is not correct - I get the same problem with the SF plugin off :-(

Haehnchen commented 2 years ago

closing is old issue. i guess it resolved by itself with updates of the last years