IntelliJ freezing - logs point to Illuminated Cloud

Issue #1113 new
Piotr Kożuchowski created an issue

After some git operations, I've had situation where IntelliJ completely froze during editing. To be precise, it happened when I deleted bracket ")" in code and it happened twice. I've killed IntelliJ with task manager and then it froze in the same place after restart. It happened a couple of times in the past too, so maybe it's the same issue.

I don't have any reasonable reproduction steps, so I'm just attaching idea.log and leaving this with low priority. Perhaps you will notice something interesting in stack trace, both freezes are there.

Kind Regards, Piotr

Comments (8)

  1. Scott Wells repo owner

    Thanks for the log. It definitely seems to be related to a stale cache/index entry:

    2018-09-13 20:56:48,493 [ 110890]   WARN - openapi.wm.impl.ToolWindowImpl - ToolWindow icons should be 13x13. Please fix ToolWindow (ID:  Illuminated Cloud) or icon jar:file:/C:/Users/piotr/.IntelliJIdea2018.2/config/plugins/IlluminatedCloud2/lib/IlluminatedCloud.jar!/images/IlluminatedCloudLogo_16x16.png 
    2018-09-13 20:57:04,072 [ 126469]  ERROR - j.psi.stubs.StubTreeLoaderImpl - Outdated stub in index: file://C:/Users/piotr/IdeaProjects/DevToolkit/src/classes/Collections.cls indexed at 1536864840409 with document size 29667, doc=DocumentImpl[file://C:/Users/piotr/IdeaProjects/DevToolkit/src/classes/Collections.cls], docSaved=false, wasIndexedAlready=true, queried at 1536864840409
    indexed lengths={chars=29668, bytes=30473}
    doc length=29667
    file length=30473
    cached PSI class com.illuminatedcloud.intellij.filetype.ApexClassFile
    PSI length=29667
    projects with file: 1 
        at com.intellij.psi.stubs.StubTreeLoaderImpl.diagnoseLengthMismatch(
        at com.illuminatedcloud.intellij.index.AbstractApexDeclarationStubIndex.get(
        at com.illuminatedcloud.intellij.psi.util.ApexDeclarationUtil.fastFindTypeDeclaration(
        at com.illuminatedcloud.intellij.psi.util.ApexDeclarationUtil.findTypeDeclaration(
        at com.illuminatedcloud.intellij.psi.util.ApexDeclarationUtil.findTypeDeclaration(
        at com.illuminatedcloud.intellij.psi.impl.ApexTypeMixin.lambda$getExpressionType$0(

    I thought I'd addressed that in the next-to-last build by properly closing released tabbed editor windows. I'm wondering if you perhaps have cruft left over from before that fix still affecting you. Just to rule that you completely, do you mind using File>Invalidate Caches / Restart to 100% rebuild both IC and base IDE indices, then see if the problem recurs? If it doesn't, that was the problem. If it does, then I clearly still have an issue of this type that I need to track down.

  2. Piotr Kożuchowski reporter

    I will try to do that next time :) It's very mischievous bug, I hardly ever get reproducible scenario. This time it happened twice when I was deleting closing bracket from expression. On the 3rd time, I've edited the same expression from the other side and it did not freeze.

  3. Scott Wells repo owner

    Yeah, that's what makes tracking these down and fixing them difficult as well! So definitely see if rebuilding all indices eliminates it, and if it doesn't and you can't find a good pattern to reproduce, please try to grab a thread dump of the IDE process when it happens. Let me know if you're not sure how to do that.

  4. Piotr Kożuchowski reporter

    @RoseSilverSoftware Hi Scott,

    Actually I don't know how to thread dump IDE ^^" I've attached whole logs directory, there're threaddumps from the freeze just now and from previous ones. IntelliJ generates them automatically, but I'm not sure if they contain information you need.

    Kind Regards,

  5. Scott Wells repo owner

    Thanks, Piotr. In the logs I can definitely see things go south with a few StackOverflowExceptions when IC is attempting to perform type inference. Up until that point things look fine, then something happens that puts it into a downward spiral. Unfortunately I can't tell what, though.

    In the attached thread dumps, I can see the stack trace of a thread that goes through IC code blocked waiting for the file-based stub index. That seems to be a downstream effect of whatever has caused things to go south.

    From the log it just looks like you were running tests before this happened? Can you think of anything else that you might have been doing? Normally I'd see things like PsiInvalidElementAccessException as the caches have degraded. I've never seen it go from no issues at all to a state like this as if a switch had been flipped...

  6. Piotr Kożuchowski reporter

    I've ran tests, but that was a few minutes before. The last thing I did was backspacing new line from the bottom of the class and previously it also happened while I was backspacing expression bracket.

  7. Log in to comment