Latest Beta unusable for big Flex project

I keep getting RTE(see below) and CPU is constantly around 100% when trying to open big flex project.
And eventually IDEA ask for more memory (more then 512M)


The latest build that more or less worked for me was 90.137. After that all builds had similar problem.


Stub and PSI element type mismatch in library.swf: stub com.intellij.lang.javascript.psi.stubs.impl.JSParameterStubImpl@5ea4a, AST JS:FUNCTION_DECLARATION; Element(JS:FUNCTION_DECLARATION)
java.lang.Throwable
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:48)
    at com.intellij.psi.impl.source.PsiFileImpl$1.visitNode(PsiFileImpl.java:14)
    at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor.visitComposite(RecursiveTreeElementWalkingVisitor.java:4)
    at com.intellij.psi.impl.source.tree.CompositeElement.acceptTree(CompositeElement.java:117)
    at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor$1.visit(RecursiveTreeElementWalkingVisitor.java:1)
    at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor$1.visit(RecursiveTreeElementWalkingVisitor.java:5)
    at com.intellij.psi.WalkingState.walkChildren(WalkingState.java:59)
    at com.intellij.psi.WalkingState.elementStarted(WalkingState.java:49)
    at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor.visitNode(RecursiveTreeElementWalkingVisitor.java:12)
    at com.intellij.psi.impl.source.PsiFileImpl$1.visitNode(PsiFileImpl.java:1)
    at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor.visitComposite(RecursiveTreeElementWalkingVisitor.java:4)
    at com.intellij.psi.impl.source.tree.CompositeElement.acceptTree(CompositeElement.java:117)
    at com.intellij.psi.impl.source.PsiFileImpl.a(PsiFileImpl.java:123)
    at com.intellij.psi.impl.source.PsiFileImpl.loadTreeElement(PsiFileImpl.java:181)
    at com.intellij.extapi.psi.StubBasedPsiElementBase.getNode(StubBasedPsiElementBase.java:118)
    at com.intellij.extapi.psi.ASTDelegatePsiElement.getPrevSibling(ASTDelegatePsiElement.java:80)
    at com.intellij.psi.util.PsiTreeUtil.getPrevSiblingOfType(PsiTreeUtil.java:229)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSAttributeListImpl.getAttributes(JSAttributeListImpl.java:114)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSAttributeListImpl.initAttributes(JSAttributeListImpl.java:155)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSAttributeListImpl.getAttributesByName(JSAttributeListImpl.java:141)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.isImplicitlyDeclaringEventDispatcher(JSClassBase.java:409)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.access$300(JSClassBase.java:60)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase$ImplementsClassesUserDataCache.doCompute(JSClassBase.java:386)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase$ClassesUserDataCache$1.compute(JSClassBase.java:420)
    at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:8)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.getClassesFromReferenceList(JSClassBase.java:272)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.getImplementedInterfaces(JSClassBase.java:345)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.getImplicitlyDeclaredInterfaces(JSClassBase.java:233)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$RelevantDefsUserDataCache$MyJSElementVisitor.startVisiting(JSResolveUtil.java:2044)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$RelevantDefsUserDataCache$MyJSElementVisitor.access$300(JSResolveUtil.java:1999)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$RelevantDefsUserDataCache$1.compute(JSResolveUtil.java:1990)
    at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:5)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil.processDeclarationsInScope(JSResolveUtil.java:1899)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassImpl.processMembers(JSClassImpl.java:131)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.processDeclarations(JSClassBase.java:294)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassImpl.processDeclarations(JSClassImpl.java:137)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl$QualifiedItemProcessor.process(JSReferenceExpressionImpl.java:782)
    at com.intellij.lang.javascript.psi.resolve.BaseJSSymbolProcessor.addType(BaseJSSymbolProcessor.java:874)
    at com.intellij.lang.javascript.psi.resolve.BaseJSSymbolProcessor.doEvalForExpr(BaseJSSymbolProcessor.java:406)
    at com.intellij.lang.javascript.psi.resolve.BaseJSSymbolProcessor.doEvalForExpr(BaseJSSymbolProcessor.java:202)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.doResolve(JSReferenceExpressionImpl.java:519)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.access$100(JSReferenceExpressionImpl.java:54)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl$MyResolver.doResolve(JSReferenceExpressionImpl.java:460)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl$MyResolver.doResolve(JSReferenceExpressionImpl.java:456)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil.resolve(JSResolveUtil.java:1869)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.multiResolve(JSReferenceExpressionImpl.java:453)
    at com.intellij.lang.javascript.validation.JSAnnotatingVisitor.checkRefExpression(JSAnnotatingVisitor.java:614)
    at com.intellij.lang.javascript.validation.JSAnnotatingVisitor.visitJSReferenceExpression(JSAnnotatingVisitor.java:584)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.accept(JSReferenceExpressionImpl.java:444)
    at com.intellij.lang.javascript.validation.JSAnnotatingVisitor.annotate(JSAnnotatingVisitor.java:91)
    at com.intellij.codeInsight.daemon.impl.analysis.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:63)
    at com.intellij.codeInsight.daemon.impl.analysis.DefaultHighlightVisitor.visitElement(DefaultHighlightVisitor.java:3)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.accept(JSReferenceExpressionImpl.java:447)
    at com.intellij.codeInsight.daemon.impl.analysis.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:21)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$5.run(GeneralHighlightingPass.java:19)
    at com.intellij.codeInsight.daemon.impl.analysis.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:48)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:94)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:141)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:11)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:28)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:11)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:346)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:3)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:32)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:4)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)

