Haehnchen / idea-php-symfony2-plugin

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

Error TwigPath: it returns different results when invoked multiple times #1554

Closed ttuchtfeldt closed 2 years ago

ttuchtfeldt commented 4 years ago

java.lang.Throwable: Non-idempotent computation: it returns different results when invoked multiple times or on different threads: fr.adrienbrault.idea.symfony2plugin.templating.path.TwigPath@59e547e3 != fr.adrienbrault.idea.symfony2plugin.templating.path.TwigPath@6505af60 which is 0th element of [fr.adrienbrault.idea.symfony2plugin.templating.path.TwigPath@59e547e3] and [fr.adrienbrault.idea.symfony2plugin.templating.path.TwigPath@6505af60]

Recomputation gives com.intellij.util.CachedValueBase$Data@6702b030 which is different from both values at com.intellij.openapi.diagnostic.Logger.error(Logger.java:143) at com.intellij.util.IdempotenceChecker.reportFailure(IdempotenceChecker.java:92) at com.intellij.util.IdempotenceChecker.checkEquivalence(IdempotenceChecker.java:79) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:245) at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43) at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:76) at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:150) at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:120) at fr.adrienbrault.idea.symfony2plugin.templating.path.JsonFileIndexTwigNamespaces.getNamespacesInner(JsonFileIndexTwigNamespaces.java:55) at fr.adrienbrault.idea.symfony2plugin.templating.path.JsonFileIndexTwigNamespaces.lambda$getNamespaces$0(JsonFileIndexTwigNamespaces.java:45) at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:54) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$1(CachedValueBase.java:235) at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:112) at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:71) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:236) at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43) at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:76) at fr.adrienbrault.idea.symfony2plugin.templating.path.JsonFileIndexTwigNamespaces.getNamespaces(JsonFileIndexTwigNamespaces.java:42) at fr.adrienbrault.idea.symfony2plugin.templating.util.TwigUtil.getTwigNamespaces(TwigUtil.java:1339) at fr.adrienbrault.idea.symfony2plugin.templating.util.TwigUtil.getTemplateNamesForFile(TwigUtil.java:1265) at fr.adrienbrault.idea.symfony2plugin.templating.util.TwigUtil.getTemplateNamesForFile(TwigUtil.java:1253) at fr.adrienbrault.idea.symfony2plugin.templating.util.TwigUtil.getTwigFileMethodUsageOnIndex(TwigUtil.java:780) at fr.adrienbrault.idea.symfony2plugin.templating.util.TwigUtil.collectControllerTemplateVariables(TwigUtil.java:767) at fr.adrienbrault.idea.symfony2plugin.twig.variable.collector.ControllerVariableCollector.collectPsiVariables(ControllerVariableCollector.java:24) at fr.adrienbrault.idea.symfony2plugin.templating.util.TwigTypeResolveUtil.collectScopeVariables(TwigTypeResolveUtil.java:256) at fr.adrienbrault.idea.symfony2plugin.templating.util.TwigTypeResolveUtil.collectScopeVariables(TwigTypeResolveUtil.java:229) at fr.adrienbrault.idea.symfony2plugin.templating.util.TwigTypeResolveUtil.getRootVariableByName(TwigTypeResolveUtil.java:432) at fr.adrienbrault.idea.symfony2plugin.templating.util.TwigTypeResolveUtil.resolveTwigMethodName(TwigTypeResolveUtil.java:138) at fr.adrienbrault.idea.symfony2plugin.templating.inspection.TwigVariablePathInspection$MyPsiRecursiveElementVisitor.visit(TwigVariablePathInspection.java:56) at fr.adrienbrault.idea.symfony2plugin.templating.inspection.TwigVariablePathInspection$MyPsiRecursiveElementVisitor.visitElement(TwigVariablePathInspection.java:45) at com.intellij.psi.impl.source.tree.LeafPsiElement.accept(LeafPsiElement.java:208) at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:65) at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:56) at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:296) at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$3(LocalInspectionsPass.java:265) at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:155) at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:147) at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$4(LocalInspectionsPass.java:264) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:126) at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:115) at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$5(LocalInspectionsPass.java:264) at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149) 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.compute(ApplierCompleter.java:99) 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:183)

Haehnchen commented 2 years ago

duplicate detailed issue: https://github.com/Haehnchen/idea-php-symfony2-plugin/issues/1331