Eclipse Freezes Constantly - eclipse

I've heard rumors about "Eclipse's minute of silence", but I had no idea how bad it is.
I've installed a brand new Eclipse (from a ZIP package) and only installed the JBoss tools. Now Eclipse freezes at close to each key shortcut, but at least once every 30 seconds. Ctrl+C? One minute Freeze. Doesn't copy. Ctrl+D? One minute freeze. Also, doesn't delete any lines. Clicking into an editor? One minute freeze. It also takes everything with it, so e.g. my browser won't work while Eclipse freezes.
It is not possible to work like this. At all. My colleagues just went back to Eclipse 2018-09, but I need Java11, so I can't.
I could not find any bugs for this issue (a lot of bugs for Eclipse freezing, but none that should still be present in 2018-12).
Anyone else experienced something like that? It's our entire office, so it's not just one faulty computer. Could it have something to do with how Eclipse scatters its config files over the hard drive? Maybe it can't read the 2018-09 config files or something?

If you use the Project Explorer, this could be caused by bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=536918 which is already fixed for Eclipse 4.11 (and will be released as Eclipse 2019-03 in March)
You can use an integration build from http://download.eclipse.org/eclipse/downloads/
As workaround, it might also help to to close the Project Explorer View (in all perspectives) and use the Package Explorer instead.
As others have written, it might also be a memory issue. Open the Eclipse Preferences and
in the General section enable Show heap status so you can see it at the bottom of the window.
If this is the problem, edit eclipse.ini and increase the memory settings (open eclipse.ini and increase the number of the line with -Xmx. If you have a mac, right-click on the Eclipse Application, choose Package Contents, find it at Contents/Eclipse/eclipse.ini)

I was facing this "lagging"/"freezing" issue in Eclipse 2018-12 until I did this.
in eclipse.ini
-Xms256m
-Xmx4096m
Of course it has not stopped "freezing" completely, but The number of times has been tremendously dropped.

Related

Microsoft scr***ed my Eclipse preferences: how to recover?

I have not typical issue: namely I installed VisualStudio Community edition from official Microsoft page and this s**t totally damaged my laptop (it first changed some system settings without my consent, later computer got not responsive at all)my laptop - I was forced to reset OS to factory settings (Windows 8.1 64b) as no other repair attempts worked - thank you, friends from Redmond! One of weirdest things is that this software changed my Eclipse preferences and the problem still persists: background in Eclipse is not dark but black and code is very hard to read. When I go to Window->Preferences->General and change it to default, then theme gets changed only for the file that is currently open(?).After restart of Eclipse the black motive is back. Moreover, when I click any line, it gets highlighted in black - as if there was an additional display pattern deeper 'under the skin'.I know that a screenshot would be more informative but I don't think it can be attached here.
What may shed some light on the issue is that, when I go in Eclipse to Window->Preferences->Appearance I am presented with following themes to choose from:
%theme.dark, %theme.classic etc. No idea what the % sign mean.
How can I get normal default theme permamently? - perhaps it would suffice to delete some preferences file but I am no very adept in the Eclipse staff and not sure what can be safely removed -just don't want to spoil it more than it already is. I am using Eclipse Mars,located in C:\Users\myUsername\java-mars\eclipse, if this matters.
Eclipse is my main working tool for next couple of weeks before I move to IntelliJ and the issue is really onerous for me. Anyone could help, please??
I can't imagine how Visual Studio could break eclipse, maybe some path conflict, but VS has no idea where your eclipse is. Maybe opening the same project in the workspaces with both and there were some overwrites? IDK.
Eclipse has no dependencies other than JAVA_HOME (or finding java on the path).
That said, workspace settings are stored in /.metadata folder. You can safely blow this away. Depending on how you have your projects organized, you may need to reimport your projects (I am assuming you are using a code repo) so this shouldn't be a problem.
If that doesn't work, blow away the java-mars/ folder tree and unzip a clean version. NOTE: If you do this and open the existing (broken) workspace you will pick up the existing (broken) settings.

Eclipse hangs on reverting resources

