It's all about the answers!

Ask a question

java.lang.OutOfMemoryError: Java heap space error while starting RTC 4.0.1 client.


Srinivas Sripada (3111) | asked Jun 17 '13, 5:46 p.m.
retagged Jun 18 '13, 9:24 a.m. by Shubjit Naik (1.4k1613)
I have been using RTC 4.0.1 client on my Win7 desktop for a while and this afternoon I had to reboot my machine after installing an important OS upgrade.  Since then RTC client is failing to start.  I see this following stack trace in the log:

!ENTRY org.eclipse.osgi 4 0 2013-06-17 16:05:32.889
!MESSAGE Application error
!STACK 1
java.lang.OutOfMemoryError: Java heap space
    at java.lang.StringBuffer.ensureCapacityImpl(StringBuffer.java:338)
    at java.lang.StringBuffer.append(StringBuffer.java:204)
    at java.io.StringWriter.write(StringWriter.java:123)
    at java.io.PrintWriter.write(PrintWriter.java:467)
    at java.io.PrintWriter.write(PrintWriter.java:484)
    at java.io.PrintWriter.print(PrintWriter.java:614)
    at org.eclipse.ui.XMLMemento$DOMWriter.startTag(XMLMemento.java:679)
    at org.eclipse.ui.XMLMemento$DOMWriter.print(XMLMemento.java:640)
    at org.eclipse.ui.XMLMemento$DOMWriter.print(XMLMemento.java:650)
    at org.eclipse.ui.XMLMemento$DOMWriter.print(XMLMemento.java:650)
    at org.eclipse.ui.XMLMemento.save(XMLMemento.java:605)
    at com.ibm.team.process.rcp.ui.teamnavigator.ConnectedProjectAreaRegistry.saveState(ConnectedProjectAreaRegistry.java:1091)
    at com.ibm.team.process.rcp.ui.teamnavigator.ConnectedProjectAreaRegistry.setStateFromMemento(ConnectedProjectAreaRegistry.java:1373)
    at com.ibm.team.process.rcp.ui.teamnavigator.ConnectedProjectAreaRegistry.restoreStateFromMemento(ConnectedProjectAreaRegistry.java:1427)
    at com.ibm.team.process.rcp.ui.teamnavigator.ConnectedProjectAreaRegistry.init(ConnectedProjectAreaRegistry.java:1182)
    at com.ibm.team.process.rcp.ui.teamnavigator.ConnectedProjectAreaRegistry.<init>(ConnectedProjectAreaRegistry.java:383)
    at com.ibm.team.process.rcp.ui.teamnavigator.ConnectedProjectAreaRegistry.getDefault(ConnectedProjectAreaRegistry.java:398)
    at com.ibm.team.workitem.rcp.ui.internal.ConnectedProjectAreas.getConnectedProjectAreas(ConnectedProjectAreas.java:154)
    at com.ibm.team.workitem.rcp.ui.internal.ConnectedProjectAreas.restoreState(ConnectedProjectAreas.java:184)
    at com.ibm.team.workitem.rcp.ui.internal.ConnectedProjectAreas.restoreState(ConnectedProjectAreas.java:204)
    at com.ibm.team.workitem.rcp.ui.internal.ConnectedProjectAreas.getInstance(ConnectedProjectAreas.java:51)
    at com.ibm.team.workitem.rcp.ui.internal.actions.ProjectAreaSelectionAction.<init>(ProjectAreaSelectionAction.java:83)
    at com.ibm.team.workitem.rcp.ui.internal.quicksearch.QuickSearch$2.<init>(QuickSearch.java:301)
    at com.ibm.team.workitem.rcp.ui.internal.quicksearch.QuickSearch.createQuickSearch(QuickSearch.java:301)
    at com.ibm.team.workitem.rcp.ui.internal.quicksearch.QuickSearch.<init>(QuickSearch.java:258)
    at com.ibm.team.workitem.rcp.ui.internal.quicksearch.SearchBarTrim.fill(SearchBarTrim.java:36)
    at org.eclipse.ui.internal.menus.TrimBarManager2$STrimBuilder.renderTrim(TrimBarManager2.java:447)
    at org.eclipse.ui.internal.menus.TrimBarManager2$STrimBuilder.processAdditions(TrimBarManager2.java:378)
    at org.eclipse.ui.internal.menus.TrimBarManager2$STrimBuilder.build(TrimBarManager2.java:330)
    at org.eclipse.ui.internal.menus.TrimBarManager2.update(TrimBarManager2.java:109)
    at org.eclipse.ui.internal.WorkbenchWindow.updateLayoutDataForContents(WorkbenchWindow.java:3872)
    at org.eclipse.ui.internal.WorkbenchWindow.setLayoutDataForContents(WorkbenchWindow.java:3885)
    at org.eclipse.ui.internal.WorkbenchWindow.createDefaultContents(WorkbenchWindow.java:1157)
    at org.eclipse.ui.internal.WorkbenchWindowConfigurer.createDefaultContents(WorkbenchWindowConfigurer.java:623)
    at org.eclipse.ui.application.WorkbenchWindowAdvisor.createWindowContents(WorkbenchWindowAdvisor.java:300)
    at org.eclipse.ui.internal.WorkbenchWindow.createContents(WorkbenchWindow.java:1043)
    at org.eclipse.jface.window.Window.create(Window.java:431)
    at org.eclipse.ui.internal.Workbench$68.runWithException(Workbench.java:3664)
    at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
    at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
    at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1600)
    at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2609)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    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:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:613)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

