Codium-ai / codiumai-jetbrains-release

56 stars 7 forks source link

[Exception][PhpStorm 2023.1.3] com.intellij.psi.PsiInvalidElementAccessException: Element class com.intellij.psi.impl... #76

Closed dyaskur closed 11 months ago

dyaskur commented 11 months ago

User Description

User did not enter any detailed information.

Stack Trace

com.intellij.psi.PsiInvalidElementAccessException: Element class com.intellij.psi.impl.source.tree.CompositeElement of type JS:TYPESCRIPT_FUNCTION (class com.intellij.lang.javascript.types.TypeScriptFunctionElementType)
    at com.intellij.psi.PsiInvalidElementAccessException.createByNode(PsiInvalidElementAccessException.java:80)
    at com.intellij.psi.impl.source.SubstrateRef$2.getContainingFile(SubstrateRef.java:98)
    at com.intellij.extapi.psi.StubBasedPsiElementBase.getContainingFile(StubBasedPsiElementBase.java:239)
    at com.intellij.lang.javascript.documentation.JSDocumentationUtils.findDocComment(JSDocumentationUtils.java:851)
    at com.intellij.lang.javascript.documentation.JSDocumentationUtils.findDocComment(JSDocumentationUtils.java:798)
    at com.intellij.lang.javascript.psi.util.JSStubBasedPsiTreeUtil.findDocComment(JSStubBasedPsiTreeUtil.java:350)
    at com.intellij.lang.javascript.psi.impl.JSStubElementImpl.getIcon(JSStubElementImpl.java:197)
    at com.intellij.lang.javascript.psi.impl.JSFunctionImpl.getFunctionIcon(JSFunctionImpl.java:222)
    at com.intellij.lang.javascript.psi.ecma6.impl.TypeScriptFunctionImpl.getIcon(TypeScriptFunctionImpl.java:110)
    at ai.codium.ui.structureview.CodiumStructureViewChildElement$getPresentation$1.getIcon(CodiumStructureViewChildElement.kt:40)
    at com.intellij.ide.projectView.PresentationData.updateFrom(PresentationData.java:164)
    at com.intellij.ide.util.treeView.smartTree.TreeElementWrapper.update(TreeElementWrapper.java:27)
    at com.intellij.ide.util.treeView.PresentableNodeDescriptor.getUpdatedPresentation(PresentableNodeDescriptor.java:90)
    at com.intellij.ide.util.treeView.PresentableNodeDescriptor.update(PresentableNodeDescriptor.java:33)
    at com.intellij.ui.tree.StructureTreeModel$Node.update(StructureTreeModel.java:485)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at com.intellij.ui.tree.StructureTreeModel.getChildren(StructureTreeModel.java:345)
    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.Invoker$Task.run(Invoker.java:304)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1102)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.

<TRIMMED STACKTRACE>

torAndRun(CoreProgressManager.java:679)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:70)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:107)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:72)
    at com.intellij.util.concurrency.Invoker.invokeSafely(Invoker.java:187)
    at com.intellij.util.concurrency.Invoker.lambda$offerSafely$0(Invoker.java:165)
    at com.intellij.util.concurrency.Invoker$Background.lambda$offer$0(Invoker.java:431)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:272)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:248)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:28)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:221)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:227)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:210)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:833)

Other Information

=== About ===
Build version: PhpStorm 2023.1.3 Build: #PS-231.9161.47 June 22, 2023
Theme: Dark
JRE: 17.0.7+10-b829.16, JetBrains s.r.o.
JVM: 17.0.7+10-b829.16, OpenJDK 64-Bit Server VM, JetBrains s.r.o.
Operating System: Mac OS X 12.6.2 (x86_64)

=== Plugins ===
Custom plugins: [IntelliJ Scripting: Ruby (1.2), GitToolBox (500.0.10+213), Go Orm Code Helper (1.4.3), GitHub Copilot (1.2.9.2684), Ideolog (222.1.0.0), Material Theme UI (8.6.4), Go method generator (1.0), Convert JSON/SQL to GO Struct (1.0.7), .env files support (2023.1), CodeGPT (2.0.3), Regexp Tester (2.0.0), IntelliVue (1.1.32), AWS Toolkit (1.75-231), PHP RegExp Support (0.9.7), String Manipulation (9.10.0), Go Template (231.8109.91), Codeium: AI Autocomplete for Python, JS, TS, Java, Go, and more (1.2.44), Run Configuration for TypeScript (2022.11.14-1), Git Commit Template (1.2.0), CodiumAI - Meaningful tests powered by TestGPT-1 and GPT-3.5&4 (0.5.23), GraphQL (4.0.1), SQL Optimizer, Indexing Advisor, MySQL, PostgreSQL, by EverSQL (1.3.1), Key Promoter X (2023.1.0)]
Disabled plugins:[Angular and AngularJS (231.9161.47), Mercurial (231.9161.47), Perforce Helix Core (231.9161.47), PHP Docker (231.9161.47), Joomla! (231.9161.47), ANSI Highlighter Premium (22.2.3), Docker (231.9161.47), PHPT Support (231.9161.47), Code Cleaner with Code Climate CLI (2019.2.1), GoArchLint File Support (0.6.0), WordPress (231.9161.47), Php Inspections (EA Extended) (4.0.7.1), TabSwitch (3.0.8), Drupal (231.9161.47), Subversion (231.9161.47), Tab Shifter (0.30), PHP composer.json support (1.0.38), Code With Me (231.9161.47)]

┆Issue is synchronized with this Trello card by Unito

aldanchenko commented 11 months ago

Hi @dyaskur

Thanks for contacting us!

Could you please share some code examples or projects to reproduce this issue?

Best regards, Alex

ArtsiomCh commented 11 months ago

The issue is fixed at 0.5.25 and up. PS Thanks for reporting!