Intellij hung repeatedly when loading IC2 project
I suspect there’s a race condition happening somewhere. Here’s what happened this morning.
- Checked for updates in my IDE this morning, and there were two available: CSV Editor and IC2. I continued with the download, and restarted the IDE to apply the new versions.
- Restarted IDE after downloading updates, and it reopened the projects I had open previously. It hung and never recovered, so I did a “force quit”.
- Tried again, same result.
- Searched for how to start Intellij without reopening projects, and found instructions to manually edit
ide.general.xml
. I added a line to prevent reopening last projects, and saved the file. - I started IJ again, this time it gave me the project list to choose from rather than reopening any. I was able to open 2-3 non-IC2 projects successfully. When I opened my IC2 project, the IDE hung.
- “Force quit” again, restarted IJ, invalidated caches, then restarted
- Opened the IC2 project first. The IDE hung. Force quit again.
- Opened IJ, went to the help menu to reveal the log file in finder, deleted all logs and thread dumps, restarted in preparation to grab a clean log after the next hang.
- After all that, when I opened my IC2 project it finally opened and reindexed.
Comments (18)
-
repo owner -
reporter Scott, as I said in
#8
above, I deleted all logs and thread dumps so that I could get a clean log to attach to this issue. Then when I restarted Intellij expecting it to hang again, the project loaded (after hanging at least 5 times). So unfortunately I don’t have anything to provide, but if it happens again I’ll grab everything right away rather than deleting and trying to reproduce. -
repo owner Ah, that’s what I get for responding from my phone while out and about. Sorry for the oversight. If you do see this again (and hopefully you don’t), please do grab all of that diagnostic data and provide it so that I can see what’s going on.
-
repo owner - changed status to resolved
I'm going to resolve this for now as there's nothing I can really do, but reopen it if/when you see the problem again.
-
reporter - changed status to open
This happened again, reopening. At the time I had a few different projects open. I closed my IC2 project, then when I went to reopen it, Inellij hung. Attaching a zip file with the log and thread dump.
-
reporter - attached ij-freeze.zip
Freeze that just happened.
-
reporter - attached ij-freeze2.zip
Just had another freeze after increasing max heap size to 3GB.
-
reporter - attached ij-freeze3.zip
This time I edited the
ide.general.xml
file to disable the reopenLastProject setting, then restarted. I got the open project window, and selected a python project. I then hit the open project window again, and selected my IC2 project, and the IDE hung. -
repo owner Mark, I won’t likely be able to dig into this too deeply until tomorrow, but I do see one suspicious thing in the provided thread dumps. Can you get back into a state where no project is open and then disable duplicate detection for Apex as follows:
Then see if things open properly for you. If that does it, I can make the path I see in the thread dumps not execute at all while indexing is occurring. I’m actually very surprised that it’s doing so anyway, but I can definitely be more explicit about that.
I’ll be very curious to hear if that helps or not.
-
reporter BTW I downgraded to the previous plugin version (2.2.5.5), and I can now open the project again.
-
repo owner That is bizarre because the differences between 2.2.5.5 and 2.2.5.6 are only in the Apex postfix completion templates and live templates, and none of those changes even kick in unless you use them. I just verified that there were no other changes between the two. My guess is that it’s coincidence, but I think I’m going to act on my hunch about Apex duplicate code detection and guard against it being evaluated during indexing which is what the thread dump seemed to indicate as the issue. I’ll include that in tomorrow’s build and perhaps you can update to it and see if the problem returns or not.
-
repo owner Mark, I released 2.2.5.7 this morning with the described change to Apex duplicate code detection. If you get a chance, would you please update to that version and see if this problem still occurs?
-
reporter Gotcha. I just updated to the latest version again, opened a few projects, then the IC2 project, and everything was successful. I’ll keep using this version until I see it hang again, then I’ll try your suggestion.
-
reporter Scott, I haven’t seen this happen since updated to 2.2.5.7. But now that you mentioned it a few comments above, the IDE hung a couple of times prior to installing 2.2.5.5. It was just that doing a force quit and restart solved the issue, whereas after installing 2.2.5.5 it suddenly became repeatable (at least until I decided to clear the log and thread dumps). So I think the problem very well may be the Apex duplicate code detection, and for whatever reason it happened multiple times consecutively after I installed 2.2.5.5.
-
repo owner Thanks for the update, Mark. Just to clarify, you have not seen the problem again since updating to 2.2.5.7, correct? If so, let’s just keep an eye on it for a bit and see whether you’re just getting lucky right now or if it truly seems to have been resolved. I hate these types of things where it can not happen one hundred times leading to a false sense of security and then suddenly happen again.
-
reporter Just had a new hang today. Attaching log and thread dumps.
-
reporter - attached ij-freeze4.zip
I’ve been working on some non-IC2 projects for the past week or so. I had 2-3 such projects open, and when I opened my IC2 project, it hung pretty quickly with “Scanning files to index…” in the bottom statusbar.
-
repo owner - changed status to resolved
This should be fixed (at least the instance observed in the provided thread dumps) as of 2.2.6.0. Feel free to reopen with new thread dumps if you still see it after updating.
- Log in to comment
Mark, can you provide the information collated using Help>Collect Logs and Diagnostic Data? In addition to the
idea.log
file(s), that should also include any thread dumps created when the IDE process was in this state. It would be helpful if you could let me know which of those thread dumps seem to be from the timeframe of this issue as well.