Bug 402983 - 'No more handles' error is thrown when clicking inside a Java text editor
Summary: 'No more handles' error is thrown when clicking inside a Java text editor
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.2.2   Edit
Hardware: PC Windows 7
: P3 major with 9 votes (vote)
Target Milestone: 4.4   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact: Niraj Modi CLA
URL:
Whiteboard:
Keywords:
: 350958 363106 410894 412037 415091 416386 417920 430373 449968 455325 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-11 21:41 EDT by Liad Yosef CLA
Modified: 2016-04-04 10:08 EDT (History)
48 users (show)

See Also:


Attachments
Michael Facquet's computer audit (29.04 MB, application/pdf)
2013-10-17 08:27 EDT, Michael Facquet CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Liad Yosef CLA 2013-03-11 21:41:52 EDT
What steps will reproduce the problem?
1. Click outside a Java file text editor (out of focus. For example click in the package explorer)
2. Click back inside the java text editor (happens only on java editor - not xml, css etc.)
3. Error is thrown


-- Error Details --
Date: Tue Mar 12 03:31:29 IST 2013
Message: Unhandled event loop exception
Severity: Error
Product: Eclipse 1.5.2.20130110-1126 (org.eclipse.epp.package.jee.product)
Plugin: org.eclipse.ui
Session Data:
eclipse.buildId=M20130204-1200
java.version=1.6.0_43
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=iw_IL
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -data C:\Users\user\duda\trunk -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

