| Eclipse-CDT startup error "Java heap space" [message #872041] |
Tue, 15 May 2012 07:07  |
Nicholas Lee Messages: 5 Registered: May 2012 |
Junior Member |
|
|
I have freshly installed Ubuntu 12.04 LTS on a PC with 6GB of RAM.
I then installed Eclipse Indigo and then the CDT addon.
When I start the Eclipse-CDT IDE it immediately crashes with the following message:
'Project Explorer' has encountered a problem
An internal error has occured
Java heap space
Here is the log...
java.lang.OutOfMemoryError: Java heap space
at org.eclipse.ui.part.ResourceTransfer.nativeToJava(ResourceTransfer.java:162)
at org.eclipse.swt.dnd.Clipboard.getContents(Clipboard.java:323)
at org.eclipse.swt.dnd.Clipboard.getContents(Clipboard.java:241)
at org.eclipse.cdt.internal.ui.cview.PasteAction$1.run(PasteAction.java:174)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4330)
at org.eclipse.cdt.internal.ui.cview.PasteAction.updateSelection(PasteAction.java:170)
at org.eclipse.ui.actions.BaseSelectionListenerAction.selectionChangedBaseSelectionListenerAction.java:124)
at org.eclipse.cdt.internal.ui.cview.RefactorActionGroup.updateActionBarsRefactorActionGroup.java:149)
at org.eclipse.cdt.internal.ui.cview.MainActionGroup.updateActionBarsMainActionGroup.java:313)
at org.eclipse.cdt.internal.ui.cview.CView.updateActionBars(CView.java:779)
at org.eclipse.cdt.internal.ui.cview.CView.createPartControl(CView.java:554)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
at org.eclipse.ui.internal.WorkbenchPartReference.getPartWorkbenchPartReference.java:595)
at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2245)
at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1145)
at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3921)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3918)
at org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHandler.java:162)
at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:76)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecksParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommandHandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommandSlaveHandlerService.java:241)
at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelectionCommandContributionItem.java:829)
at org.eclipse.ui.menus.CommandContributionItem.access$19CommandContributionItem.java:815)
at org.eclipse.ui.menus.CommandContributionItem$5.handleEventCommandContributionItem.java:805)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
Here is the session data...
eclipse.buildId=I20110613-1736
java.version=1.7.0_03
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_GB
Command-line arguments: -os linux -ws gtk -arch x86
I have tried increasing the Java Heap space, but this did not help.
I even tried a upgrading the Java version to 1.7, but there was no improvement.
Here is the contents of my /etc/eclipse.ini file
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.dist.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.100.dist
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Xms512m
-Xmx1024m
-XX:MaxPermSize=512M
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
-XX:-UseCompressedOops
NB: Whilst this may be a red-herring, I access this headless PC using VNC.
NB: I also see the following error in the logs...
String index out of range: -7
java.lang.StringIndexOutOfBoundsException: String index out of range: -7
at java.lang.String.substring(String.java:1949)
at java.lang.String.substring(String.java:1916)
at org.eclipse.cdt.managedbuilder.internal.core.AdditionalInput$1LibFilter.acceptAdditionalInput.java:488)
at org.eclipse.cdt.managedbuilder.internal.core.AdditionalInput.findLibraryAdditionalInput.java:522)
at org.eclipse.cdt.managedbuilder.internal.core.AdditionalInput.getDepLibsAdditionalInput.java:457)
at org.eclipse.cdt.managedbuilder.internal.core.AdditionalInput.dependencyChangedAdditionalInput.java:405)
at org.eclipse.cdt.managedbuilder.internal.core.AdditionalInput.needsRebuildAdditionalInput.java:343)
at org.eclipse.cdt.managedbuilder.internal.core.InputType.needsRebuildInputType.java:1619)
at org.eclipse.cdt.managedbuilder.internal.core.Tool.needsRebuild(Tool.java:3307)
at org.eclipse.cdt.managedbuilder.internal.core.ToolChain.needsRebuildToolChain.java:2068)
at org.eclipse.cdt.managedbuilder.internal.core.ToolChain.saveRebuildStateToolChain.java:2101)
at org.eclipse.cdt.managedbuilder.internal.core.ToolChain.serialize(ToolChain.java:872)
at org.eclipse.cdt.managedbuilder.internal.core.FolderInfo.serialize(FolderInfo.java:385)
at org.eclipse.cdt.managedbuilder.internal.core.Configuration.serializeConfiguration.java:953)
at org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider.writeConfigurationConfigurationDataProvider.java:124)
at org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider.applyConfigurationConfigurationDataProvider.java:162)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.applyDataCProjectDescriptionManager.java:1124)
at org.eclipse.cdt.internal.core.settings.model.CConfigurationDescriptionCache.applyDataCConfigurationDescriptionCache.java:137)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescription.applyDatasCProjectDescription.java:218)
at org.eclipse.cdt.internal.core.settings.model.SetCProjectDescriptionOperation.executeOperationSetCProjectDescriptionOperation.java:97)
at org.eclipse.cdt.internal.core.model.CModelOperation.execute(CModelOperation.java:339)
at org.eclipse.cdt.internal.core.model.CModelOperation.run(CModelOperation.java:602)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.cdt.internal.core.model.CModelOperation.runOperationCModelOperation.java:633)
at org.eclipse.cdt.internal.core.settings.model.AbstractCProjectDescriptionStorage.setProjectDescriptionAbstractCProjectDescriptionStorage.java:203)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionStorageManager.setProjectDescriptionCProjectDescriptionStorageManager.java:149)
at rg.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.setProjectDescriptionCProjectDescriptionManager.java:836)
at org.eclipse.cdt.managedbuilder.internal.core.BuildSettingsUtil.checkApplyDescriptionBuildSettingsUtil.java:211)
at org.eclipse.cdt.managedbuilder.core.ManagedBuildManager.updateCoreSettingsManagedBuildManager.java:1561)
at org.eclipse.cdt.build.internal.core.scannerconfig.CfgDiscoveredPathManager$1.runCfgDiscoveredPathManager.java:152)
at org.eclipse.cdt.internal.core.model.BatchOperation.executeOperationBatchOperation.java:36)
at org.eclipse.cdt.internal.core.model.CModelOperation.execute(CModelOperation.java:339)
at org.eclipse.cdt.internal.core.model.CModelOperation.run(CModelOperation.java:602)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.cdt.core.model.CoreModel.run(CoreModel.java:1233)
at org.eclipse.cdt.core.model.CoreModel.run(CoreModel.java:1190)
at org.eclipse.cdt.build.internal.core.scannerconfig.CfgDiscoveredPathManager.updateCoreSettingsCfgDiscoveredPathManager.java:155)
at org.eclipse.cdt.build.core.scannerconfig.ScannerConfigBuilder.buildScannerConfigBuilder.java:124)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Regards,
Nicholas Lee
|
|
|
|
|
|
|
|
| Re: Eclipse-CDT startup error "Java heap space" [message #876838 is a reply to message #875310] |
Fri, 25 May 2012 07:11   |
Axel Mueller Messages: 1830 Registered: July 2009 |
Senior Member |
|
|
Nicholas Lee wrote on Tue, 22 May 2012 15:58As a follow-up, I have found that the problem goes away if I disable clipboard transfers for my VNC session.
In some way Eclipse CDT is sensitive to these VNC settings and causes it to Java Heap OOM crash on startup.
No other applications I have tried are affected by the VNC clipboard settings, so I still consider this to be an Eclipse CDT bug.
It is annoying to have to disable clipboard transfers as this is a useful feature.
Here is a similar bug report. They indicated another workaround.
Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
|
|
|
|
|
|
|
| Re: Eclipse-CDT startup error "Java heap space" [message #880960 is a reply to message #878053] |
Sun, 03 June 2012 09:45   |
Andrea Messages: 27 Registered: July 2009 |
Junior Member |
|
|
On 05/28/2012 02:27 PM, Nicholas Lee wrote:
> It may be due to something else, but it is Eclipse CDT that reports the
> error message, not x11vnc.
>
> In the problem described at the link you gave (I.e. Q-71), x11vnc itself
> fails with an error message, and I am not seeing that happen.
True that. On the other side:
1) it mentions shared memory. If I understand correctly x11vnc and
Eclipse run on the same machine, so if Eclipse uses shared memory (which
might be the case with copy and paste) it could be a problem. Also, the
way that question starts "I have lots of memory", got me thinking. And
it's strange how Eclipse is giving memory problems exactly in the moment
you use x11vnc.
I have never tried it, but maybe you can monitor your memory, shared and
not, using one of the /proc files. Look here:
http://linux.die.net/man/5/proc
/proc/meminfo seems to be quite interesting. And in /proc you can also
change the amount of shared memory slots
2) if the problem is not with Eclipse it might be worth looking
somewhere else. If there is another option to consider I would consider
it, no matter where the error comes from.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02121 seconds