Codium-ai / codiumai-jetbrains-release

59 stars 9 forks source link

[Exception][IDEA 2022.3.3] A suspiciously high nesting of suppressPrioritizing, forgot to call restorePrioritizing? #124

Closed sau-deep closed 1 year ago

sau-deep commented 1 year ago

User Description

User did not enter any detailed information.

Stack Trace

java.lang.Throwable
    at com.intellij.idea.IdeaLogger.error(IdeaLogger.java:127)
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:212)
    at com.intellij.openapi.progress.impl.CoreProgressManager.suppressPrioritizing(CoreProgressManager.java:824)
    at com.intellij.openapi.progress.impl.CoreProgressManager.avoidBlockingPrioritizingThread(CoreProgressManager.java:879)
    at com.intellij.openapi.progress.impl.CoreProgressManager.sleepIfNeededToGivePriorityToAnotherThread(CoreProgressManager.java:840)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runCheckCanceledHooks(ProgressManagerImpl.java:191)
    at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.checkCanceled(AbstractProgressIndicatorBase.java:150)
    at com.intellij.openapi.progress.util.AbstractProgressIndicatorExBase.checkCanceled(AbstractProgressIndicatorExBase.java:103)
    at com.intellij.openapi.progress.impl.CoreProgressManager.doCheckCanceled(CoreProgressManager.java:141)
    at com.intellij.openapi.progress.ProgressManager.checkCanceled(ProgressManager.java:221)
    at com.intellij.openapi.progress.ProgressIndicatorProvider.checkCanceled(ProgressIndicatorProvider.java:23)
    at com.intellij.psi.impl.source.tree.CompositeElement.getPsi(CompositeElement.java:687)
    at com.intellij.psi.impl.source.SourceTreeToPsiMap.treeElementToPsi(SourceTreeToPsiMap.java:16)
    at com.intellij.psi.impl.source.tree.SharedImplUtil.getNextSibling(SharedImplUtil.java:46)
    at com.intellij.psi.impl.source.tree.LeafPsiElement.getNextSibling(LeafPsiElement.java:75)
    at com.intellij.psi.SyntaxTraverser$PsiApi.next(SyntaxTraverser.java:308)
    at com.intellij.psi.SyntaxTraverser$PsiApi.next(SyntaxTraverser.java:264)
    at com.intellij.psi.SyntaxTraverser$ApiEx$1.fun(SyntaxTraverser.java:254)
    at com.intellij.util.containers.JBIterable$2$1.nextImpl(JBIterable.java:129)
    at com.intellij.util.containers.JBIterator.peekNext(JBIterator.java:150)
    at com.intellij.util.containers.JBIterator.hasNext(JBIterator.java:110)
    at com.intellij.util.containers.TreeTraversal$BiOrderIt.nextImpl(TreeTraversal.java:541)
    at com.intellij.util.containers.JBIterator.peekNext(JBIterator.java:150)
    at com.intellij.util.containers.JBIterator.hasNext(JBIterator.java:110)
    at com.intellij.util.containers.JBIterable.isEmpty(JBIterable.java:762)
    at com.intellij.psi.util.PsiTreeUtil.hasErrorElements(PsiTreeUtil.java:1206)
    at ai.codium.ui.structureview.CodiumStructureViewRootElement.getChildren(CodiumStructureViewElements.kt:85)
    at ai.codium.ui.structureview.CodiumStructureViewRootElement.getChildren(CodiumStructureViewElements.kt:69)
    at com.intellij.ide.util.treeView.smartTree.TreeElementWrapper.initChildren(TreeElementWrapper.java:35)
    at com.intellij.ide.util.treeView.smartTree.CachingChildrenTreeNode.rebuildSubtree(CachingChildrenTreeNode

<TRIMMED STACKTRACE>

)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:109)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:68)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(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:68)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:106)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:71)
    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:475)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:243)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:216)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:205)
    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: IntelliJ IDEA 2022.3.3 Build: #IU-223.8836.41 March 10, 2023
Theme: One Dark
JRE: 17.0.6+1-b653.34, JetBrains s.r.o.
JVM: 17.0.6+1-b653.34, OpenJDK 64-Bit Server VM, JetBrains s.r.o.
Operating System: Mac OS X 13.5.2 (aarch64)

=== Plugins ===
Custom plugins: [EnvFile (3.4.1), Resource Bundle Editor (223.7571.203), Nx Console Idea (0.56.0), JPA Buddy (2023.1.1-223), Java Bean to Json (1.0.7), PHP (223.8836.42), One Dark theme (5.7.4), ChatGPT (2.1.6-222.223), Big Data Tools (223.8836.7), CodiumAI - Integrity Agent powered by GPT-3.5&4 (0.6.08), Nx Console (1.3.1), Json2Pojo (1.1.0)]
Disabled plugins:[ChatGPT Tool (1.0.3), Android Design Tools (223.8836.41), Nginx Configuration Pro (2022.1.1), Android (2022.1.1 Beta 2.223.8836.41), Smali Support (223.8836.41)]

┆Issue is synchronized with this Trello card by Unito

aldanchenko commented 1 year ago

Hi @sau-deep

Thanks for reporting. We made a fix. It should be included in the next version.

Best regards, Alex

sau-deep commented 1 year ago

Hi, What was the issue exactly ?

aldanchenko commented 1 year ago

This error could appear when user works with CodiumAI Structure view. Before showing items in this tool window it checks for errors in a file. This operation is quite resource-intensive. that's why, sometimes this error may appear. We found another way to do this check

ArtsiomCh commented 1 year ago

Fixed in 0.6.12 Please report if experience it again