Idea freeze during retrieve components or code completition

Issue #133 resolved
Stefan Abramiuk created an issue

Case 1: 1. Retrieve components 2. Click on one of files 3. IDE stop responding. (logs attached)

Case 2: 1. Open a class 2. Add new variable to class 3. Type it's first letter in method 4. Ctrl+space 5. IDE stop responding. (will provide logs)

Comments (21)

  1. Scott Wells repo owner

    Hi, Stefan. Well that's certainly not good! I'll take a look at the provided logs shortly. Is this happening consistently or occasionally? Not that either one is good, but just wondering if this is completely keeping you from using IDEA or just popping up once in a while.

    Looking at the log, I'm seeing quite a few like "Attempting to add an invalid element as a cache dependency". Can you go into Settings>Illuminated Cloud (<yourProjectName>) and click the Rebuild button, then allow IDEA to restart? Not sure if that'll help, but that message is logged when things aren't quite right in the cached info which might be leading to a weird state.

  2. Stefan Abramiuk reporter

    Hi @RoseSilverSoftware It happens occasionally, but from time to time it's really blocking me out. I'll try to Rebuild cache dependency next time and give you update.

  3. Scott Wells repo owner

    Okay. Assuming it happens again, the best way to give me information that will lead to a quick solution is to get a thread dump while it's locked up. That will show me if it's a thread deadlock (which is my best guess) and which threads are contributing to it. You can use a tool called VisualVM (comes with every JDK) to get a thread dump from a running Java process (IntelliJ IDEA is one):

    https://visualvm.java.net/applications_local.html

    Oh, and if you're on a Mac, can you verify that you're using Apple's Java 6 JRE to run IntelliJ IDEA?

    Keep me posted and once we have the right info, I'll definitely get a solution out to you. Sorry for the issues!

  4. Anthony Sanchez

    Hey Scott, I also ran into this problem when running a test and trying to edit some code with autocomplete. I've run into this freeze under various scenarios, usually related to deploying and editing code at the same time. I attached a thread dump from VisualVM.

  5. Scott Wells repo owner

    Thanks, Anthony! This type of information will help tremendously in debugging and resolving this. Let me see what I can figure out...

  6. Scott Wells repo owner

    That thread dump helps, but I'm not seeing a smoking gun. If you're familiar with Java Swing, I can see the EDT in a wait state, but there's not a traditional deadlock. I have a thought on a change I can make that might resolve the issue, but it's not 100% substantiated by the info in that thread dump. If you guys want, I can spin a test build for you to download with just that change to see if it helps. Otherwise I'd prefer to wait for a few more thread dumps as data points before rolling out a change like that to all users. Let me know if you'd like a test build and I can get it to you pretty quickly.

  7. Scott Wells repo owner

    Hmmm...that one looks quite different, Stefan. That one seems to be having an issue finding classes used by the API client:

    java.lang.NoClassDefFoundError: org/apache/cxf/binding/soap/SoapFault at com.illuminatedcloud.intellij.settings.project.IlluminatedCloudConnection.getClient(SourceFile:447) at com.illuminatedcloud.intellij.settings.module.ModuleContentsEditor.createAllMetadataPackage(SourceFile:346) at com.illuminatedcloud.intellij.settings.module.ModuleContentsEditor.access$400(SourceFile:74) at com.illuminatedcloud.intellij.settings.module.ModuleContentsEditor$5.run(SourceFile:238)

    Looking through your log, I'm seeing other instances of NoClassDefFoundError and UnsatisfiedLinkError trying to find classes that are distributed with my plugin, e.g.,:

    Caused by: java.lang.NoClassDefFoundError: org/apache/tika/mime/MimeTypeException java.lang.UnsatisfiedLinkError: Error looking up function 'SetCustomProxy'

    It looks to me like perhaps the plugin didn't install properly because it's unable to resolve things from third-party libraries that it uses. Do you mind completely uninstalling and reinstalling the Illuminated Cloud plugin to see if that helps to remedy these issues?

  8. Stefan Abramiuk reporter

    @RoseSilverSoftware So I did. Had to remove IDE and all it's remanings and install all of it again.

  9. Scott Wells repo owner

    Okay, thanks for following up. Glad you got back into a good state but curious as to how it got into that bad state.

    FYI, I think I have a reasonable way to reproduce this deadlock locally and will try to get a solid fix for it in the next couple of days.

  10. Scott Wells repo owner

    I think I have a fix for this but as you can imagine with changes to the concurrency model, I want to test it a bit more. I should get it out this week, though.

  11. Scott Wells repo owner

    Prospective fix delivered in 1.6.5.0. Resolving this for now, but for those following this, don't hesitate to reopen this issue or create a new issue if the problem occurs again.

  12. Log in to comment