I use eclipse Indigo, subclipse 1.10.x and javaNL. Whenever I try to refresh my project in eclipse, it gets stuck at Reverting Resources 0% and Computing Update Requirements 0%. I try to kill eclipse and reopen the project and it still does the same. I do not understand why this happens. It started happening recently. Before it was working fine.
Question: I do not understand why this happens
General Answer: http://www.ihateeclipse.com/
(I may share this opinions and dont think Eclipse should be called a IDE but that wont fix your problem - hence lets proceed with possible workarounds).
Possible Workarounds:
1.) Starting eclipse in clean mode How to run eclipse in clean mode? and what happens if we do so?. (This solved aprox. 80% of my continuously returning 'I messed up my own state' issues I experienced).
2.) If that doesnt help - you would have to stop eclipse, identify the according files (or just any files holding such information) and delete them manually, then restart eclipse. Like I still encounter issues with my "Search Type" (Ctrl+T) and have to delete the files like described here Eclipse type hierarchy not always working (unfortunately I don't know anything about files regarding your current issue - so feel free to downvote my "answer" since its not directly answering your question).
The best things I found about "the full reset" seem to be: http://letsgetdugg.com/2009/04/19/recovering-a-corrupt-eclipse-workspace/ or http://blog.pdark.de/2011/09/02/restoring-a-corrupted-workspace-in-eclipse/ (Note: I haven't verified the described behaviors).
3.) Recreate Workspace - delete any eclipse belongings like the .metadata folder and keep only belongings of your project (e.g. sources, resources etc.). Then create a new eclipse project based on you existing project sources).
4.) If Steps 1-3 failed consider reinstalling Eclipse (include above Step 3 in this process again) or switching to a proper IDE that can at least handle its own state.
5.) I experienced rare cases where in the end such things were triggered by me rather than occurred magically out of nowhere by eclipse - I don't see any possibility on how you could manage that in your case unless you messed around with the eclipse source itself).
Hope this helps - Even thus the SO community is big I experienced way better results asking the eclipse developer community directly when it came to such specific issues (you however oftenly get a link to a open Bug ... that they created because of your question) and ended up "just importing into a new eclipse workspace from existing sources" whenever I experienced such issues lately (It takes me about 5 minutes to checkout our sources, start Eclipse with -clean as default and import existing Maven projects solving any eclipse-only issue - while each of those eclipse-issues can take days to be solved without any further advantage for my daily business)
I don't know if this will help any one but I had the same issue. Some links advised me to delete my metadata, which I did not want to do.
What fixed it for me was:
I have multiple eclipse workspaces, I manually closed my eclipse using the System Monitor/Taskbar as it wouldn't let me close as it was hanging.
I switched workspaces and it seems to run fine. So I switched back to the one that was hanging and the problem seemed to have gone.
This worked for me:
Go to to your workspace instalation, and manually delete the target directory under your maven projects (dont worry , maven will create another one when compiling). This removed my stuck Eclipse state (thread) in "Revert sources", always at 0%.
this helped me:
delete files "*.snap" under org.eclipse.core.resources in
worskpace/.metadata/.plugins/org.eclipse.core.resources/
and share project again (setup SVN settings)
I accidentally checked in target files to SVN. And the target files were huge ans hence it was stuck on reverting resources. Once I deleted those target files from SVN this issue never happened.But JBA's answer is pretty comprehensive so I will mark that as a right answer.
I have this same issue, and I just quickly cancel the "Rerverting Resources" task while it's in "waiting" mode when restart Eclipse.
This should work to 100% and helped in my case (no other tried solution worked):
Go to "Eclipse > Help > About Eclipse IDE > Installation Details
Uninstall the following packages "Subclipse", "Subclipse Integration for Mylyn", "Subversion 1.14 JavaHL", "Subversion Revision Graph", "SVN Client Adapter".
pluginsToUninstall
Go to the marketplace and install "subclipse" again.
Rightclick on your project > Team > Refresh/Cleanup
You are welcome. :)

Eclipse slow text file opening

I have had this before and after switching computers and a long time of happy developing, I'm having it again: Eclipse taking extremely long to open simple text files.
What's happening, what's changed is:
Tomcat now requires frequent restarts / reloads even changing Javascript files
text files take at least 30 seconds to open
My environment is:
Mac OS Maverick
STS 3.4.0
Sysdeo Tomcat
Maven project nature
AspectJ capability
Android development tools
Gradle IDE
I realize that reinstalling Eclipse/STS would be an option, but in stead of taken half a day to get it just right again, I would prefer to just fix the problem. Any ideas?
Is there any way to trace where eclipse is spending its time, some kind of high level debug output?
Well, after removing *.js from the file associations, the problem seemed to go away. After that I readded it again and everything was good again. Thanks #Cristophe for pointing me in the right direction

Eclipse Performance Maintenance

