Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346795 - PermGenSpace occurs on working GWT Projects
Summary: PermGenSpace occurs on working GWT Projects
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-21 15:05 EDT by markus mertens CLA
Modified: 2011-05-28 09:34 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description markus mertens CLA 2011-05-21 15:05:40 EDT
Build Identifier: 

During work on a GWT project, repeatable PermGenSpace error dialogs occur causing eclipse to hang for a while and then exit immediately. After a restart the same problem occurs after a few minutes. Error often occurs in association with auto completion being used or when trying to refactor code.




!ENTRY org.eclipse.osgi 4 0 2011-05-21 20:10:31.187
!MESSAGE Shutdown error
!SESSION 2011-05-21 20:10:43.937 -----------------------------------------------
eclipse.buildId=I20100608-0911
java.version=1.7.0-ea
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Command-line arguments:  -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.core.resources 2 10035 2011-05-21 20:10:46.562
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.core.jobs 4 2 2011-05-21 20:15:49.406
!MESSAGE An internal error occurred during: "Periodic workspace save.".
!STACK 0
java.lang.OutOfMemoryError: PermGen space
	at java.lang.ClassLoader.findBootstrapClass(Native Method)
	at java.lang.ClassLoader.findBootstrapClassOrNull(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.util.ResourceBundle$RBClassLoader.loadClass(Unknown Source)
	at java.util.ResourceBundle$Control.newBundle(Unknown Source)
	at java.util.ResourceBundle.loadBundle(Unknown Source)
	at java.util.ResourceBundle.findBundle(Unknown Source)
	at java.util.ResourceBundle.findBundle(Unknown Source)
	at java.util.ResourceBundle.getBundleImpl(Unknown Source)
	at java.util.ResourceBundle.getBundle(Unknown Source)
	at sun.util.resources.LocaleData$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.util.resources.LocaleData.getBundle(Unknown Source)
	at sun.util.resources.LocaleData.getTimeZoneNames(Unknown Source)
	at sun.util.TimeZoneNameUtility.getBundle(Unknown Source)
	at sun.util.TimeZoneNameUtility.retrieveDisplayNames(Unknown Source)
	at java.util.TimeZone.getDisplayNames(Unknown Source)
	at java.util.TimeZone.getDisplayName(Unknown Source)
	at java.util.Date.toString(Unknown Source)
	at java.util.Properties.store0(Unknown Source)
	at java.util.Properties.store(Unknown Source)
	at org.eclipse.core.internal.resources.SaveManager.saveMasterTable(SaveManager.java:1207)
	at org.eclipse.core.internal.resources.SaveManager.saveMasterTable(SaveManager.java:1198)
	at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:1175)
	at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:1087)
	at org.eclipse.core.internal.resources.DelayedSnapshotJob.run(DelayedSnapshotJob.java:44)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Reproducible: Always

Steps to Reproduce:
-
Comment 1 markus mertens CLA 2011-05-21 15:07:08 EDT
I have increased the PermGen in the eclipse ini-File (up to 512MB) but the error still occurrs.
Comment 2 Remy Suen CLA 2011-05-21 21:18:23 EDT
Do your coworkers hit this problem too? Do you get the problem when not working with GWT? Do you get the problem if you use Eclipse with a Java 6 runtime?
Comment 3 Olivier Thomann CLA 2011-05-21 22:11:30 EDT
Moving to Platform/Runtime
Comment 4 markus mertens CLA 2011-05-22 04:03:13 EDT
(In reply to comment #2)
> Do your coworkers hit this problem too? Do you get the problem when not working
> with GWT? Do you get the problem if you use Eclipse with a Java 6 runtime?

This is a private project therefore there are no coworkers. I get the problem as soon as there is an open gwt project in eclipse. If my workspace has no gwt projects, then everything works fine. I already use Java 6 runtime.
Comment 5 Remy Suen CLA 2011-05-22 06:07:05 EDT
(In reply to comment #4)
> I get the problem
> as soon as there is an open gwt project in eclipse.

So once you create one GWT project the error appears?

(In reply to comment #4)
> I already use Java 6 runtime.

(In reply to comment #0)
> java.version=1.7.0-ea
> java.vendor=Sun Microsystems Inc.

That's not what your JRE seems to think it is.
Comment 6 markus mertens CLA 2011-05-22 07:42:59 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > I get the problem
> > as soon as there is an open gwt project in eclipse.
> 
> So once you create one GWT project the error appears?
> 
> (In reply to comment #4)
> > I already use Java 6 runtime.
> 
> (In reply to comment #0)
> > java.version=1.7.0-ea
> > java.vendor=Sun Microsystems Inc.
> 
> That's not what your JRE seems to think it is.

Oops, i have confused with the project settings JDK. I have deinstalled jre 7, now using 6 with eclipse. same error box occurred after a while, but this time as i click it away i am at least able to continue to work. will continue to keep an eye on it.
Comment 7 markus mertens CLA 2011-05-22 07:56:59 EDT
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > I get the problem
> > > as soon as there is an open gwt project in eclipse.
> > 
> > So once you create one GWT project the error appears?
> > 
> > (In reply to comment #4)
> > > I already use Java 6 runtime.
> > 
> > (In reply to comment #0)
> > > java.version=1.7.0-ea
> > > java.vendor=Sun Microsystems Inc.
> > 
> > That's not what your JRE seems to think it is.
> 
> Oops, i have confused with the project settings JDK. I have deinstalled jre 7,
> now using 6 with eclipse. same error box occurred after a while, but this time
> as i click it away i am at least able to continue to work. will continue to
> keep an eye on it.

The crash occurred again.
Comment 8 John Arthorne CLA 2011-05-24 08:59:12 EDT
Does the error always occur in that SaveManager.saveMasterTable code, or is that just a random example?

Is this the GWT SDK you are running?
Comment 9 markus mertens CLA 2011-05-27 11:51:03 EDT
(In reply to comment #8)
> Does the error always occur in that SaveManager.saveMasterTable code, or is
> that just a random example?
> 
> Is this the GWT SDK you are running?

Yes, it is the GWD SDK (v2.2.0).

The error occurs on different code passages. Here is another sample stacktrace:

!ENTRY org.eclipse.ui 4 0 2011-05-23 20:52:19.671
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.OutOfMemoryError: PermGen space)
	at org.eclipse.swt.SWT.error(SWT.java:4083)
	at org.eclipse.swt.SWT.error(SWT.java:3998)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
Caused by: java.lang.OutOfMemoryError: PermGen space
Comment 10 John Arthorne CLA 2011-05-27 16:53:26 EDT
Can you paste the contents of your eclipse.ini file here?
Comment 11 markus mertens CLA 2011-05-28 05:19:57 EDT
Here are the contents of my eclipse.ini.

i have only edited the line with the permsize settings according to http://wiki.eclipse.org/FAQ_How_do_I_increase_the_permgen_size_available_to_Eclipse%3F

-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 -XX:PermSize=256M -XX:MaxPermSize=256M
-Xms128m
-Xmx1024m
Comment 12 Remy Suen CLA 2011-05-28 06:26:06 EDT
(In reply to comment #11)
> -vmargs -XX:PermSize=256M -XX:MaxPermSize=256M

Every option must be on its own line.
Comment 13 John Arthorne CLA 2011-05-28 09:34:25 EDT
(In reply to comment #12)
> (In reply to comment #11)
> > -vmargs -XX:PermSize=256M -XX:MaxPermSize=256M
> 
> Every option must be on its own line.

Yes, this is the problem. You are running with default perm gen settings because only one property per line is read.