hanging eclipse problems - eclipse

I'm having some weird problems with Eclipse lately. I haven't installed any new plugins that I think could have caused them (xcarecrows and m2eclipse, both already removed).
The problem is that Eclipse sometimes hangs on random things. Sometimes simply by opening it, sometimes clicking anywhere on the GUI while it's loading something, sometimes while pasting code (Java). But the biggest problem is that it doesn't unfrezze.
AFAIK the problem started when I experimented with settings in eclipse.ini, but I can't be sure because it was some time ago and it hasn't happened all that often.
I don't know how to find out what could be causing this so I'm asking here, maybe someone can suggest some diagnostics.
Also, here's my eclipse.ini, maybe there's something wrong in it:
-showlocation
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vm
C:/Program Files/Java/jdk1.6.0_22/jre/bin/server/jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms128m
-Xmx384m
-Xss4m
-XX:PermSize=128m
-XX:MaxPermSize=384m
-XX:CompileThreshold=5
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+CMSIncrementalPacing
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:+UseFastAccessorMethods

The canonical reference for this kind of issues is How to report a deadlock in Eclipse.
You will need to aquire the thread dumps of all threads. Perhaps it will give you insight of a bad plugin, or perhaps Eclipse itself.
If you suspect this is memory-related, you should read Getting a heap dump and analyse the resulting file in the Eclipse Memory Analyzer

Related

Want to not index certain directories in eclipse

Having a devil of a time trying to get eclipse c++ ide (on windows 7) working properly.
Using it to manage a large codebase, not building. Want to be able to click-navigate around the code like one does in visual studio.
The indexer keeps crashing with a java heap space error. I've increased the heap space in the eclipse.ini file (shown below) which helped only very slightly. It takes literally HOURS to just get halfway through indexing the behemoth known as boost and then crashes... hasn't even touched the real codebase yet.
I would like the indexer to skip boost and just get on with managing the rest of the code, but not sure how to do that. Tried a resource filter but that just kicked boost out of the project, which I don't think I want to do.
So, is there a way to have the eclipse indexer simply ignore certain folders, and second, is there a way to speed this up?
My eclipse.ini:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.cpp.product
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
1024m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms512m
-Xmx7168m

Eclipse keep closing suddenly

Recently I have lots of problems with eclipse, it keeps on crashing, closing abruptly, don't work well at all.
It happens too much, like in every 10 -15 minutes.
The CPU and RAM are 50% free when this happens.
This is the eclipse.ini file:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
--launcher.defaultAction
openFile
-vmargs
-Xms40m
-Xmx512m
What is the problem ? It's really bothering!
add the line
-XX:-UseCompressedOops
to eclipse.ini
but if you are using this windows 7 then rather add
-XX:+UseCompressedOops
Even try running ecipse as administrator. If this even works then try opening with java.exe instead of javaw.exe. I hope this will work!
open eclipse.ini or eclipse configuration file and add below command as first line
-clean
now save and try to open eclipse.
this worked for me.
Have a nice time.
Create a new Workspace.
Import your stuffs into it.
That worked for me.
First before you do ANYTHING check the log: Look at the workspace/.metadata/.log file. In my case it was just some error with a subversion update using subclipse.
Navigate to a hidden directory in your Eclipse Workspace named .metadata, delete it, and start eclipse. Files in the .metadata directory seem to cause recurrent problems once Eclipse begins to crash.
On eclipse neon.
On a specific project.
Last thing some days ago was install lombok.
For some days everythig was ok.
From yestarday same problem, eclipse crash after some seconds, after open.
Removed from eclipse.ini this line.
-javaagent:D:\eclipse-neon\lombok.jar
Now eclipse restarted to work

Eclipse doesn't open in Ubuntu after I updated Java plugin for Firefox

Recently I was facing problem in attending webex meeting with Firefox browser, so I visited Java documentation for updating Java plugin for Firefox at http://www.java.com/en/download/help/firefox_java.xml.
I did what was explained in there I got it working.
But after a couple of days when I tried starting my Eclipse, it didn't start. I got a small window like this --
I tried searching about it & understood, its related to $PATH but I don't know how to fix it as I don't have access to the GUI of Eclipse, so can't change the path. There must be some other way to do it.. I don't have expertise with IDE, so I need help on this..
Edited:
I visited the linked question & found I can solve it by editing eclipse.ini file. I did open it for edit and added the path, now it looks like --
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.dist
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
/usr/lib/jvm/java-7-openjdk-amd64/java
-vmargs
-Xms40m
-Xmx384m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
You can see my added two lines just after 'openfile', which is --
-vm
/usr/lib/jvm/java-7-openjdk-amd64/java
I restarted the system & tried opening the eclipse, but same window comes.

Upgrading Eclipse for Android - Having Problems

I updated the Android Software to the latest and greatest, and it told me I need to update Eclipse to Helios or newer. So, I upgraded to Indigo, and now I'm getting the following message on startup of eclipse and can't move ahead with upgrading and getting back to work...
(source: pelepublications.com)
I'm concerned about moving the eclipse to a different folder b/c I don't know much about eclipse prefs and if it'll cause me problems (a need to update prefs that assume the default location) and if it needs to be in the Java/IDE folder. (I also suspect that shouldn't be the problem.)
I tried creating a batch file with the following content to pass in the argument they recommend, and it doesn't change the error.
"C:\Program Files\Java\IDE\eclipse\eclipse.exe" -vmargs -Dosgi.locking=none
I also tried to change the eclipse.ini folder which now has the following contents - note the last line (this didn't help either)
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms40m
-Xmx384m
-Dosgi.locking=none
Does anyone know what I'm doing wrong / how I can fix this problem? I need to get back to work...
I'm running eclipse on Windows 7
Thanks in advance!
I think Windows 7 does not allow applications to write to the Program Files folder unless you run as administrator; I believe that's why you're seeing this message - Eclipse can't create a lock file where you have it installed.
Eclipse doesn't care where it is "installed" (really it's just unzipped); it does not put things in your windows registry or anything like that, so you can move it around at will. Your workspace(s) and projects are where the important stuff is stored.

Eclipse crashes when opening the Run menu (trying to run)

i'm using RHEL linux to run Helios Eclipse 3.6, and just recently, whenever i try to right click on a project and mouse over to "Run As", eclipse freezes itself and the whole OS. Mousing over to anywhere else is fine, like 'close project' or 'build configurations'... Basically, eclipse works fine for everything except running a project. If i do CTRL+F11, it also freezes because it's trying to open the "Run As" screen.
here's what i have in my eclipse.ini file:
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.2.R36x_v20101019_1345
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dorg.eclipse.swt.browser.XULRunnerPath=''
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=1024m
-Xms128m
-Xmx512m
The only things that i recall having changed recently was setting the stack size to be higher, -Xss500m or something... but i remember taking out that line before i consistently see these eclipse freeze. (not sure if this is relevant, but one time, also recently, i set asize something ridiculous like 9 terabytes of data in a thread that i ran off of an android project on eclipse. later i get the eclipse freeze and i had to do a manual force shutdown).
Try a new Eclipse workspace (File / Switch Workspace). If that works, there is maybe a very large cache or something stored within the old workspace metadata. How large is your .metadata directory? If more than 1 GB, for example, look for any excessively large directories, and any cache files that can at least be temporarily moved elsewhere to see if that improves things.
I'd also try the usual of upgrading to the latest version of Eclipse, as well as the JDK you're using to run it with.