A number of users have encountered frequent Eclipse crashes since the recent Oracle JVM 6u21 update. The crash cause is listed as follows:
java.lang.OutOfMemoryError: PermGen space
The underlying problem if that in 6u21 (version 1.6.0_21), the vendor was changed from Sun to Oracle. Eclipse launcher reads the JVM vendor and if it detects a Sun JVM, it adds an extra –XX:MaxPermSize setting that is necessary for Eclipse to function. With the vendor change in 6u21, the launcher is no longer adding the necessary parameter on launch.
There is an Eclipse Platform bug open, but so far it doesn't look like there is going to be an attempt to resolve this until Helios SR1 scheduled for September.
Fortunately, there is an easy workaround. Open the eclipse.ini file in an editor. You will see something similar to this:
-startup plugins/org.eclipse.equinox.launcher_1.1.0.v20100307.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100307 -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Xms40m -Xmx384m
This is setting that's not having any effect after 6u21:
Remove it. In it's place, add -XX:MaxPermSize=256m on a new line after the -Xmx setting. Better yet, while you are in there, bump the memory limits to a higher value. Nothing ruins your train of thought better than your IDE crashing with an OutOfMemoryError. Here is a sample eclipse.ini that works on 6u21.
-startup plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503 -showsplash org.eclipse.platform --launcher.defaultAction openFile -vmargs -Xms40m -Xmx1024m -XX:MaxPermSize=512m
IMPORTANT: I do work for Oracle, but this is not an official Oracle statement on this issue. Just some advice from one Eclipse developer to another.
Update: This problem is specific to Windows. On *nix variants, Eclipse launcher uses slower, but more robust logic for detecting JVM type. More information in
Update: Oracle has produced another build of 6u21 JVM that reverts the change that adversely affected Eclipse. If you have reverted back to an older JVM, you can safely move forward to 6u21. The build 1.6.0_21-b07 is safe to use. The version that Eclipse has trouble with is b06. You can check which version you have by running "java -version". More information in Sun Bug 6969236 for those who are interested.
Thanks a lot for the tip!
This is a big thing, since java updates itself automatically and not every eclipse user is a "planet" reader or even aware of such link between eclipse start ups flags and the crash.
Sadly it is pretty consistent that it seems impossible for the core Eclipse.org projects to release quick fixes for serious issues.
But at least those of us who subscribe to the rss feed know what is happening now. So thanks for that.
Thanks for that Info, although I knew that stuff before, because I run into that problem. Oracle should NOT do such changes in a minor release, wondering how they could do something like that: they should backport quickly.
I heard / read that this only impacts on Win-Platforms, is that true? And if yes: why?
@Tiran: a "Quick-Fix" does not help for eclipse 3.3, 3.4, 3.5, ok?
I am not sure who's problem this is. I hope this isn't a communication problem with the Eclipse team and Oracle. You would have thought that a simple (I am assuming a simple change) change such as this would have been communicated between the Eclipse team and Oracle. It's not as if Eclipse is a small IDE. The majority of Java developers have used and continue to use Eclipse at some point. Doesn't Oracle have an Eclipse plugin, Oracle Enterprise Pack for Eclipse, for development. Didn't they notice that Eclipse was crashing? Something's not adding up...
I like to name it Vendorgate ;-)
see Eclipse bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=319514
it's the first issue in this faq:
on my win 7 pro i can't set 512mb
but only 256 mb
But.... did oracle really release a jvm without even try if eclipse runs on windows?!?!?
to be fair i read that on other os eclipse use a slower but more reliable method for identify jvm's vendor....
anyway... give a try before release!!!
Thanks a lot for your tip, too. Me has salvado de muchos Dolores de cabeza
When I used
the loader crashed. (running on XP Pro SP 3)
But I was able to use
Too soon to say whether this fixes the problem
interesting article, you know what to write to interest the reader
Post a Comment