Community
Participate
Working Groups
When I self host and a build is requuired I frequently get the following error: Exception in thread "Java indexing" java.lang.OutOfMemoryError: Java heap space STEPS 1) Load platform-ui and platform-ui-tests module from HEAD 2) Self host 3) In the self hosted workspace select Import-Existing Plug-ins 4) Select source 5) Select ide and workbench 6) Hit finish 7) The wizard will finish and a build will kick off. At this point the build will fail. Note that I am not running with the -XmX option when this happens. I am trying now with -XmX1024M and have not seen it again
Did you change the -Xmx value in your eclipse.ini file or use the default one?
By default the memory is 64M, so no surprise this would fail. -XmX1024M seems a bit too much. Do you really need that much memory to complete the build ?
(In reply to comment #2) > By default the memory is 64M, so no surprise this would fail. -XmX1024M seems a > bit too much. Do you really need that much memory to complete the build ? > Olivier, since bug 166223 was fixed, the launched configuration should use the same -Xmx value than the eclipse default one. That's why I asked Tod whether he changed this value or not. If not, the value is 256M and we should not fail with OOME while indexing. Note that following comment 0, I didn't get the exception. So, either Tod modified the eclipse default value or I missed something while executing the scenario.
In comment 0 I said "Note that I am not running with the -XmX option when this happens. I am trying now with -XmX1024M and have not seen it again" And I have not seen it with a large -XmX value. But the 256M default was chosen as it should be suffecient for something as small as help hosting the SDK (my SDK has a heap in the 40M range normally).
(In reply to comment #4) > In comment 0 I said > > "Note that I am not running with the -XmX option when this happens. I am trying > now with -XmX1024M and have not seen it again" > I saw this line, but for me that means that you didn't set any -Xmx option on your command line while starting an eclipse session. However, you can also change the Java Heap Size of your Eclipse session by changing the value in the eclipse.ini file. As I cannot reproduce the exception, I was asking the question to be 100% sure that your Java Heap Size was the default one (e.g. 256M) > And I have not seen it with a large -XmX value. But the 256M default was chosen > as it should be suffecient for something as small as help hosting the SDK (my > SDK has a heap in the 40M range normally). > It definitely should be enough and as I said, I cannot get the exception when I follow your scenario. So, please first double-check your eclipse.ini file to see if the default is really 256M and second be more precise on the steps of your scenario: - what are the exact list of projects you have loaded in your workspace (platform-ui and platform-ui-tests are not projects in the repository)? - what are the exact list of plugins you import in your self-hosted wksp: "ide and workbench" mean only org.eclipse.ui.ide and org.eclipse.ui.workbench or other ones?
I do this without any changes to what is downloaded. Here is what is in the default eclipse.ini that I get from the download -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m -vmargs -Xms40m -Xmx256m With a fresh 20071107-1300 install and the steps below I get Exception in thread "Java indexing" java.lang.OutOfMemoryError: Java heap space at org.eclipse.jdt.internal.compiler.util.HashtableOfObject.<init>(HashtableOfObject.java:39) at org.eclipse.jdt.internal.compiler.util.HashtableOfObject.rehash(HashtableOfObject.java:139) at org.eclipse.jdt.internal.compiler.util.HashtableOfObject.put(HashtableOfObject.java:112) at org.eclipse.jdt.internal.core.index.DiskIndex.copyQueryResults(DiskIndex.java:349) at org.eclipse.jdt.internal.core.index.DiskIndex.mergeWith(DiskIndex.java:522) at org.eclipse.jdt.internal.core.index.Index.save(Index.java:181) at org.eclipse.jdt.internal.core.search.indexing.IndexManager.saveIndex(IndexManager.java:583) at org.eclipse.jdt.internal.core.search.indexing.AddJarFileToIndex.execute(AddJarFileToIndex.java:205) at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:395) at java.lang.Thread.run(Thread.java:619) this pretty much happens every time I self host now so it is easy to reproduce.
OK, I got it now, after having discovered what "modules" means ;-)
OK, this is finally a duplicate of bug 166223. I didn't realize at that time, but user still needs to set -Xmx value in the VM arguments of the launch configuration. Bug 166223 fix was only for newly created launch config and only if the corresponding preference is set: see bug 166223 comment 18 for more details... So, the conclusion is that you need to set the -Xmx VM argument in your launch config. I tried with -Xmx128M and never got the OOME again :-) *** This bug has been marked as a duplicate of bug 166223 ***
Moving to PDE/UI