!ENTRY org.eclipse.core.jobs 2 2 2013-06-17 16:05:42.451
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.ide.IDEWorkbenchActivityHelper$4

I tried to increase heap memory size in eclipse.ini to upto 1600 but that did not help.  Also tried increasing --launcher.XXMaxPermSize to 512mb but that did not help either.

eclipsec.exe threw this information in the command window:

 progressRectString:  2,444,644,12
 messageRectString: 12,398,444,15
JVMDUMP039I Processing dump event "systhrow", detail "java/lang/OutOfMemoryError " at 2013/06/17 17:41:07 - please wait.
JVMDUMP032I JVM requested System dump using 'C:\Program Files (x86)\RTC\rtc401_eclipse381\eclipse\core.20130617.174107.3148.0001.dmp' in response to an event
JVMDUMP010I System dump written to C:\Program Files (x86)\RTC\rtc401_eclipse381\eclipse\core.20130617.174107.3148.0001.dmp
JVMDUMP032I JVM requested Heap dump using 'C:\Program Files (x86)\RTC\rtc401_eclipse381\eclipse\heapdump.20130617.174107.3148.0002.phd' in response to an event
JVMDUMP010I Heap dump written to C:\Program Files (x86)\RTC\rtc401_eclipse381\eclipse\heapdump.20130617.174107.3148.0002.phd
JVMDUMP032I JVM requested Java dump using 'C:\Program Files (x86)\RTC\rtc401_eclipse381\eclipse\javacore.20130617.174107.3148.0003.txt' in response to an event
JVMDUMP010I Java dump written to C:\Program Files (x86)\RTC\rtc401_eclipse381\eclipse\javacore.20130617.174107.3148.0003.txt
JVMDUMP032I JVM requested Snap dump using 'C:\Program Files (x86)\RTC\rtc401_eclipse381\eclipse\Snap.20130617.174107.3148.0004.trc' in response to an event
JVMDUMP010I Snap dump written to C:\Program Files (x86)\RTC\rtc401_eclipse381\eclipse\Snap.20130617.174107.3148.0004.trc
JVMDUMP013I Processed dump event "systhrow", detail "java/lang/OutOfMemoryError"
.
Job found still running after platform shutdown.  Jobs should be canceled by the  plugin that scheduled them during shutdown: org.eclipse.ui.internal.ide.IDEWork benchActivityHelper$4

I appreciate if someone can tell me how to fix this issue.

-Srinivas.



Comments
Josh Crawford commented Jun 17 '13, 6:10 p.m.

How much native memory is available on the OS? Also could you paste the content of:
C:\Program Files (x86)\RTC\rtc401_eclipse381\eclipse\javacore.20130617.174107.3148.0003.txt


Srinivas Sripada commented Jun 17 '13, 6:24 p.m.

About 2.5 GB free memory at the crash time.  Content of that file is too large to paste here .. I am going to send that to you in email.




Accepted answer


permanent link
Abraham Sweiss (2.4k1031) | answered Jun 18 '13, 9:22 a.m.
Hello Srinivas,

Since this issue occurred after applying a MS fix, i suspect that some additional services were added or as MS has done in the past with O/S upgrades, set some services to the started state  which is taking up valuable realistate in RAM...or possibly corrupted RTC or its work space.

I would suggest the following:
1. Check the services and stop any that are not needed.  If this does not resovle then  
2. Start the client and point to a new workspace.  IF this does not resolve then  
3. Install a new instance and the client and point to a new work space.  If this does not resolve then
4. Back out the MS fix

If the above 4 steps do not resolve the  issue, then open a service request with IBM.
Srinivas Sripada selected this answer as the correct answer

Comments
Srinivas Sripada commented Jun 18 '13, 9:36 a.m.

Hi Abraham,

Yes, it worked just when I tried to load a different workspace.  You are correct in saying that my workspace got somehow corrupted after the OS upgrade.

thanks much for the help.
Srinivas.

2 other answers



permanent link
Krzysztof Kaźmierczyk (7.4k34694) | answered Jun 18 '13, 2:44 a.m.
Hello Srinivas,
You need to analyze heap dump to see which objects use the most memory. If you really want to do it on your own, you will find more information here: http://wiki.eclipse.org/index.php/MemoryAnalyzer and http://eclipse.org/mat/
You can also create new PMR for the support and send dmp phd trc and javacore files generated in C:\Program Files (x86)\RTC\rtc401_eclipse381\eclipse\

permanent link
Shubjit Naik (1.4k1613) | answered Jun 18 '13, 9:22 a.m.
Hi Srinivas

Found similar errors with Eclipse, the following link might help
http://www.metod.si/job-found-still-running-after-platform-shutdown-eclipse/

Move/backup, .snap under workspace/.metadata/.plugins/org.eclipse.core.resources/

Comments
1
Srinivas Sripada commented Jun 18 '13, 9:34 a.m.

Hi Shubjit

I tried that but that did not help.  I don't even find .snap file under that resources folder.  Thanks much for the pointer.

Your answer


Register or to post your answer.