Exception Stack Trace:
org.eclipse.swt.SWTError: No more handles
	at org.eclipse.swt.SWT.error(SWT.java:4387)
	at org.eclipse.swt.SWT.error(SWT.java:4276)
	at org.eclipse.swt.SWT.error(SWT.java:4247)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
	at org.eclipse.swt.widgets.Control.createHandle(Control.java:704)
	at org.eclipse.swt.widgets.Label.createHandle(Label.java:199)
	at org.eclipse.swt.widgets.Control.createWidget(Control.java:744)
	at org.eclipse.swt.widgets.Control.<init>(Control.java:112)
	at org.eclipse.swt.widgets.Label.<init>(Label.java:101)
	at org.eclipse.ui.texteditor.StatusLineContributionItem.fill(StatusLineContributionItem.java:182)
	at org.eclipse.jface.action.SubContributionItem.fill(SubContributionItem.java:59)
	at org.eclipse.jface.action.StatusLineManager.update(StatusLineManager.java:327)
	at org.eclipse.ui.internal.WorkbenchPage.updateActivations(WorkbenchPage.java:265)
	at org.eclipse.ui.internal.WorkbenchPage.access$15(WorkbenchPage.java:243)
	at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:172)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$2.run(PartServiceImpl.java:193)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartActivated(PartServiceImpl.java:191)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:596)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:549)
	at org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer.activate(AbstractPartRenderer.java:105)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$1.handleEvent(ContributedPartRenderer.java:61)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
	at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1447)
	at org.eclipse.swt.widgets.Shell.WM_MOUSEACTIVATE(Shell.java:2328)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4572)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
	at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2069)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2541)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
	at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2440)
	at org.eclipse.swt.internal.BidiUtil.windowProc(BidiUtil.java:639)
	at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3129)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3753)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	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(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:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Comment 1 Kentarou Fukuda CLA 2013-04-30 12:36:25 EDT
Does this relate to Platform.UI?
Comment 2 Paul Webster CLA 2013-04-30 12:40:48 EDT
This just means something in your install leaked SWT handles and now you've run out.

To find out what is leaking, you can install sleak and follow the instructions for taking snap shots: http://www.eclipse.org/swt/tools.php

PW
Comment 3 Dani Megert CLA 2013-06-17 02:58:30 EDT
*** Bug 410894 has been marked as a duplicate of this bug. ***
Comment 4 Dani Megert CLA 2013-06-17 02:59:07 EDT
*** Bug 350958 has been marked as a duplicate of this bug. ***
Comment 5 Dani Megert CLA 2013-06-17 03:00:40 EDT
*** Bug 363106 has been marked as a duplicate of this bug. ***
Comment 6 Dani Megert CLA 2013-06-17 03:02:49 EDT
Bug 363106 indicates that the problem could be related to Actual Multiple Monitors.
Comment 7 Ludger Heisterkamp CLA 2013-07-02 10:05:00 EDT
On my computer (Win7_x64, 2 monitors) I can reproduce it when TeamViewer 8 is running (www.teamviewer.com). When I stop TeamViewer, the bug disappears.
Comment 8 Michael Facquet CLA 2013-07-03 06:00:08 EDT
Had the exact same popup "no more handles" and same stacktrace in .log with Eclipse Kepler.

Turns out that turning "DisplayFusion" software off makes the problem disappear; turning DisplayFusion on again makes it happen again.

DisplayFusion is a multiple monitor tool that adds some buttons to window title bars. Seems the way it is hooking is messing up SWT.

I had this issue with all 4.x releases, but not on 3.x.
Comment 9 Ludger Heisterkamp CLA 2013-07-03 06:23:51 EDT
@ Michael Facquet: Good point!
TeamViewer also adds a "QuickConnect" button to the title bar. Deactivating this button lets the problem disappear although Teamviewer is running.
I don't need this button anyway so it's a solution for me, but a fix for this would be desirable.
Comment 10 CHIH-HSIN TAN CLA 2013-07-03 10:44:39 EDT
I have triple monitor.
Comment 11 pi chunhan CLA 2013-07-05 03:13:31 EDT
Could you fix this bug in eclipse 4.3 version ?

When i did these ,it happen again .

1. Click outside a Java file text editor (out of focus. For example click in the package explorer)
2. Click back inside the java text editor (happens only on java editor - not xml, css etc.)
3. Error is thrown
Comment 12 Andrey Zavtrakov CLA 2013-07-08 09:16:50 EDT
I am constantly having this error since i added 30'' monitor to my multi-monitor configuration. It is VERY annoying an repeatable even on different computers (i bought second 30 inches to my home place and instantly got the same error). PLEASE FIX IT
Comment 13 Dani Megert CLA 2013-09-03 04:25:34 EDT
*** Bug 416386 has been marked as a duplicate of this bug. ***
Comment 14 Dani Megert CLA 2013-09-03 04:26:17 EDT
*** Bug 412037 has been marked as a duplicate of this bug. ***
Comment 15 Dani Megert CLA 2013-09-03 04:28:18 EDT
*** Bug 415091 has been marked as a duplicate of this bug. ***
Comment 16 Arun Thondapu CLA 2013-09-24 14:08:29 EDT
*** Bug 417920 has been marked as a duplicate of this bug. ***
Comment 17 Serano Colameo CLA 2013-10-03 04:36:06 EDT
Here my setup:
- Eclipse Kepler win32 bit
- GGTS (Groovy & Grails Tool Suite)

and here the stack trace in .log file:

!SESSION 2013-10-03 08:52:04.095 -----------------------------------------------
eclipse.buildId=4.3.0.I20130605-2000
java.version=1.6.0_45
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_CH
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product

This is a continuation of log file C:\work2\.metadata\.bak_0.log
Created Time: 2013-10-03 10:25:45.254

!ENTRY org.eclipse.ui 4 4 2013-10-03 10:25:45.270
!MESSAGE An internal error has occurred.
!STACK 0
org.eclipse.swt.SWTError: No more handles
	at org.eclipse.swt.SWT.error(SWT.java:4423)
	at org.eclipse.swt.SWT.error(SWT.java:4312)
	at org.eclipse.swt.SWT.error(SWT.java:4283)
	at org.eclipse.swt.graphics.Image.init(Image.java:1799)
	at org.eclipse.swt.graphics.Image.init(Image.java:1945)
	at org.eclipse.swt.graphics.Image.<init>(Image.java:580)
	at org.eclipse.jface.resource.URLImageDescriptor.createImage(URLImageDescriptor.java:162)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:227)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:205)
	at org.springsource.ide.eclipse.commons.frameworks.ui.internal.icons.IconManager.getIcon(IconManager.java:50)
	at org.grails.ide.eclipse.explorer.types.GrailsContainerTypeManager.getIcon(GrailsContainerTypeManager.java:56)
	at org.grails.ide.eclipse.explorer.providers.GrailsNavigatorLabelProvider.getImage(GrailsNavigatorLabelProvider.java:65)
	at org.eclipse.ui.internal.navigator.extensions.SafeDelegateCommonLabelProvider.getImage(SafeDelegateCommonLabelProvider.java:106)
	at org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider.findImage(NavigatorContentServiceLabelProvider.java:197)
	at org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider.getColumnImage(NavigatorContentServiceLabelProvider.java:105)
	at org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider.getImage(NavigatorContentServiceLabelProvider.java:98)
	at org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider$StyledLabelProviderAdapter.getImage(NavigatorDecoratingLabelProvider.java:59)
	at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.getImage(DelegatingStyledCellLabelProvider.java:184)
	at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.getImage(DecoratingStyledCellLabelProvider.java:167)
	at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.update(DelegatingStyledCellLabelProvider.java:118)
	at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.update(DecoratingStyledCellLabelProvider.java:134)
	at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:152)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:953)
	at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:113)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1033)
	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:485)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2167)
	at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:2753)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1923)
	at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:721)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1898)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1855)
	at org.eclipse.ui.navigator.CommonViewer.internalRefresh(CommonViewer.java:561)
	at org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredViewer.java:1535)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
	at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:403)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
	at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1533)
	at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:555)
	at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:350)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider$3.run(PackageExplorerContentProvider.java:955)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.runUpdates(PackageExplorerContentProvider.java:195)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider.runPendingUpdates(PackageExplorerContentProvider.java:187)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerContentProvider$1.runInUIThread(PackageExplorerContentProvider.java:165)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
	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:4145)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3762)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1028)
	at org.eclipse.ltk.ui.refactoring.RefactoringWizard.createChange(RefactoringWizard.java:663)
	at org.eclipse.ltk.ui.refactoring.RefactoringWizard.computeUserInputSuccessorPage(RefactoringWizard.java:502)
	at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.computeSuccessorPage(UserInputWizardPage.java:74)
	at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.getNextPage(UserInputWizardPage.java:114)
	at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:908)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:428)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:628)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
	at org.eclipse.jface.window.Window.open(Window.java:802)
	at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:187)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:202)
	at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:122)
	at org.grails.ide.eclipse.refactoring.rename.ui.GrailsTypeRenameTarget.performRenameAction(GrailsTypeRenameTarget.java:184)
	at org.grails.ide.eclipse.actions.GrailsRenameAction.run(GrailsRenameAction.java:43)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	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:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

