2

I am trying to open a workspace in eclipse , as soon as it open the workspace throws below exception:-

!ENTRY org.eclipse.core.resources 2 10035 2012-01-03 20:55:15.212

!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.core.jobs 4 2 2012-01-03 20:55:29.345 !MESSAGE An internal error occurred during: "Requesting Java AST from selection". !STACK 0 java.lang.OutOfMemoryError: Requested array size exceeds VM limit at org.eclipse.jdt.internal.core.index.DiskIndex.readHeaderInfo(DiskIndex.java:787) at org.eclipse.jdt.internal.core.index.DiskIndex.initialize(DiskIndex.java:389) at org.eclipse.jdt.internal.core.index.Index.(Index.java:97) at org.eclipse.jdt.internal.core.search.indexing.IndexManager.getIndex(IndexManager.java:253) at org.eclipse.jdt.internal.core.search.indexing.IndexManager.getInde

I tried to increase the memory , tried to use latest eclipse indigo but it throws the same error. Can somebody help me how should I resolve this error?

Thanks, Manoj

Manoj
  • 271
  • 1
  • 3
  • 6
  • At startup can you specify a different workspace? I'm guessing that you've got some big project that it can't parse. It would be nice to know if you can at least start eclipse clean and then figure out what it is about your project(s) that running it out of resources. – Bob Kuhar Jan 04 '12 at 02:23
  • Actually the workspace is not that large. I am able to open it without any error for last couple of years. But you are correct I am able to open other workspaces without any error. That means my workspace is got corrupted... and you know what I have lost the code changes that I have done yesterday. How this happened given that eclipse saved the workspace before existing. – Manoj Jan 04 '12 at 02:41
  • I've never seen eclipse eat my code. I have had individual projects get dorked, though. Maybe start a new workspace, move all the files over to it that aren't .classpath, .project, or in a .settings directory. In the new workspace recreate the projects one at a time (I think the option is "New Project from Existing Source"). Once you have them all back, check them into github or google code or something without the eclipse dot files. Version control is your friend. Also, Eldar's answer below has merit. – Bob Kuhar Jan 04 '12 at 16:44

2 Answers2

1

How exactly did you increase memory?

Try to play with -Xms and -Xmx that refer to the heap size available for Eclipse. Also sometimes increasing -XX:PermSize and -XX:MaxPermSize (permgen) values helps too.

For example, here are the values from my eclipse.ini (having 8GB total RAM):

...

-vmargs
-XX:MaxPermSize=2048m
-Xms320m
-Xmx3072m

...
Eldar Abusalimov
  • 24,387
  • 4
  • 67
  • 71
0

The ini file won't help for the virtual machine. Set VM arguments instead, as here

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