2

I've been using Eclipse - 3.52 Galileo - for Android work. That's the version my project group is using so I don't have the option of using a different one. My PC in XP Pro, SP3.

Mostly it works fine but it crashes several times a day - maybe 3 crashes in a 10 hour workday. Usually the crashes happen in the middle of something mundane like editing files and Eclipse either freezes or just disappears, along with the eclipse.exe process.

I also get random errors in the error log but they happen regardless of whether there are any crashes! These are just a couple of examples but I get maybe 1 or 2 an hour regardless of crashes . . .

Exception launching the Eclipse Platform:

java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.core.runtime.internal.adaptor.EclipseAdaptorMsg at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:202) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at . . .

...N.B. Eclipse seemed to launch OK despite that error!

Error Wed Nov 24 23:04:26 EST 2010 Unhandled event loop exception

java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) . . .

I get that error a lot. I don't seem to be out of memory - Task Manager says I'm using about 900M on a 2G PC.

I've reinstalled Eclipse once with no improvement. I run dozens of other apps on my PC including Visual Studio, Photoshop, various video and audio editors, etc, and none of them crash or freeze.

Any suggestions? Thanks in advance!

Peter Nelson
  • 5,917
  • 17
  • 43
  • 62
  • First try this eclipse.ini file: http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse/3275659#3275659 – VonC Nov 25 '10 at 13:37
  • I've been away on vacation but now I'll try this and if it goes a solid day without crashing I'll close this as answered. Thanks. – Peter Nelson Nov 30 '10 at 00:32
  • OK, I looked at the eclipse.ini file in that link - it's for 3.6 and has lots of differences with the eclipse.ini file for my 3.52 Eclipse but I did notice that they boosted the MaxPermSize to 384M so I did that. Alas, no improvement - it crashed again a minute ago. On bootup it said The workspace exited with unsaved changes in the previous session; followed by ... An internal error has occurred. java.lang.OutOfMemoryError: PermGen space – Peter Nelson Nov 30 '10 at 19:41

2 Answers2

2

I hate to answer my own question but someone might be looking for an answer in a search and I've got one now.

I was using Java 6u21 and it turns out there's an incompatibility with that and Eclipse that results in out-of-permgen-memory errors. According to one Eclipse website "According to one explanation, "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"

I upgraded to 6u22 and the problems vanished.

Peter Nelson
  • 5,917
  • 17
  • 43
  • 62
0

you should set enough memory in eclipse.ini file and if you use virtual machine, set enough memory in VM parameters as here

Community
  • 1
  • 1
Gangnus
  • 24,044
  • 16
  • 90
  • 149