Regards
Serano
Comment 18 Lakshmi P Shanmugam CLA 2013-10-03 05:24:28 EDT
(In reply to Serano Colameo from comment #17)
> Here my setup:
> - Eclipse Kepler win32 bit
> - GGTS (Groovy & Grails Tool Suite)
> 
Do you have a multiple-monitor setup? Does it happen on plain eclipse too (i.e, without GGTS installed)?
Comment 19 Serano Colameo CLA 2013-10-03 06:40:56 EDT
(In reply to Lakshmi Shanmugam from comment #18)
> (In reply to Serano Colameo from comment #17)
> > Here my setup:
> > - Eclipse Kepler win32 bit
> > - GGTS (Groovy & Grails Tool Suite)
> > 
> Do you have a multiple-monitor setup? Does it happen on plain eclipse too
> (i.e, without GGTS installed)?

No I have only one monitor and without GGTS I did not try yet.
It happens especially when I refactor (rename) groovy classes.

However, I looked first in the GGTS forum and found a link to this bug.
Comment 20 Carsten Reckord CLA 2013-10-11 06:08:45 EDT
This has gotten really bad for me since updating to Kepler SR1. I currently have to restart my Eclipse about twice a day. I have a single-monitor setup and no third-party plug-ins installed.

Running sleak, I observed that the image count constantly rises and there are lots of identical copies of the same decorated resource images used in the Package Explorer, all with a stack trace like this:

java.lang.Error
	at org.eclipse.swt.graphics.Device.new_Object(Device.java:859)
	at org.eclipse.swt.graphics.Resource.init(Resource.java:86)
	at org.eclipse.swt.graphics.Image.<init>(Image.java:455)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:291)
	at org.eclipse.jface.resource.ImageDescriptor.createResource(ImageDescriptor.java:165)
	at org.eclipse.jface.resource.DeviceResourceManager.allocate(DeviceResourceManager.java:56)
	at org.eclipse.jface.resource.AbstractResourceManager.create(AbstractResourceManager.java:88)
	at org.eclipse.jface.resource.LocalResourceManager.allocate(LocalResourceManager.java:82)
	at org.eclipse.jface.resource.AbstractResourceManager.create(AbstractResourceManager.java:88)
	at org.eclipse.jface.resource.LocalResourceManager.allocate(LocalResourceManager.java:82)
	at org.eclipse.jface.resource.AbstractResourceManager.create(AbstractResourceManager.java:88)
	at org.eclipse.jface.resource.ResourceManager.createImage(ResourceManager.java:172)
	at org.eclipse.ui.internal.decorators.DecorationResult.decorateWithOverlays(DecorationResult.java:89)
	at org.eclipse.ui.internal.decorators.DecorationScheduler.decorateWithOverlays(DecorationScheduler.java:186)
	at org.eclipse.ui.internal.decorators.DecoratorManager.decorateImage(DecoratorManager.java:584)
	at org.eclipse.ui.internal.decorators.DecoratorManager$ManagedWorkbenchLabelDecorator.decorateImage(DecoratorManager.java:149)
	at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.getImage(DecoratingStyledCellLabelProvider.java:173)
	at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.update(DelegatingStyledCellLabelProvider.java:118)
	at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.update(DecoratingStyledCellLabelProvider.java:134)
	at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:152)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:953)
	at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:113)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1033)
	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:485)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2167)
	at org.eclipse.jface.viewers.StructuredViewer.internalUpdate(StructuredViewer.java:2150)
	at org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:2089)
	at org.eclipse.jface.viewers.ColumnViewer.update(ColumnViewer.java:561)
	at org.eclipse.jface.viewers.StructuredViewer.update(StructuredViewer.java:2033)
	at org.eclipse.jface.viewers.StructuredViewer.handleLabelProviderChanged(StructuredViewer.java:1191)
	at org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer.handleLabelProviderChanged(ProblemTreeViewer.java:223)
	at org.eclipse.jface.viewers.ContentViewer$1.labelProviderChanged(ContentViewer.java:97)
	at org.eclipse.jface.viewers.BaseLabelProvider$1.run(BaseLabelProvider.java:74)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.BaseLabelProvider.fireLabelProviderChanged(BaseLabelProvider.java:72)
	at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider$1.labelProviderChanged(DecoratingStyledCellLabelProvider.java:77)
	at org.eclipse.ui.internal.decorators.DecoratorManager$1.run(DecoratorManager.java:430)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.decorators.DecoratorManager.fireListener(DecoratorManager.java:428)
	at org.eclipse.ui.internal.decorators.DecorationScheduler$3.runInUIThread(DecorationScheduler.java:530)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
	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:4145)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3762)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)