7 comments
Comment actions Permalink

Try invalidating caches and restart

belarus wrote:

I keep getting RTE(see below) and CPU is constantly around 100% when trying to open big flex project.
And eventually IDEA ask for more memory (more then 512M)


The latest build that more or less worked for me was 90.137. After that all builds had similar problem.


Stub and PSI element type mismatch in library.swf: stub com.intellij.lang.javascript.psi.stubs.impl.JSParameterStubImpl@5ea4a, AST JS:FUNCTION_DECLARATION; Element(JS:FUNCTION_DECLARATION)
java.lang.Throwable
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:48)
    at com.intellij.psi.impl.source.PsiFileImpl$1.visitNode(PsiFileImpl.java:14)
    at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor.visitComposite(RecursiveTreeElementWalkingVisitor.java:4)
    at com.intellij.psi.impl.source.tree.CompositeElement.acceptTree(CompositeElement.java:117)
    at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor$1.visit(RecursiveTreeElementWalkingVisitor.java:1)
    at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor$1.visit(RecursiveTreeElementWalkingVisitor.java:5)
    at com.intellij.psi.WalkingState.walkChildren(WalkingState.java:59)
    at com.intellij.psi.WalkingState.elementStarted(WalkingState.java:49)
    at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor.visitNode(RecursiveTreeElementWalkingVisitor.java:12)
    at com.intellij.psi.impl.source.PsiFileImpl$1.visitNode(PsiFileImpl.java:1)
    at com.intellij.psi.impl.source.tree.RecursiveTreeElementWalkingVisitor.visitComposite(RecursiveTreeElementWalkingVisitor.java:4)
    at com.intellij.psi.impl.source.tree.CompositeElement.acceptTree(CompositeElement.java:117)
    at com.intellij.psi.impl.source.PsiFileImpl.a(PsiFileImpl.java:123)
    at com.intellij.psi.impl.source.PsiFileImpl.loadTreeElement(PsiFileImpl.java:181)
    at com.intellij.extapi.psi.StubBasedPsiElementBase.getNode(StubBasedPsiElementBase.java:118)
    at com.intellij.extapi.psi.ASTDelegatePsiElement.getPrevSibling(ASTDelegatePsiElement.java:80)
    at com.intellij.psi.util.PsiTreeUtil.getPrevSiblingOfType(PsiTreeUtil.java:229)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSAttributeListImpl.getAttributes(JSAttributeListImpl.java:114)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSAttributeListImpl.initAttributes(JSAttributeListImpl.java:155)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSAttributeListImpl.getAttributesByName(JSAttributeListImpl.java:141)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.isImplicitlyDeclaringEventDispatcher(JSClassBase.java:409)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.access$300(JSClassBase.java:60)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase$ImplementsClassesUserDataCache.doCompute(JSClassBase.java:386)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase$ClassesUserDataCache$1.compute(JSClassBase.java:420)
    at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:8)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.getClassesFromReferenceList(JSClassBase.java:272)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.getImplementedInterfaces(JSClassBase.java:345)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.getImplicitlyDeclaredInterfaces(JSClassBase.java:233)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$RelevantDefsUserDataCache$MyJSElementVisitor.startVisiting(JSResolveUtil.java:2044)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$RelevantDefsUserDataCache$MyJSElementVisitor.access$300(JSResolveUtil.java:1999)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$RelevantDefsUserDataCache$1.compute(JSResolveUtil.java:1990)
    at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:5)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil.processDeclarationsInScope(JSResolveUtil.java:1899)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassImpl.processMembers(JSClassImpl.java:131)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.processDeclarations(JSClassBase.java:294)
    at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassImpl.processDeclarations(JSClassImpl.java:137)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl$QualifiedItemProcessor.process(JSReferenceExpressionImpl.java:782)
    at com.intellij.lang.javascript.psi.resolve.BaseJSSymbolProcessor.addType(BaseJSSymbolProcessor.java:874)
    at com.intellij.lang.javascript.psi.resolve.BaseJSSymbolProcessor.doEvalForExpr(BaseJSSymbolProcessor.java:406)
    at com.intellij.lang.javascript.psi.resolve.BaseJSSymbolProcessor.doEvalForExpr(BaseJSSymbolProcessor.java:202)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.doResolve(JSReferenceExpressionImpl.java:519)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.access$100(JSReferenceExpressionImpl.java:54)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl$MyResolver.doResolve(JSReferenceExpressionImpl.java:460)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl$MyResolver.doResolve(JSReferenceExpressionImpl.java:456)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil.resolve(JSResolveUtil.java:1869)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.multiResolve(JSReferenceExpressionImpl.java:453)
    at com.intellij.lang.javascript.validation.JSAnnotatingVisitor.checkRefExpression(JSAnnotatingVisitor.java:614)
    at com.intellij.lang.javascript.validation.JSAnnotatingVisitor.visitJSReferenceExpression(JSAnnotatingVisitor.java:584)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.accept(JSReferenceExpressionImpl.java:444)
    at com.intellij.lang.javascript.validation.JSAnnotatingVisitor.annotate(JSAnnotatingVisitor.java:91)
    at com.intellij.codeInsight.daemon.impl.analysis.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:63)
    at com.intellij.codeInsight.daemon.impl.analysis.DefaultHighlightVisitor.visitElement(DefaultHighlightVisitor.java:3)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.accept(JSReferenceExpressionImpl.java:447)
    at com.intellij.codeInsight.daemon.impl.analysis.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:21)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$5.run(GeneralHighlightingPass.java:19)
    at com.intellij.codeInsight.daemon.impl.analysis.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:48)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:94)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:141)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:11)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:28)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:11)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:346)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:3)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:32)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:4)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)

