Freeze/deadlock while editing Apex (seems to have to do with syntax analysis/autocompletion)

Issue #308 resolved
Andrew Clunis created an issue

It seems to be repeatable, but short of spending a bunch of time to create a standalone example project/code, it's not clear how to make a meaningful bug report. It happens for me very frequently.

That being said, it seems to happen while editing code inside of a catch block, at least.

Comments (19)

  1. Andrew Clunis reporter

    Additionally, while it's frozen, I don't observe a CPU core spinning or anything like that. Seems like a deadlock.

  2. Scott Wells repo owner

    Thanks, Andrew. I haven't had one in a long while, but my guess is that it's a deadlock as well. When this happens again, would you mind getting a thread dump of the running process and sending it over? That should show the smoking gun. Just in case you're not aware, there are a few ways to get one, but I generally use jvisualvm from the Java bin directory, find the process, and request a thread dump. Thanks!

  3. Andrew Clunis reporter

    That's fantastic. I'm often a ruthless detractor of Java-related technology, but I must say that was a pleasant experience. Dump coming up.

  4. Scott Wells repo owner

    Thanks, Andrew! I'll take a look over the weekend and see what I can find. Hopefully it's something I can turn around very quickly.

  5. Scott Wells repo owner

    Thanks for the additional thread dump. Now that I've gotten out the initial Lightning release, let me take a look at these and see if I can get you a fix.

  6. Scott Wells repo owner

    Thanks for the helpful diagnostic info, guys. The smoking gun appears to be this message from the provided log:

    2016-04-29 13:18:01,614 [ 146435]  ERROR - il.indexing.FileBasedIndexImpl - Accessing 'ApexTypeDeclarationStubIndex' during processing 'ApexDeclarationStubIndex'. Nested different indices processing may cause deadlock java.lang.Throwable
    

    I'm going to need to follow up with the folks at JetBrains about this as I'm protecting the exact code to ensure that I'm not doing what they're saying, but the condition I'm checking is evaluating differently from what's expected. It looks like you're both running IntelliJ IDEA 2016.1.1, but can you please confirm that for me to help in my dialog with JetBrains?

    Thanks!

  7. Scott Wells repo owner

    I've filed a support case with JetBrains. Hopefully they'll provide guidance on this soon. I'll keep you posted here as I learn things. My apologies for the inconvenience in the interim.

  8. Robert Conner

    I have not had this issue since downgrading to 1.7.0.3

    (please note this is a 1.7.1.* issue, not 1.7.0.3)

  9. Scott Wells repo owner

    Thanks for letting me know, Robert. I'll look at what might have changed during the Lightning work that could have introduced this.

  10. Scott Wells repo owner

    Prospective fix delivered in 1.7.2.4. Please reopen with logs and/or thread dumps if the problem continues to occur.

  11. Log in to comment