I'm not sure about the significance of this, but what I found odd was that they all had this line:

	at org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer.handleLabelProviderChanged(ProblemTreeViewer.java:223)

even though most of these images are completely unrelated to the problems view... (the most frequent one I observed is the package local Java class file image)
Comment 21 Carsten Reckord CLA 2013-10-11 08:03:22 EDT
Investigating the duplicate package visible icons, I was able to reproduce with a fresh Eclipse 4.3.1 SDK, a new workspace and these steps:

1. In the workspace preferences, under General > Appearance > Label Decorations, enable "Java Type Indicator"
2. In the Package Explorer, enable "Link with Editor"
3. Create a new Plug-In Project, accepting all defaults
4. Open the newly created Activator.java
5. Open a package private class file, e.g. org.eclipse.core.internal.adapter.AdapterFactoryProxy
6. For good measure, switch a couple of times between the two editors
7. Take a snapshot in Sleak
8. Switch some more between the editors
9. Show the diff in Sleak

You should see a number of images at the bottom of the list, all copies of the package local class file icon.

I'm sure there's other leaks - or pathes to this one - though, because my Eclipse currently grows by about 1000 images per hour in my productive workspace. I'll keep looking.
Comment 22 Bogdan Gheorghe CLA 2013-10-11 12:12:47 EDT
(In reply to Carsten Reckord from comment #21)

This seems to be a different bug than the one initially described here. Can you please open a bug and send it to JFace?
Comment 23 Bogdan Gheorghe CLA 2013-10-11 12:18:25 EDT
Niraj, can you look into this (the multi-monitor problem)?
Comment 24 Niraj Modi CLA 2013-10-16 08:31:06 EDT
Tried installing DispalyFusion utility and a new button shows up on top of the title-bar of all Windows application (including Eclipse)
This new button allows quick application switching between multiple monitors.
Tried moving eclipse from one monitor to other multiple times and worked on it for quite some time, it seems to be working fine.
[Secondary monitor configuration 22'' with roughly 1200 by 2k resolution.] 

@ Michael Facquet:
Could you please provide more details or exact steps which reproduces the issue, specifically in multiple monitors scenario ?
Did you observe this issue on other machines with multiple monitors ?
Please note there was another bug w.r.t. to MulitMonitor https://bugs.eclipse.org/bugs/show_bug.cgi?id=351398 which points to some hardware specific.

Note:- I could observe the image leaks in "Sleak" with single monitor.
I closed all the views/tabs in Eclipse and the image count continue to be on higher side.
Comment 25 Michael Facquet CLA 2013-10-16 09:02:37 EDT
1) install DisplayFusion 5.1
2) make sure it adds one button to title bars (this is the case by default)
3) start eclipse 4.3.0 with JDT
4) clic outside the Java editor (for example select some class in the package explorer)
5) clic inside the Java editor

A popup window instantly appears:
"Unhandled event loop exception
No more handles"