---
Original message URL: http://www.jetbrains.net/devnet/message/5249302#5249302



--
Best regards,
   Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Did you try "File...Invalidate caches"?

-tt

0
Comment actions Permalink

I completely agree - i have 1024M of memory allocated to my IntelliJ instance via Info.plist and still somehow ever since the 90.137 build I have been completely unable to Alt+Enter or classes to import or to Ctrl+Space to complete filenames.

This is pretty bad and I am not sure what has changed, but it seems unbearably slow. I only have a two module flex project open. There are upwards of 40 flex library dependencies, but wow this is just slow.

Any ideas how I can make it faster or debug where the slowdown is?

0
Comment actions Permalink

Hello Ada,

Any ideas how I can make it faster or debug where the slowdown is?


It's very easy to capture a CPU of some minutes of editing.
To do this for non-EAP builds, see the instructions here:
http://www.jetbrains.net/devnet/docs/DOC-192

The CPU snapshot files are pretty small, so you can directly attach them
to a bug ticket here:
http://youtrack.jetbrains.net/issues/IDEA

Add some details on the project, and what exactly seems slow.

If you're seeing huge memory allocation/GC churn, or unexpected
retention after closing a project, a memory snapshot (a.k.a. heap dump)
helps investigation. The document linked above explains how to capture
one. Note that memory snapshots are usually big (10x-100s of MBs), can't
be attached to a bug tracking ticket. Instead, upload them to
"ftp://ftp.intellij.net/.uploads", and mention the uploaded filename and
circumstances in the bug ticket.

In my experience Jetbrains does fix most performance issues sooner or
later. Providing cpu/memory snapshots and occasional nagging in the
forums makes "sooner" likely :)

-tt

0
Comment actions Permalink

Thanks for the info.

I've tried "Invalidate caches" options but still running into the same issue.

0
Comment actions Permalink

I also have tried to recreate this project but ran into simiar RTEs. After all source files were indexed, opening any actionscrip file resulting in 100 RTEs (I guess while IDEA is doing syntax analysis of a file and dependents).

Not sure how I can isolate or pinpoint the problem. There are a lot of dependencies and I don't see exact file name that causing the problem in the log.

But it seems to work fine in build 137. (and works fine in flex builder). I also tried to create simple actionscript project and it works fine.

0

Please sign in to leave a comment.