magento / magento/magento2-phpstorm-plugin

[Bug] Throwable: unable to get stub builder for file at CallMethodInspection.java:38

Open
#1,220 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
463
Forks
98
Avg merge
1h 6m
Merged PRs (30d)
3

Description

**Describe the bug** (*)

A clear and concise description of what the bug is.

```
java.lang.Throwable: unable to get stub builder for file with file = file:////wsl$/Ubuntu-20.04/home/omnipro/Sites/dospinos-last/app/design/frontend/Omnipro/Dospinos/web/icons/80.png, file type = Image, indexed file type = Image, , stubBindingRoot = PsiBinaryFileImpl, languages = [], fileTypes = [Image], files = [PsiBinaryFileImpl], roots = [], indexingInfo = null, isTooLarge = false
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:184)
at com.intellij.psi.stubs.StubProcessingHelperBase.handleNonPsiStubs(StubProcessingHelperBase.java:116)
at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:67)
at com.intellij.psi.stubs.StubIndexEx.lambda$processElements$4(StubIndexEx.java:138)
at com.intellij.psi.stubs.StubIndexEx.processElements(StubIndexEx.java:185)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:99)
at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:87)
at com.jetbrains.php.PhpIndexImpl.getElements(PhpIndexImpl.java:659)
at com.jetbrains.php.PhpIndexImpl.getDirectSubclassesInner(PhpIndexImpl.java:699)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1740)
at com.jetbrains.php.PhpIndexImpl.getDirectSubclasses(PhpIndexImpl.java:694)
at com.jetbrains.php.PhpIndexImpl.fillAllSubclasses(PhpIndexImpl.java:718)
at com.jetbrains.php.PhpIndexImpl.fillAllSubclasses(PhpIndexImpl.java:720)
at com.jetbrains.php.PhpIndexImpl.fillAllSubclasses(PhpIndexImpl.java:720)
at com.jetbrains.php.PhpIndexImpl.fillAllSubclasses(PhpIndexImpl.java:720)
at com.jetbrains.php.PhpIndexImpl.fillAllSubclasses(PhpIndexImpl.java:720)
at com.jetbrains.php.PhpIndexImpl.getAllSubclasses(PhpIndexImpl.java:712)
at com.jetbrains.php.lang.psi.elements.impl.MemberReferenceImpl.subClasses(MemberReferenceImpl.java:307)
at com.jetbrains.php.lang.psi.elements.impl.MemberReferenceImpl.lambda$subclasses$9(MemberReferenceImpl.java:303)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base/java.util.Collections$2.tryAdvance(Collections.java:4853)
at java.base/java.util.Collections$2.forEachRemaining(Collections.java:4861)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at one.util.streamex.AbstractStreamEx.forEach(AbstractStreamEx.java:360)
at com.jetbrains.php.lang.psi.elements.impl.PhpBaseMemberReference.resolveGlobalDescriptors(PhpBaseMemberReference.java:73)
at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.resolveGlobalDescriptors(MethodReferenceImpl.java:104)
at com.jetbrains.php.lang.psi.elements.impl.PhpBaseMemberReference.multiResolve(PhpBaseMemberReference.java:88)
at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.lambda$getResolver$0(PhpReferenceImpl.java:160)
at com.intellij.psi.impl.source.resolve.ResolveCache$PolyVariantResolver.resolve(ResolveCache.java:69)
at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolve$1(ResolveCache.java:154)
at com.intellij.openapi.util.Computable.get(Computable.java:16)
at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$loggingResolver$4(ResolveCache.java:260)
at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:114)
at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:44)
at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:237)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:154)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:169)
at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:162)
at com.jetbrains.php.lang.psi.elements.impl.PhpReferenceImpl.multiResolve(PhpReferenceImpl.java:153)
at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.resolve(MethodReferenceImpl.java:147)
at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.resolve(MethodReferenceImpl.java:142)
at com.magento.idea.magento2uct.inspections.php.CallMethodInspection$1.visitPhpMethodReference(CallMethodInspection.java:38)
at com.jetbrains.php.lang.psi.elements.impl.MethodReferenceImpl.accept(MethodReferenceImpl.java:44)
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:317)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154)
at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$11(InspectionRunner.java:325)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:215)
at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$12(InspectionRunner.java:331)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:159)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:151)
at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$13(InspectionRunner.java:294)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119)
at com.intellij
```

**Please complete the following information:** (*)

- OS: Windows 10 10.0
- PhpStorm/Intellij version: 2022.2.2
- Plugin Version: 4.4.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the stack trace entry point in CallMethodInspection.java at line 38 and reproduce the report using the stated Windows, PhpStorm 2022.2.2, and plugin 4.4.0 environment. Trace the failure involving the referenced PNG and stub processing; done means the reported error is resolved and coverage verifies the affected inspection path.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, php
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.