Skip to content
This repository was archived by the owner on Oct 22, 2020. It is now read-only.

java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 #33

Closed
ArtemGoutsoul opened this issue May 2, 2020 · 1 comment · Fixed by #36
Closed

Comments

@ArtemGoutsoul
Copy link

In file: LightVirtualFile: \fragment.php

java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
	at de.espend.idea.php.generics.type.TemplateAnnotationTypeProvider.complete(TemplateAnnotationTypeProvider.java:66)
	at com.jetbrains.php.PhpIndexImpl.lambda$completeType$1(PhpIndexImpl.java:129)
	at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:117)
	at com.jetbrains.php.PhpIndexImpl.completeType(PhpIndexImpl.java:129)
	at com.jetbrains.php.PhpIndexImpl.completeType(PhpIndexImpl.java:100)
	at com.jetbrains.php.lang.psi.resolve.types.PhpType.global(PhpType.java:460)
	at com.jetbrains.php.lang.psi.elements.impl.MemberReferenceImpl.lambda$resolveInHierarchy$0(MemberReferenceImpl.java:177)
	at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:158)
	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:117)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:75)
	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:73)
	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:154)
	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:136)
	at com.jetbrains.php.lang.psi.elements.impl.MemberReferenceImpl.resolveInHierarchy(MemberReferenceImpl.java:174)
	at com.jetbrains.php.lang.psi.elements.impl.MemberReferenceImpl.resolveGlobal(MemberReferenceImpl.java:159)
	at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.resolveGlobal(MethodReferenceImpl.java:85)
	at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.lambda$static$0(PhpReferenceImpl.java:156)
	at com.intellij.psi.impl.source.resolve.ResolveCache$PolyVariantResolver.resolve(ResolveCache.java:67)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolve$1(ResolveCache.java:152)
	at com.intellij.openapi.util.Computable.get(Computable.java:17)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$loggingResolver$3(ResolveCache.java:225)
	at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:117)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:75)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:202)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:152)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:167)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:160)
	at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.multiResolve(PhpReferenceImpl.java:150)
	at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.resolve(PhpReferenceImpl.java:136)
	at com.jetbrains.php.lang.annotator.PhpAnnotatorVisitor.visitPhpMethodReference(PhpAnnotatorVisitor.java:582)
	at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.accept(MethodReferenceImpl.java:31)
	at com.jetbrains.php.lang.annotator.PhpAnnotator.annotate(PhpAnnotator.java:17)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:129)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:110)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:346)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$5(GeneralHighlightingPass.java:280)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:306)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:309)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:93)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:309)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:277)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:222)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:52)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:442)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1106)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:435)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:627)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:572)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:434)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:410)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:168)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:168)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:171)
	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)

PhpStorm 2020.1.1
Build #PS-201.7223.96, built on April 30, 2020
Licensed to Enkora Oy / Artem Goutsoul
Subscription is active until February 6, 2021
Runtime version: 11.0.6+8-b765.40 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1450M
Cores: 12
Registry: ide.windowSystem.autoShowProcessPopup=true, run.processes.with.pty=TRUE, debugger.watches.in.variables=false, ide.tooltip.initialDelay=187
Non-Bundled Plugins: CMD Support, Jetbrains TeamCity Plugin, Key Promoter X, Scratch, Statistic, String Manipulation, org.intellij.tasks.navigation, com.intellij.ideolog, net.seesharpsoft.intellij.plugins.csv, com.dmarcotte.handlebars, com.jetbrains.lang.ejs, ru.adelf.idea.dotenv, NEON support, lv.midiana.misc.phpstorm-plugins.deep-keys, lv.midiana.misc.idea-plugins.deep-js-completion, com.kalessil.phpStorm.phpInspectionsEA, de.espend.idea.php.annotation, de.espend.idea.php.generics, org.psliwa.idea.composer, some.awesome

@ArtemGoutsoul
Copy link
Author

Not sure if it's the same or should be filed separately (looks similar but not identical):

