I have a long-lasting problem with eclipse, quite blocking, that started after eclipse Luna (no problem with Luna). For example, this problem is occurring with the most recent version of eclipse, whatever performance options I change (advised by other answers from stackoverflow).
With my quite big project (thousands of classes), eclipse is very slow (stuck several minutes or tens of minutes) quite randomly, when I open it, but later when I open project tree nodes, when I refresh, update the SVN working copy, etc.
Using JVisualVM, I can see that all the time is spent in org.eclipse.jdt.internal.ui.navigator.NonEssentialElementsFilter.hasFilteredChildren and, in fact, in org.eclipse.jdt.internal.core.PackageFragment.getElementName and
org.eclipse.jdt.internal.core.util.Util.concatWith...
I tried a lot of things (decorations, antivirus, breakpoints, recreating a new project, ...) but nothing helps.
And with Luna or previous versions, I did not have any problem like this. And I tried with a lot of newer versions, Mars, Neon JAVA only, Neon JEE, etc., they all have the same problem.
I hope someone can help, because it is quite blocking!
Agree with the workaround of using Package Explorer.
Another workaround if you are set on Project Explorer, is to disable the options that seem to be causing the contention. In Project Explorer "settings" (downward facing triangle to the right), go to Filters and Customization / Content. Then uncheck everything except Java Elements. That helped for me - but I eventually just switched to Package Explorer.
This seems to be a known problem (see Eclipse bug 506009) which has not yet been fixed.
As a workaround use the Package Explorer instead of the Project Explorer.
Update: The Bug has been fixed in the meantime. Upgrading to Oxygen.3 (released on March 21, 2018) should fix the problem.
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
I'm running on Arch Linux, on an i7-5930k 6 core CPU and 64GB of DDR4 RAM, and I'm using IntelliJ IDEA 14.
IDEA was working just fine for me several days ago, but one day, suddenly, it began hanging after opening a project, during the "Indexing" stage. I did not update IDEA and nothing changed about my projects. The IDE's UI hangs after it opens the project, with just a tiny little sliver of the progress bar for "Indexing" complete. Every 5-10 minutes or so it unfreezes and the progress bar crawls forward a little bit, before the IDE freezes again for another few minutes. This happens repeatedly for anywhere between 15 minutes and an hour, until it is finally finished indexing, at which point it hangs for another 5-10 minutes doing nothing, before it finally unlocks and allows me to develop.
While this is happening, my system is fairly unresponsive - Firefox tabs take a long time to switch, and scrolling in them is laggy. Opening a new terminal window takes a long time. Switching windows in general takes awhile. In htop, one of my CPU cores is loaded at 100% while the rest have a normal load, and about 6GB of RAM is used (fairly normal load when this system is idle.)
Things I have tried that have not helped:
Delete caches folder
Delete entire ~/.IntelliJIDEA14 folder
Reinstall IntelliJ package
Download IntelliJ manually from JetBrains' site and run it from my Downloads folder (to see if there was something wrong with the Arch AUR package)
Configure IntelliJ to use my system JVM and Maven for importing instead of its embedded tools
Opening multiple different projects (not just the one I initially experienced the issue on.)
This issue is really hurting my workflow, if anybody has any solution to this I would be very greatful.
Try Invalidating the cache and restarting IntelliJ.
In the File menu, select Invalidate Caches / Restart... and then click the Invalidate and Restart button.
I've finally figured it out. The solution was... Rather odd. TL;DR: Run it under strace. Read on for a more detailed explanation.
I came upon it when I decided to run IntelliJ under strace to see what files it was opening to determine whether or not it was a filesystem bottleneck.
This gave me some very strange results: strace was spewing out a near-constant stream of segfaults. Not only that, but IntelliJ was running just fine, not taking forever to index.
After consulting with a friend, I learned that on Arch Linux, systemd logs a dump of a process's memory every time a segfault occurs, except when a debugger is attached. strace is considered a debugger. Arch was thrashing my disks when it kept logging memory dumps due to all the segfaults, hence why the indexing was taking so long, because it was fighting for disk I/O.
My solution for now is to simply run IntelliJ under strace. I will, however, be looking into the issue further, as I don't think java should be segfaulting that much.
edit Intellij[VERSION]/bin/idea.properties,
set idea.max.intellisense.filesize=50
update:
Intellij will skip index files that size larger than 50kb.try this if you have many libraries or many large files(too many characters one line or too many lines)
I had this issue as well with version 2016.2 on Mac OS X. I had to do a force quit to end the application, then I deleted the .idea folder. The next time I launched IntelliJ everything worked fine, it had no problem indexing the project.
I was stuck with a similar issue with the latest IntelliJ Idea 2019.3, so maybe it'll help. For me the issue was with one of the plugins, uninstalling/reinstalling, cleaning caches didn't help. My steps were:
Kill intellij, start it over
When it's starting and about to load a project, be quick and cancel opening the project. This way you'll end up with a small window with a list of previously opened projects and a few menu items.
Open menu > plugins, disable them all
Restart intellij idea, open any project.
If step 4 above succeeds (which happened to me), one by one try enabling the plugins to see which one is causing error. For me it was Kubernetes plugin from JetBrains.
Select Help -> Debug Log Settings...
Add the following line (note the leading # symbol)
#com.intellij.util.indexing:trace
Relaunch the IDE (don't need to invalidate cache as that will cause it to start from scratch, whereas restarting from the point of failure, for me anyway, reported the problem file as soon as I restarted):
Scheduling indexing of file://C:/dev/tools/ruby/lib/ruby/2.2.0/x64-mingw32/win32ole.so by request of index Stubs
Our project doesn't use win32ole so I moved the file to a safe location and restarted my IDE... Bingo, problem gone, indexing finally completed after almost 1 year of effectively using intellij as a slightly-smarter-than-notepad ruby editor.
In my case I found out that Intellij is actually trying to index a 50GB directory with logs that was under the project's root. Make sure that if you have such a directory, it is marked as "Excluded" in the IDE.
You can see which file the IDE is indexing currently in the Indexing Status window (access by clicking on the indexing message in the toolbar). You may need to enlarge this window to see the full path of the file currently being indexed.
In PhpStorm, what solved this for me was excluding folders I didn't need to be indexed from the indexing (specifically the vendor folder, a caches folder, and a few asset folders that contained thousands of images). Instantly it began making progress and completed.
To do this:
in the project directory list, right click the folder you want to exclude
Mark Directory As
Excluded
seems that there might be several reasons for getting into this "indexing" hell. I spent few hours trying to fix it using the ideas above.
At the end of the day, with some profiling work, I found that the bad guy in my case was the csv plugin:
https://plugins.jetbrains.com/plugin/10037-csv-plugin
I had few (not so large) CSV files serving as input, and although I marked them as not to be indexed, the plugin kept trying to index them.
Once I removed the plugin everything worked fine.
Disabling unused plugins will improve the indexing. In my case I have disabled Kotlin plugin from File -> Settings->Plugins
if you check the intellij logs (can be found under C:\Users<User Name>.IntelliJIdea2019.1\system\log ) you will get a pointer what is failing. I was getting an error in Kotlin. After disabling the plugin and restarting Intellij fixed my issue
java.lang.RuntimeException: java.io.EOFException
at com.intellij.util.ExceptionUtilRt.rethrow(ExceptionUtilRt.java:31)
at com.intellij.util.ExceptionUtil.rethrow(ExceptionUtil.java:120)
at com.intellij.openapi.vfs.newvfs.persistent.FSRecords$DbConnection.handleError(FSRecords.java:516)
at com.intellij.openapi.vfs.newvfs.persistent.FSRecords$DbConnection.access$000(FSRecords.java:153)
at com.intellij.openapi.vfs.newvfs.persistent.FSRecords.writeAndHandleErrors(FSRecords.java:965)
at com.intellij.openapi.vfs.newvfs.persistent.FSRecords.access$300(FSRecords.java:47)
at com.intellij.openapi.vfs.newvfs.persistent.FSRecords$AttributeOutputStream.close(FSRecords.java:1629)
at kotlin.io.CloseableKt.closeFinally(Closeable.kt:53)
at org.jetbrains.kotlin.idea.caches.FileAttributeServiceImpl.write(FileAttributeServiceImpl.kt:64)
at org.jetbrains.kotlin.idea.caches.FileAttributeServiceImpl.writeBooleanAttribute(FileAttributeServiceImpl.kt:48)
at org.jetbrains.kotlin.idea.caches.IDEKotlinBinaryClassCache.getKotlinBinaryClass(IDEKotlinBinaryClassCache.kt:67)
at org.jetbrains.kotlin.idea.caches.IDEKotlinBinaryClassCache.getKotlinBinaryClassHeaderData(IDEKotlinBinaryClassCache.kt:8
I had a similar problem with 2019.1.4. However, mine would change directories and sometimes, eventually, finish. If it did finish, it was somewhere in the 8-10 minute range.
I was all over SO, and even JetBrains' forums. I excluded directories via Project Structure | Modules. I used Invalidate Caches And Restart on multiple occasions. I tried having only 1 project open to let it finish. I installed and tried 2019.2.4 and 2019.3.3 (the latter would crash for other reasons). And best of all, it only seemed to happen on one project!
What ultimately led me to an answer was Help > Activity Monitor... where I found psi.impl.cache.impl.todo was running at nearly 100% CPU and not showing signs of stopping.
It turned out, I had a TODO filter setup with a poorly-defined RegEx. It was something like \b.*wip\b.*; the idea was to find all of our "WIP" values. Well, the leading .* was a huge mistake and one that didn't occur to me until losing many hours blaming a plugin upgrade. I believe the reason this was a bad filter was because the project it was hanging on is in ExtJS, which is JavaScript, which means things are in triplicate with the app.js file and whatnot...
Update
In IntelliJ 2020.x and 2021.x, the option has moved to Help > Diagnostic Tools > Activity Monitor.
Had the same issue in the past on some Scala project. I have installed IDEA 16 EAP (https://confluence.jetbrains.com/display/IDEADEV/IDEA+16+EAP) and the problem has gone.
I ran into this problem today on a Mac. It would hang before I was able to get to the menu and invalidate the cache.
I deleted the cache from command line using the following command and it worked for me.
rm -rf ~/Library/Caches/JetBrains/IntelliJIdea*
After that it started up with no issues.
I had the same problem with IntelliJ 2017.3.2. When I clicked on the indexing progress bar I noticed it was hung on a directory within my build directory. When I did a gradlew clean which removed that directory then the indexing was able to proceed.
I have encountered this problem, and resolved it:
remove idea
delete all files and dirs which name regex 'jetbrain' and 'IntelliJ' in my computer(Mac mini)
then install idea
I also try just delete idea cache files, it do not work.
I was using the Elm plugin and installed the elm-bounded-nats package which included a semi-large source file. IntelliJ kept hanging on this file, but did not always report this correctly in the indexing popover dialog (perhaps due to threading). When I exluded this specific file in Settings -> File Types ("Nats.elm") indexing managed to complete successfully. Now the editor renders errors for this package but the compilation process still works.
Invalidate Cache and Restart did not work for me on IntelliJ 2021.3 Ultimate.
I was curious to see if the new Repair IDE feature on 2021.3 Ultimate version works on this issue on my mac.
On startup, IntelliJ froze on indexing
Force quit and relaunched IntelliJ
On Startup, manually "paused" the indexing from the status bar at the bottom
Invalidated cache and restarted
Still froze on indexing
Forced quit and relaunched IntelliJ
Repeated Step #2 on startup
From File Menu, executed Repair IDE, and went through repair steps
FIXED; no longer froze on indexing
Quit IntelliJ and Relaunch
No Index issues
I was also facing freezing issue with intellij 2021.3. Earlier I was using intellij 2021.1 version and that was working fine but since I upgraded intellij version to 2021.3 it started freezing on indexing of files.
Someone in this thread suggested to repair ide using Repair IDE feature. But that didn't worked for me.
So, I went through the thread dumps available in intellij logs folder. After analyzing logs, I found out that calls are blocking on Package Search plugin. So, I disabled that plugin in settings -> plugin. To do that I had to pause indexing at start for time being. After disabling this plugin, it is working fine for me.
This is a known issue and I know disabling it is not a correct fix for it. But I will use it till intellij will release an official fix for this issue.
There might be another project opened parallelly in new window which is being indexed.
It looks like the problem can come from many different sources as other answers point out.
In my case, it was the Subversion plugin that had difficulties to communicate with the server and make the IDE to hang on indexing.
I was able to resolve this problem by removing all of my "target" folders from my project.
I've been having issues with a Java project that I've been working on for a while.
Starting about 1 or 2 weeks ago, whenever I use Netbeans (8.0.2) to generate a new file in the project (right click on package > new file), the wizard will hang for up to 10 minutes before releasing control back to me. The file is created after about 5 minutes. This doesn't happen with any other project, only this one; but I can't find anything different in my project's configuration compared to projects that work.
I created a bug report about this on the Netbeans bug tracker, but it hasn't been looked at in over a week. It has a copy of the Netbeans output log, and a profiling snapshot of the class generation.
I've tried reinstalling Netbeans (remaining at 8.0.2), which didn't help, and I don't really know what else I can do to locate the problem. If anyone has experienced anything like this, or has any advice on how I can track down the issue, it would be greatly appreciated.
Here is a link to my project on Dropbox. Feel free to download a copy, compile it, run it, etc.
I am using Windows 7 64-bit, and I am using the official Netbeans 8.0.2 from netbeans.org, launched straight from the desktop (I am not using any particular command line arguments or enviroment variables, as far as I know)
It turned out that the issue was that my Mercurial client was hanging when it made status calls, and Netbeans, due to a bug, was stuck waiting for it forever.
The issue with Mercurial can be worked around by deleting the Mercurial log file, and the bug with Netbeans was eventually fixed.
I'm getting strange results in my Eclipse WindowBuilder whenever I try to run my GUI, the top left area has glitchy text (I don't really know what else to call this problem). I've tried searching everywhere but apparently no one else is getting this problem.
Problems with the image: Display is being displayed as Displa, 'Search' is scrambled.
Problem image:
I've tried creating a new project, tried reinstalling eclipse, deleting all my eclipse metafiles, redownloading WindowBuilder, I even uninstalled Java JDK and Java from my computer and reinstalled it.
I'm running
Windows 7 Ultimate Service pack 1 64bit.
Java 8 Update 25 (64-bit).
Java SE Development Kit Update 25 (64-bit).
Eclipse IDE for Java Developers
Version: Luna Service Release 1 (4.4.1)
Build id: 20140925-1800
Here is my using WindowBuilder process to give you guys an insight, as I maybe doing something wrong:
Create a new project, creating new application window under WindowBuilder. Go to design, add JTabbedPane in the center, and then add JPanel(s), apply GridBagLayout under all of my tabs and then add regardless of what element I put, the first element is always affected by this glitch and so are the tabs themselves affected.
I've tried supplied all the information I can please ask me if you want to know more to try to help me figure out what is wrong.
My layout of GridBagLayout:
Other notes:
I've also noticed that even after clean and fresh installs sometimes or often whenever I add a new element to my GUI after reopening or anything I get a big error and have to spam "Reparse" button a few times before I can go back to editing.
UPDATE:
I also noticed if I type anything in the text fields it will glitch out and I won't be able to see what I'm typing.
Same problem, got it after I downloaded and installed JavaJDK.
Not sure how to fix it other then just try to resize the window a few times, and you might be able to see what it says. Also I by browser doesn't detect my java install.
EDIT:
I found this:
Swing rendering appears broken in JDK 1.8, correct in JDK 1.7
I did what the best answer said and it worked :) And yes, indeed I have NVIDIA GeForce driver and java 8 installed (that is why).
I am from norway so the text is as well... Just try to click on what I have clicked on :)
http://i.imgur.com/aZeUdCw.png
I never got to updating this question with an answer, the solution was running Eclipse using the Nvidia Graphics card rather than Integrated.
I have recently had a problem with Eclipse. I am developing a java application. It suddenly freezes whenever I try to save a file. Indeed, it happens to some files in my project while it works fine with the others. I have checked the .log file in my workspace and there is no error message! I tried to disconnect my project from GIT, but the problem persisted. It drives me crazy. I have to restart Eclipse many times everyday.
Any solution would be greatly appreciated.
Such kind of issues should provide all related info: OS, Java, Eclipse version, list of plugins installed. Example of file saved. CPU, RAM size, memory setting for Eclipse.
Without knowing those details some recommendation would be to analyze and try to find the cause by comparing:
try on other PC,
with other Java version
other Eclipse version
the same Eclipse version without any additional plugins.
increase Eclipse memory settings
Check if it is build related by disabling automatic build.
Check if there are "Save Action" configured in Preferences.
and so on.
maybe some plugin causes that, but usually people just go with new Eclipse instance instead of comparing different plugins combinations.
See also How can you speed up Eclipse?
Eventually, it's worked. I created a new workspace and import it my project to it. Everything works well since then, like a magic! It seems the problem occurred because my workspace was too old. I have been working on the same workspace since more than 2 years.
Thanks fellows for your time to help.