Is there a cache or something that needs be cleared periodically?
Eclipse has been running pretty badly lately, especially with regards to open files and switching between them in the editor.
Frustrated and confused.
There is nothing that you as a user need to run periodically to keep Eclipse performing. I would guess that you are seeing performance problems due to Eclipse process hitting its allowed memory ceiling. Take a look at your eclipse.ini file and update the -Xmx setting. Don't crank it up too high as that can keep your Eclipse from starting.
You can delete old configurations. This might speed up start-up time, but I'm not sure. Ignore the revert highlight on the image. What you need is the delete button that appears in later versions of Eclipse next to it. Delete everything but the current installation configuration.
To access, go to Help > About Eclipse SDK > [Installation Details] > Installation History.
Also, make sure you have projects other than the one you're working on closed. Doing this reduces the size of the in-memory Eclipse workspace model.
Also make sure projects that you are running are shutting down correctly (or manually terminate them). I have found times that a project I was testing did not end after an error and I had 10 instances of it running in Eclipse, I had to select the console and manually end it. (Closing and opening Eclipse also frees things like this up).
You can give more memory to it , modifying eclipse.ini file. For example:
-vmargs
-Xms384m
-Xmx768m
default ones 256-512m.
Look here for optimal JVM settings when running eclipse
Sometimes if you've had the workspace for a very long time eclipse would run slower, delete the old workspace and then create a new one, importing the project into it again (Make sure to check in or backup your code first).
I wouldn't really recommend tampering with the eclipse JRE runtime parameters. But if you are at liberty to update eclipse, I would recommend you update it to the latest version.
I've added some tips that could help improve the performance of eclipse in an answer to a question.

In Eclipse, why does "Build Automatically" get mysteriously disabled?

I'm running Eclipse Europa (3.3). I leave the "Build Automatically" setting, under the Project menu, on all the time. Once in awhile my code isn't compiling, and I puzzle over it and then pull down the Project menu ... lo and behold, it's not set anymore. What gives? Is this a bug, or is there something else I'm doing that could cause it?
Edit: I am running the regular Java developer installation, plus Subversive and its connectors, Jetty Launcher, and I believe no other plugins. Other people at my workplace have had the same problem.
Edit: I am still having this problem once in a blue moon, only now I'm using Eclipse Galileo (3.5) for Windows. I haven't had this problem in Galileo for OS X, neither in Cocoa nor Carbon, but I have not used that for as long.
With Eclipise Mars.1 (4.5.1), Oomph may be the culprit. Eclipse Oomph supports automatically disabling Build Automatically with entries in
On Windows
%USERPROFILE%\.eclipse\org.eclipse.oomph.setup\setups\user.setup
If you want to disable this Oomph behavior try deleting the following setting
"Eclipse->Navigate Menu-> Open Setup menu entry-> Open User menu entry", a Preference Task under "User Preferences -> org.eclipse.core.resources -> description.autobuilding"
I learned about this setting by posting to the Oomph Eclipse Community Forum on Feb 8th, 2016. I posted a question titled "Oomph Defect? Build Automatically Keeps Getting Disabled". Ed Marks replied the same day with details about Oomph's support for managing the Eclipse "Build Automatically" setting.
https://www.eclipse.org/forums/index.php/m/1722751/#msg_1722751
I don't have eclipse right here to test and make sure but here is an idea.
Is any of the project or even workspace file in SVN ? if they are and they were uploaded with auto build disabled that might explain it
You update and overwrite your settings. This doesn't become apparent until you restart eclipse. this would also explain why other people at your workplace experienc this. it would even explain why some don't : thay are the ones who are careful what they update and don't allow eclipse to overwrite their own settings plus the ones who actually prefer to have autobuild disabled :)
I had the same problem and when I looked at the Source tab under Java Build Path (under the menu Project > Properties ) there were some source directories that didn't exist anymore (marked with a red X). After I deleted them, compilation worked fine and all new .class files are under the bin folder.
Strange. Is there perhaps a plugin installed that turns this off without your knowledge?
Maybe there is some conflicting shortcut. For example, some duplicated shortcut may be toggling it.
I am running 3.4 and I also have this mysterious behavior. I had it in 3.3 as well. I use CVS not SVN. Does not seem to follow a pattern just once in a while it gets switched off and then weird confusing stuff happens until I remember to check it and switch it back on. I am almost to the point where I want to write a plugin to always turn it on when eclipse loads.
When installing Google Plugin for Eclipse, 'Google App Engine for Android' is also installed.
For me, I uninstalled 'Google App Engine for Android', which I didn't need, and solved this problem.