I had this issue on my previous machine.
Comment 26 Niraj Modi CLA 2013-10-17 06:50:23 EDT
(In reply to Michael Facquet from comment #25)
Hi Michael,
We tried similar steps and we are unable to reproduce this issue with multiple monitors.

Could you try reproducing this again ? If reproducible please share your OS & hardware details.
Suspect the multiple monitors issue to be some hardware/driver problem similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=351398#c9
Comment 27 Niraj Modi CLA 2013-10-17 07:54:55 EDT
(In reply to Carsten Reckord from comment #21)
Please refer bug 419692
Comment 28 Michael Facquet CLA 2013-10-17 08:27:29 EDT
Created attachment 236592 [details]
Michael Facquet's computer audit
Comment 29 Michael Facquet CLA 2013-10-17 08:49:35 EDT
I have successfully reproduced yesterday to give you the reproduction steps.

I've attached my computer audit with all hardware specifications.

I'll have a try tonight on my personal computer, see if I can reproduce with a totally different hardware.
Comment 30 Bogdan Gheorghe CLA 2013-10-18 16:42:32 EDT
Michael, what other plugins do you have installed? Can you confirm that Eclipse still crashes if you just use a standalone Eclipse SDK? (ie. nothing else installed) Thanks!
Comment 31 Silenio Quarti CLA 2013-10-18 17:32:46 EDT
I have not been able to reproduce this after installing TeamViewer 8 on a triple monitor (total bounds=Rectangle {-3520, 0, 5120, 1200}). Running plain Eclipse 4.3 SDK.

What is the size of your multi-monitor configuration?
Comment 32 Michael Facquet CLA 2013-10-21 05:02:31 EDT
I haven't been able to reproduce at home on a different machine.

As for plugins, I have JDT, CVS client, GIT client, Gradle IDE and StartExplorer installed.

I have reproduced using a freshly downloaded Eclipse SDK alone.

My screen resolution is 3360*1050 (2x 1680*1050).
Comment 33 Martin Fisher CLA 2013-10-23 11:55:26 EDT
Might help to know I have this issue on only 1 of 20 or so VMs running Centos under vmware.  Only difference between the failing one and the others is the use of egit/jgit.

Martin
Comment 34 Kevin Yang CLA 2013-10-23 21:33:39 EDT
yes. just the steps that you say.

(In reply to Liad Yosef from comment #0)
> What steps will reproduce the problem?
> 1. Click outside a Java file text editor (out of focus. For example click in
> the package explorer)
> 2. Click back inside the java text editor (happens only on java editor - not
> xml, css etc.)
> 3. Error is thrown
Comment 35 Silenio Quarti CLA 2013-10-24 09:58:09 EDT
Does this problem happen right after starting up Eclipse? Or does it take some time to happen?   I am trying to determine whether it is slow leak.
Comment 36 Michael Facquet CLA 2013-10-24 10:05:34 EDT
It happens right after startup.

You start Eclipse, one clic in package explorer, another one in a Java editor and the error popup is thrown.
Comment 37 Martin Fisher CLA 2013-10-24 10:50:28 EDT
For me it's a slow leak.  A few hours but consistent.
Comment 38 Timo Kinnunen CLA 2013-10-24 14:55:43 EDT
I theorized in Bug 394348 comment 40 that there's at least 2 different ways text layouts can cause a No more handles error: a fast one that rapidly uses all available graphics contexts during painting which I can reproduce on Windows 8 and a slower one that leaks text editor UI objects and doesn't seem to lead to No more handles on Windows 8 at all, apparently only limit being available memory.
Comment 39 Stefan Xenos CLA 2013-11-08 23:10:39 EST
I can reproduce the issue reported in comment 0 with an identical stack trace. It is reproducible instantly on startup, not a slow leak.

I suspect this bug is getting pulled off track by multiple different issues. The posters reporting slow leaks and different stack traces should file other bugs so that these distinct issues can be tracked properly. These are also important (but different) bugs.

This appears related to multiple monitors. I do not use TeamViewer or DisplayFusion, but it does seem plausible to me that they are related to the problem, since it only shows up for me with certain multi-monitor settings enabled in my video drivers.

Here is how I can reproduce it 100% of the time.


Eclipse build:

Version: 4.4.0
Build id: I20131030-2000
Freshly installed -- no additional plugins.

OS: Running Windows 7

Video Card: Nvidia GeForce GTX 660
Monitors: Running three identical monitors at 1920x1080

To reproduce using these steps you need NVIDIA Surround mode, which is only supported on a GTX 660 or better with three monitors that use identical timings.

- Open the NVIDIA Control Panel
- 3D Settings -> Configure Surround, PhysX
- Click the "Span displays with Surround" checkbox
- Click "Configure..."
- Go through the wizard. In case it matters, I was using three 1080p monitors. I enabled 150 pixel bezel correction, but was not using bezel correction at the time the crashes occurred.
- Now go to the windows control panel and verify that windows thinks you have one enabled monitor running at 5760x1080 and two disabled monitors.
- I think this is resolution related, but in case it matters I was running at 144hz refresh rate.

Open Eclipse and follow the steps from comment 0:

- Open a java file
- Click outside the java editor
- Click back inside the java editor
- You'll see the SWT error with the stack trace from comment 0 immediately.

If you go back to the NVIDIA control panel and disable surround mode, the problem goes away. Restart Eclipse and you can click into or out of the java editor without causing the crash.
Comment 40 Stefan Xenos CLA 2013-11-11 13:17:50 EST
If anyone is actively working on this and needs help reproducing it, feel free to email me offline or ping me on the #eclipse-dev IRC channel.

I took a stab at investigating this over the weekend but couldn't figure out how to build SWT... so I'll do the next best thing and just make myself and my machine available to anyone who wants to try to take a stab at it.
Comment 41 Niraj Modi CLA 2013-11-13 00:52:05 EST
Hi Stefan,
Could you please share the machine details over mail.
Comment 42 Nick Stonebraker CLA 2013-11-13 14:04:23 EST
I too am experiencing this bug; the happens-as-soon-as-I-open-eclipse variety, not a slow leak.  I can consistently reproduce this on my system just by downloading eclipse-SDK-4.2.2-win32-x86_64.zip(totally stock - no plugins), create new java project, create new java class, then click off-screen (editor loses focus), click back into java editor and error appears....

org.eclipse.swt.SWTError: No more handles
	at org.eclipse.swt.SWT.error(SWT.java:4387)
	at org.eclipse.swt.SWT.error(SWT.java:4276)
	at org.eclipse.swt.SWT.error(SWT.java:4247)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
	at org.eclipse.swt.widgets.Control.createHandle(Control.java:704)
	at org.eclipse.swt.widgets.Label.createHandle(Label.java:199).........


eclipse.buildId=M20130204-1200
java.version=1.7.0_11
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -debug


I am running triple monitors (1280x1024) - (1920x1080) - (1280x1024), although I observe the error occurring even without splitting my workspace over multiple monitors like I normally do.

Also I have tried more versions than I care to remember, from 4.2.2 up to the latest nightly build of Luna and I see it in all of them. I did finally discover that it does not occur in 4.2.1.  Also for what it's worth, there are 4-5 other people(identical laptops) at my place of employment observing the same phenomenon on the aforementioned versions.
Comment 43 Nick Stonebraker CLA 2013-11-13 18:24:33 EST
(In reply to Nick Stonebraker from comment #42)
> I too am experiencing this bug; the happens-as-soon-as-I-open-eclipse
> variety, not a slow leak.  I can consistently reproduce this on my system
> just by downloading eclipse-SDK-4.2.2-win32-x86_64.zip(totally stock - no
> plugins), create new java project, create new java class, then click
> off-screen (editor loses focus), click back into java editor and error
> appears....
> 
> org.eclipse.swt.SWTError: No more handles
> 	at org.eclipse.swt.SWT.error(SWT.java:4387)
> 	at org.eclipse.swt.SWT.error(SWT.java:4276)
> 	at org.eclipse.swt.SWT.error(SWT.java:4247)
> 	at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
> 	at org.eclipse.swt.widgets.Control.createHandle(Control.java:704)
> 	at org.eclipse.swt.widgets.Label.createHandle(Label.java:199).........
> 
> 
> eclipse.buildId=M20130204-1200
> java.version=1.7.0_11
> java.vendor=Oracle Corporation
> BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
> Command-line arguments:  -os win32 -ws win32 -arch x86_64 -debug
> 
> 
> I am running triple monitors (1280x1024) - (1920x1080) - (1280x1024),
> although I observe the error occurring even without splitting my workspace
> over multiple monitors like I normally do.
> 
> Also I have tried more versions than I care to remember, from 4.2.2 up to
> the latest nightly build of Luna and I see it in all of them. I did finally
> discover that it does not occur in 4.2.1.  Also for what it's worth, there
> are 4-5 other people(identical laptops) at my place of employment observing
> the same phenomenon on the aforementioned versions.


Not sure if this is helpful or not, but I just figured something out today.  If I open my eclipse
Version: 4.4.0
Build id: I20131030-2000
and I close all the views except Project Explorer & the editor window I don't see the dreaded error message!  More specifically, if I show the properties view I do start getting the error message during focus on the java editor.  So for anyone interested... a temporary workaround might be to try closing some of your views which aren't mission critical.  This was on Luna(haven't had a chance to test anything else yet), but I suspect it might apply down through 4.2.2
Comment 44 Igor P CLA 2013-11-18 14:19:16 EST
I have found a workaround for multi- and single-monitor configurations at least for some Windows systems with NVIDIA graphics cards:
disable "nView Desktop Manager"
Comment 45 Raoul Becke CLA 2013-12-07 04:45:42 EST
I have the same issue on my laptop every time when clicking into the Java Editor. These are all fresh eclipse downloads & installs without any modifications and this happen on a clean workspace with just the first Java Class I've created. The only change is in “eclipse.ini” I'm specifying the VM as follows:
-vm
C:\apps\java\jdk-7u40-windows-x64\bin\javaw.exe
respective:
-vm
C:\apps\java\jdk-7u40-windows-i586\bin\javaw.exe

I have this issue in eclipse-jee-kepler-SR1-win32-x86_64:
eclipse.buildId=4.3.0.M20130911-1000
java.version=1.7.0_40
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_CH
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

And I tried as well downgrading to eclipse-jee-juno-SR2-win32-x86_64 but this did not help ether:
eclipse.buildId=M20130204-1200
java.version=1.7.0_40
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_CH
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

And I tried as well downgrading to 32-bit eclipse-jee-kepler-SR1-win32 but this did not help ether:
eclipse.buildId=4.3.0.M20130911-1000
java.version=1.7.0_40
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_CH
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product

Even if there is another program that causes this conflict then a) I don't understand why only the Java Editor is having this problem in eclipse and b) I have no clue how to find the culprit.
Comment 46 Raoul Becke CLA 2013-12-07 15:43:53 EST
I've now tried different older eclipse versions and the latest eclipse version that has a Java Editor that is working is: “eclipse-jee-juno-SR1-win32-x86_64”. I will try now to downgrade somehow the Java Editor in Kepler to the one used in “eclipse-jee-juno-SR1-win32-x86_64” but I guess this will be quite nasty. I hope that someone soon fixes this Java Editor Problem sustainable.
Comment 47 Raoul Becke CLA 2013-12-08 05:26:12 EST
Sorry but actually it happens as well with “eclipse-jee-juno-SR1-win32-x86_64” but the error was not that obvious because it did not force me to restart the workspace :-( :

eclipse.buildId=M20120914-1800
java.version=1.7.0_40
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_CH
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

Error
Sun Dec 08 11:09:38 CET 2013
Unhandled event loop exception

org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTError: No more handles
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
	at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:88)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:107)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:318)
...
Comment 48 Raoul Becke CLA 2013-12-09 04:14:40 EST
I found now 2 ways to work with eclipse without getting “SWTError: No more handles” on my Dell ProBook 6550b Windows 7 64 bit but none of them is really satisfying: I can start windows in “secure mode” or I can downgrade to “eclipse-jee-indigo-SR2-win32-x86_64”. I will now try to kill one process after the other until kepler starts working respective until I arrive in secure mode.
Comment 49 Raoul Becke CLA 2013-12-09 05:45:46 EST
Finally (for now) I could solve the issue (at least on my laptop: Dell ProBook 6550b Windows 7 64). I “just” had to kill the processes: “DPAgent.exe*32” (DigitalPersona Local Agent) & “DPAgent.exe” (DigitalPersona 64-bit Helper Process) which were luckily running under my user (and not SYSTEM which might have made it impossible to kill depending on your rights). Nevertheless I don't understand how these processes can interfere with SWT handles in eclipse ...
Comment 50 Andrea Bearzi CLA 2013-12-16 04:06:28 EST
I found a workaround and maybe a solution

Workaround 
Change the default Java editor for ex. install WindowBuilder(http://download.eclipse.org/windowbuilder/WB/release/R201309271200/4.3/). and choose WindowBuilder Editor as Java default editor from Eclipse / Windows / Preferences and then General / Editors / File Associations

Solution(for me)
However, I eventually solved by making all updates to my Windows X64. I installed all windows update and now eclipse Works fine with the default java editor and the issue disappeared.

I hope that this information will can be useful

Source
stackoverflow(http://stackoverflow.com/questions/19330665/eclipse-unhandled-event-loop-exception-no-more-handles-windows-7/20595726#20595726)
Comment 51 Alexis LEGROS CLA 2013-12-19 02:34:38 EST
Bug disappears when I stop RBTray (http://rbtray.sourceforge.net/) on double monitored W7_x64, really looks like it comes from third party programs changing title bar behavior...
Comment 52 Raoul Becke CLA 2013-12-25 13:05:27 EST
Regarding what I described earlier and what “Andrea B.” described above. Now after I've upgraded my Windows 7 64 bit to Service-Pack 1 and installed the mandatory updates I don't need to kill anymore any processes (i.e. the "DPAgent.exe" processes) and everything works fine for me. So I agree with “Andrea B.” and would suggest as a solution or work-around to this problem to upgrade to SP1 and install the mandatory updates.
Comment 53 Niraj Modi CLA 2013-12-26 02:35:09 EST
(In reply to  Andrea Bearzi  from comment #50) & (In reply to Raoul Becke from comment #52)
Thanks Andrea/Raoul for providing/confirming on a possible fix on this issue.

(In reply to Stefan Xenos from comment #40), (In reply to Nick Stonebraker from comment #42) & (In reply to Igor P from comment #44)
Could you try upgradeing the Windows 7 64 bit to SP1 + all mandatory updates (as mentioned in comment 50 and comment 52) and confirm on this issue.
Comment 54 Yannick v CLA 2014-01-14 18:29:37 EST
Same problem here.
I am running Eclipse with a 3 screens configuration : 
- 1920 x 1080
- 1920 x 1080
- 1280 x 1024
I use Actual Multiple Monitors and the bug disappears if I close the software (without having to restart Eclipse).

Hope this help..

I will try to find a parameter inside Actual Multiple Monitors that could solve the problem without having to kill the process..
Comment 55 Evan Bruhn CLA 2014-01-16 19:05:40 EST
Just thought I'd chime in here and say that I've been experiencing the same problem, except I wasn't running any desktop manager/display vendor helper processes (no nView, no DPAgent, etc). I'm not able to run Windows Update to try and remedy the problem as I'm stuck on a corporate SOE.

In the end, it was Oracle ESSO-LM that was triggering this bug, as killing the process stops this error entirely. Likewise, starting Oracle ESSO-LM again makes the problem immediately reproducible.
Comment 56 John Nguyen CLA 2014-01-21 00:24:51 EST
Was able to replicate it exactly like the first user stated. Clicking on the package explorer and then clicking on the java editor. I have three monitors and I use DisplayFusion Pro v4.0. 

Right after I exit killed the DisplayFusion, the error stopped showing up but when I click on the package explorer, the editor just disappears which is just as annoying. Haven't done a fresh computer restart through any of this though which may have affected this.
Comment 57 romaine herrera CLA 2014-02-16 10:24:29 EST
The solution of installing windows builder and applying it to java editor as a default and doing a windows update did the job, no more handles error is gone.
Comment 58 Niraj Modi CLA 2014-02-17 07:26:32 EST
Anyone facing this problem, please try the workaround mentioned in comment 50 (few users confirmed that it worked for them)
If any alternate suggestion, feel free to add.

This issue is not reproducible at our end, I'm marking this WORKSFORME.
Comment 59 Ralf Helbing CLA 2014-04-25 08:01:23 EDT
…it clearly does not work for *me*. This bug has seven duplicates, so it clearly does not work for quite some people.

Disabling nView Desktop will stop the exceptions. They only appear when looking at JDK classes, not our own code. May be related to classes residing in archives, not individual files.
Comment 60 Enoque Duarte CLA 2014-05-06 08:37:52 EDT
Same happens here, win7 x64, connected only to external screen, laptopscreen off
Comment 61 Andrei Martins CLA 2014-05-06 21:56:27 EDT
After update windows 7 64bits problem solved
Comment 62 Szymon Ptaszkiewicz CLA 2014-10-22 04:55:57 EDT
*** Bug 430373 has been marked as a duplicate of this bug. ***
Comment 63 Markus Keller CLA 2014-11-06 15:27:29 EST
*** Bug 449968 has been marked as a duplicate of this bug. ***
Comment 64 Jacob Montgomery CLA 2014-12-11 10:06:49 EST
If you have the AMD "Gaming Evolved" app installed for ATI based cards it will also produce this error on multiple monitor setups. Exiting the "Gaming Evolved" app solves the issue.
Comment 65 Niraj Modi CLA 2014-12-17 05:59:29 EST
*** Bug 455325 has been marked as a duplicate of this bug. ***
Comment 66 Guus Bloemsma CLA 2014-12-18 03:49:29 EST
I have the same problem when accessing my remote development machine using Citrix XenDesktop Agent 7.5.

The workaround using WindowBuilder works for me as well. Unfortunately WindowBuilder is outdated according to MarketPlace. A link for your eclipse version can be found here: http://www.eclipse.org/windowbuilder/download.php
Comment 67 Joseph Leavell CLA 2015-02-26 10:28:11 EST
-----   Display Fusion FIX   -----

1: Open Display Fusion settings page
2: Click compatibility tab
3: Add "Eclipse.exe" 
4: Check "Disable TitleBar Buttons (this application only), "Disable Application Hooks (this application only)", and "Use Process file icon on DisplayFusion taskbar, not window icon"
-----------------------------------

This fix seemed to work for me, the most likely cause for the fix is the "Disable Application Hooks (this application only)", but the 3 worked for me so I have no need to test it further
Comment 68 Janne Kauttio CLA 2016-02-11 10:31:07 EST
I spent some time debugging a similar error in our RCP application, and the underlying cause turned out to be incorrect use of COM library initialization and uninitialization routines. 

The correct usage pattern for the library is specified in https://msdn.microsoft.com/en-us/library/windows/desktop/ms678543.aspx, but the relevant part is as follows: Each thread must initialize the library before use, after which subsequent calls to the initialization function will return a specific failure value (but can still be done). Each initialization must have a corresponding uninitialization (regardless of the return value), and most importantly, the first thread to initialize the library must be the last one to uninitialize it.

This is the part that was relevant to this issue: Eclipse also uses this library and if the library is also accessed from somewhere else (e.g. an external DLL in our RCP application), the correct initialization sequence can be broken which will result in an error when Eclipse attempts to obtain handles. Unfortunately several different COM library error codes are wrapped under the same SWTError "No more handles", so in order to find out an actual reason the return value must be obtained from the native call in the handle allocation process. In our case the reason was CO_E_NOTINITIALIZED, but in other cases it might be something else (e.g. the system actually ran out of resources).

I realize most of the issues discussed in this thread have probably nothing to do with the COM library initialization, but a similar situation could explain some of the issues (and the weird fixes that manage to resolve them). If an external desktop manager software is used for instance, it is not completely unreasonable to assume it also uses the COM library which might interfere with Eclipse's use of said library.

The key thing to take away from this is that there are several reasons why handle allocation might fail, and some of them have little to do with handles running out, regardless of what the error message says.
Comment 69 Evgenii Razinkin CLA 2016-04-04 10:08:09 EDT
I have a same problem on VDI Citrix Receiver.
WindowBuilder also doesn't work.
After Toggle Split Editor the issue is not reproduced.