IntelliJ IDEA Freezes on Code Completion

Issue #1514 resolved
Samir Awuapara created an issue

Code Completion freezes consistently for one particular project. Attached are the idea.log files threadDump. I am running the latest version of IC2 which I upgraded today and consequently freezing just started today.

Thanks for your help!

Comments (5)

  1. Samir Awuapara reporter

    Scott if it helps, I reverted back to 2.0.9.7 from 2.0.9.9 and the issue stopped so its likely something related to the latest Issue 1223

  2. Scott Wells repo owner

    Samir, I'm sorry for the issue. Thanks for providing the logs and thread dumps. I'm still trying to figure out exactly what's going on, but one thing that stands out in the log is:

    java.lang.Throwable: Stub index points to a file with PSI stubs (instead of non-PSI ones): file type = com.illuminatedcloud.intellij.filetype.MetaXmlFileType@5cee1188, indexed file type =  com.illuminatedcloud.intellij.filetype.MetaXmlFileType@5cee1188
        at com.intellij.openapi.diagnostic.Logger.error(Logger.java:145)
        at com.intellij.psi.stubs.StubProcessingHelperBase.handleNonPsiStubs(StubProcessingHelperBase.java:135)
        at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:66)
        at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:404)
        at com.intellij.psi.stubs.StubIndex.processElements(StubIndex.java:51)
        at com.intellij.psi.stubs.StubIndex.get(StubIndex.java:41)
        at com.intellij.psi.stubs.AbstractStubIndex.get(AbstractStubIndex.java:39)
        at com.illuminatedcloud.intellij.index.AbstractApexDeclarationStubIndex.get(SourceFile:30)
        ...
        at com.illuminatedcloud.intellij.completion.ApexCompletionProvider.addCompletions(SourceFile:2139)
    

    To me that looks like your stub index has gotten corrupted. I'd be curious to know whether this problem continues if you upgrade to 2.0.9.9 again and use File>Invalidate Caches / Restart to force the IDE to rebuild its indices. It looks like you also update to 2019.3.2 recently as well, though that wouldn't explain why 2.0.9.7 works while 2.0.9.9 does not.

  3. Samir Awuapara reporter

    @Scott Wells Thank you are right, it was likely a corrupted index. I upgraded then Invalidated them as you suggested and AutoComplete no longer freezes.

  4. Scott Wells repo owner

    I'm glad to hear that seems to have resolved the situation for you. Thanks for letting me know!

  5. Log in to comment