java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
	at de.espend.idea.php.generics.type.TemplateAnnotationTypeProvider.complete(TemplateAnnotationTypeProvider.java:66)
	at com.jetbrains.php.PhpIndexImpl.lambda$completeType$1(PhpIndexImpl.java:129)
	at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:117)
	at com.jetbrains.php.PhpIndexImpl.completeType(PhpIndexImpl.java:129)
	at com.jetbrains.php.PhpIndexImpl.completeType(PhpIndexImpl.java:100)
	at com.jetbrains.php.lang.psi.resolve.types.PhpType.global(PhpType.java:460)
	at com.jetbrains.php.PhpPresentationUtil.formatFunction(PhpPresentationUtil.java:212)
	at com.jetbrains.php.structureView.PhpStructureViewTreeElement.createPresentation(PhpStructureViewTreeElement.java:111)
	at com.jetbrains.php.structureView.PhpStructureViewTreeElement.<init>(PhpStructureViewTreeElement.java:49)
	at com.jetbrains.php.structureView.PhpStructureViewTreeElement.<init>(PhpStructureViewTreeElement.java:54)
	at com.jetbrains.php.structureView.PhpStructureViewTreeElement.collectChildren(PhpStructureViewTreeElement.java:198)
	at com.jetbrains.php.structureView.PhpStructureViewTreeElement.collectChildren(PhpStructureViewTreeElement.java:205)
	at com.jetbrains.php.structureView.PhpStructureViewTreeElement.collectChildren(PhpStructureViewTreeElement.java:210)
	at com.jetbrains.php.structureView.PhpStructureViewTreeElement.collectChildren(PhpStructureViewTreeElement.java:205)
	at com.jetbrains.php.structureView.PhpStructureViewTreeElement.getChildrenBase(PhpStructureViewTreeElement.java:151)
	at com.intellij.ide.structureView.impl.common.PsiTreeElementBase.doGetChildren(PsiTreeElementBase.java:95)
	at com.intellij.ide.structureView.impl.common.PsiTreeElementBase.lambda$getChildren$0(PsiTreeElementBase.java:85)
	at com.intellij.ide.util.treeView.AbstractTreeUi.calculateYieldingToWriteAction(AbstractTreeUi.java:1720)
	at com.intellij.ide.structureView.impl.common.PsiTreeElementBase.getChildren(PsiTreeElementBase.java:85)
	at com.intellij.ide.structureView.impl.common.PsiTreeElementBase.getChildren(PsiTreeElementBase.java:25)
	at com.intellij.ide.util.treeView.smartTree.TreeElementWrapper.initChildren(TreeElementWrapper.java:50)
	at com.intellij.ide.util.treeView.smartTree.CachingChildrenTreeNode.rebuildSubtree(CachingChildrenTreeNode.java:205)
	at com.intellij.ide.util.treeView.smartTree.CachingChildrenTreeNode.ensureChildrenAreInitialized(CachingChildrenTreeNode.java:41)
	at com.intellij.ide.util.treeView.smartTree.CachingChildrenTreeNode.getChildren(CachingChildrenTreeNode.java:33)
	at com.intellij.ide.structureView.newStructureView.StructureViewComponent$MyNodeWrapper.getChildren(StructureViewComponent.java:808)
	at com.intellij.ide.util.treeView.smartTree.SmartTreeStructure.getChildElements(SmartTreeStructure.java:62)
	at com.intellij.ui.tree.StructureTreeModel.getValidChildren(StructureTreeModel.java:384)
	at com.intellij.ui.tree.StructureTreeModel.validateChildren(StructureTreeModel.java:298)
	at com.intellij.ui.tree.StructureTreeModel.getNode(StructureTreeModel.java:292)
	at com.intellij.ui.tree.StructureTreeModel.getChildren(StructureTreeModel.java:312)
	at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.getNode(AsyncTreeModel.java:573)
	at com.intellij.ui.tree.AsyncTreeModel$ObsolescentCommand.get(AsyncTreeModel.java:468)
	at com.intellij.ui.tree.AsyncTreeModel$ObsolescentCommand.get(AsyncTreeModel.java:434)
	at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:323)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1106)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:75)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:129)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:166)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:627)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:572)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:153)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:118)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:75)
	at com.intellij.util.concurrency.Invoker.invokeSafely(Invoker.java:206)
	at com.intellij.util.concurrency.Invoker.lambda$offerSafely$0(Invoker.java:184)
	at com.intellij.util.concurrency.Invoker$Background.lambda$offer$0(Invoker.java:524)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:222)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:201)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:210)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:190)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

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

Successfully merging a pull request may close this issue.

1 participant