Bug 68478 - Another variant of the SWTError: no more handles
Summary: Another variant of the SWTError: no more handles
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 68761 75375 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-24 10:43 EDT by Steve CLA
Modified: 2006-02-21 10:58 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve CLA 2004-06-24 10:43:57 EDT
I am working with RC3, a fresh new workspace created from scratch.

I had experienced this or similar (SWTError: no more handles) failures for 
several versions, probably since M3 or earlier.  It is occasional, and has
some "OS-leak"-type characteristics - for example after a clean reboot eclipse
will run fine for up to a day or so before starting to crash all the time with 
this error.  Is there a work-around, or a way to increase the number of 
handles drastically so that it takes a lot longer to run out?  The problem has 
gotten much worse in more recent versions, occuring several times/day, 
sometimes immediately when I start eclipse.

My typical setup has a couple perspectives open, in a couple of separate top-
level windows, maybe 10-20 editors, and a few torn-off view windows lying 
around.  I had a very plain vanilla eclipse setup - no added plugins.  My PC 
has 1GB of RAM, and I start eclipse with a 384m jvm.  I have tried, just as an 
experiment, running eclipse under all the various 1.4.1 and 1.4.2 sdks, and 
also with 1.5.0b1 and 1.5.0b2, with no change in the behavior.  XP has all the 
MS updates.  I am running a 3-headed display setup with 2 video cards, if that 
matters.

Here is the log tail, sorry if this is just a dup of 42986, 46525, or 67209.

!ENTRY org.eclipse.ui 4 4 Jun 24, 2004 09:57:16.496
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 Jun 24, 2004 09:57:16.512
!MESSAGE No more handles [GetLastError=0x8]
!STACK 0
org.eclipse.swt.SWTError: No more handles [GetLastError=0x8]
	at org.eclipse.swt.SWT.error(SWT.java:2717)
	at org.eclipse.swt.graphics.Image.init(Image.java:1366)
	at org.eclipse.swt.graphics.Image.<init>(Image.java:161)
	at org.eclipse.swt.custom.StyledText.performPaint(StyledText.java:5676)
	at org.eclipse.swt.custom.StyledText.handlePaint(StyledText.java:5072)
	at org.eclipse.swt.custom.StyledText$7.handleEvent
(StyledText.java:4752)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:805)
	at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:803)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:3020)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:3298)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1467)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2396)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:668)
	at org.eclipse.jface.window.Window.open(Window.java:648)
	at org.eclipse.ui.internal.ide.dialogs.InternalErrorDialog.open
(InternalErrorDialog.java:71)
	at org.eclipse.ui.internal.ide.dialogs.InternalErrorDialog.openQuestion
(InternalErrorDialog.java:173)
	at org.eclipse.ui.internal.ide.IDEExceptionHandler.openQuestionDialog
(IDEExceptionHandler.java:151)
	at org.eclipse.ui.internal.ide.IDEExceptionHandler.handleException
(IDEExceptionHandler.java:83)
	at org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor.eventLoopException
(IDEWorkbenchAdvisor.java:240)
	at org.eclipse.ui.internal.ExceptionHandler.handleException
(ExceptionHandler.java:62)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1379)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1346)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:252)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
	at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:96)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:335)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:272)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:128)
	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:582)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:186)
	at org.eclipse.core.launcher.Main.run(Main.java:647)
	at org.eclipse.core.launcher.Main.main(Main.java:631)

ANd just in case it will help, here is the whole log tail for the session 
which died with the above error, there are several other exceptions logged 
here, I have no idea what they mean if anything:

!SESSION Jun 23, 2004 14:51:07.375 --------------------------------------------
-
eclipse.buildId=I200406192000
java.version=1.5.0-beta2
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US

!ENTRY org.eclipse.ui 4 4 Jun 23, 2004 14:51:07.375
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 Jun 23, 2004 14:51:07.390
!MESSAGE Failed to execute runnable 
(org.eclipse.jface.text.Assert$AssertionFailedException: Assertion failed: )
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable 
(org.eclipse.jface.text.Assert$AssertionFailedException: Assertion failed: )
	at org.eclipse.swt.SWT.error(SWT.java:2691)
	at org.eclipse.swt.SWT.error(SWT.java:2616)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
(Synchronizer.java:109)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2709)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2401)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1375)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1346)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:252)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
	at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:96)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:335)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:272)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:128)
	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:582)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:186)
	at org.eclipse.core.launcher.Main.run(Main.java:647)
	at org.eclipse.core.launcher.Main.main(Main.java:631)

!ENTRY org.eclipse.ui 4 4 Jun 23, 2004 14:51:07.390
!MESSAGE *** SWT nested exception

!ENTRY org.eclipse.ui 4 0 Jun 23, 2004 14:51:07.390
!MESSAGE Assertion failed: 
!STACK 0
org.eclipse.jface.text.Assert$AssertionFailedException: Assertion failed: 
	at org.eclipse.jface.text.Assert.isTrue(Assert.java:177)
	at org.eclipse.jface.text.Assert.isTrue(Assert.java:162)
	at org.eclipse.jface.text.Position.setLength(Position.java:176)
	at org.eclipse.jface.text.rules.DefaultPartitioner.computePartitioning
(DefaultPartitioner.java:548)
	at org.eclipse.jface.text.AbstractDocument.computePartitioning
(AbstractDocument.java:1190)
	at org.eclipse.jface.text.TextUtilities.computePartitioning
(TextUtilities.java:423)
	at 
org.eclipse.jface.text.presentation.PresentationReconciler.createPresentation
(PresentationReconciler.java:441)
	at 
org.eclipse.jface.text.presentation.PresentationReconciler.processDamage
(PresentationReconciler.java:555)
	at org.eclipse.jface.text.presentation.PresentationReconciler.access$3
(PresentationReconciler.java:553)
	at 
org.eclipse.jface.text.presentation.PresentationReconciler$InternalListener.inp
utDocumentChanged(PresentationReconciler.java:116)
	at org.eclipse.jface.text.TextViewer.fireInputDocumentChanged
(TextViewer.java:2299)
	at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2348)
	at org.eclipse.jface.text.source.SourceViewer.setDocument
(SourceViewer.java:437)
	at 
org.eclipse.jface.text.source.projection.ProjectionViewer.setDocument
(ProjectionViewer.java:352)
	at org.eclipse.jface.text.source.SourceViewer.setDocument
(SourceViewer.java:400)
	at org.eclipse.jface.text.TextViewer.setInput(TextViewer.java:2329)
	at org.eclipse.jdt.internal.ui.infoviews.SourceView.setInput
(SourceView.java:420)
	at org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView.doSetInput
(AbstractInfoView.java:488)
	at org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView.access$2
(AbstractInfoView.java:487)
	at org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView$3.run
(AbstractInfoView.java:476)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages
(Synchronizer.java:106)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2709)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2401)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1375)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1346)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:252)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
	at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:96)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:335)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:272)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:128)
	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:582)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:186)
	at org.eclipse.core.launcher.Main.run(Main.java:647)
	at org.eclipse.core.launcher.Main.main(Main.java:631)

!ENTRY org.eclipse.ui 4 4 Jun 24, 2004 09:57:06.325
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 Jun 24, 2004 09:57:06.793
!MESSAGE No more handles
!STACK 0
org.eclipse.swt.SWTError: No more handles
	at org.eclipse.swt.SWT.error(SWT.java:2717)
	at org.eclipse.swt.graphics.Image.init(Image.java:1366)
	at org.eclipse.swt.graphics.Image.<init>(Image.java:161)
	at org.eclipse.swt.custom.StyledText.performPaint(StyledText.java:5676)
	at org.eclipse.swt.custom.StyledText.handlePaint(StyledText.java:5072)
	at org.eclipse.swt.custom.StyledText$7.handleEvent
(StyledText.java:4752)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:805)
	at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:803)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:3020)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:3298)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1467)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2396)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1375)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1346)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:252)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
	at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:96)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:335)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:272)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:128)
	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:582)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:186)
	at org.eclipse.core.launcher.Main.run(Main.java:647)
	at org.eclipse.core.launcher.Main.main(Main.java:631)

!ENTRY org.eclipse.ui 4 4 Jun 24, 2004 09:57:16.496
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 Jun 24, 2004 09:57:16.512
!MESSAGE No more handles [GetLastError=0x8]
!STACK 0
org.eclipse.swt.SWTError: No more handles [GetLastError=0x8]
	at org.eclipse.swt.SWT.error(SWT.java:2717)
	at org.eclipse.swt.graphics.Image.init(Image.java:1366)
	at org.eclipse.swt.graphics.Image.<init>(Image.java:161)
	at org.eclipse.swt.custom.StyledText.performPaint(StyledText.java:5676)
	at org.eclipse.swt.custom.StyledText.handlePaint(StyledText.java:5072)
	at org.eclipse.swt.custom.StyledText$7.handleEvent
(StyledText.java:4752)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:805)
	at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:803)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:3020)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:3298)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1467)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2396)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:668)
	at org.eclipse.jface.window.Window.open(Window.java:648)
	at org.eclipse.ui.internal.ide.dialogs.InternalErrorDialog.open
(InternalErrorDialog.java:71)
	at org.eclipse.ui.internal.ide.dialogs.InternalErrorDialog.openQuestion
(InternalErrorDialog.java:173)
	at org.eclipse.ui.internal.ide.IDEExceptionHandler.openQuestionDialog
(IDEExceptionHandler.java:151)
	at org.eclipse.ui.internal.ide.IDEExceptionHandler.handleException
(IDEExceptionHandler.java:83)
	at org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor.eventLoopException
(IDEWorkbenchAdvisor.java:240)
	at org.eclipse.ui.internal.ExceptionHandler.handleException
(ExceptionHandler.java:62)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1379)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1346)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:252)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
	at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:96)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:335)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:272)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:128)
	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:582)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:186)
	at org.eclipse.core.launcher.Main.run(Main.java:647)
	at org.eclipse.core.launcher.Main.main(Main.java:631)
Comment 1 Dirk Baeumer CLA 2004-06-28 12:37:21 EDT
*** Bug 68761 has been marked as a duplicate of this bug. ***
Comment 2 Avgustin CLA 2004-06-29 04:35:44 EDT
About bug 68761 that is marked as duplicated to this one. 
I have found the reason for my problems. We had have power outage and the file 
that I edited had been corruptedly saved. That was the problem.
Comment 3 Dani Megert CLA 2004-07-26 12:19:22 EDT
I have a small workspace which shows this behavior (WinXp). I can send it to you
if you want.
Comment 4 Steve Northover CLA 2004-07-28 16:34:20 EDT
Daniel, can you attach the workspace to this problem report?
Comment 5 Silenio Quarti CLA 2004-08-03 09:51:20 EDT
Also, what is the depth and resolution of your screen?
Comment 6 Dani Megert CLA 2004-08-03 10:10:38 EDT
1280x1024, 32-bit colors
Comment 7 Steve CLA 2004-08-03 10:56:00 EDT
in case it is helpful - my three-headed setup has 2 1600x1200 screens and 1
1280x1024 screen, all 32-bit
Comment 8 Dani Megert CLA 2004-08-25 06:40:52 EDT
re comment 4: my workspace was too big to be attached. I've sent my workspace on
7-29-2004 to Silenio Quarti and Steve Northover (cc).
Comment 9 Dani Megert CLA 2004-10-01 10:08:29 EDT
*** Bug 75375 has been marked as a duplicate of this bug. ***
Comment 10 Christophe Cornu CLA 2005-04-20 17:23:46 EDT
v>20050420
We have changed the implementation of Image(Display, int, int) to fix bug 
92017, so marking as FIXED.

Please reopen if this is still a problem with upcoming 3.1 M7 or next week's 
integration build I20050426.
Comment 11 Jevgeni Kabanov CLA 2006-02-21 04:44:15 EST
Starting from 3.2M4 I can repeat this bug by committing a lot of files on linux.
Comment 12 Steve Northover CLA 2006-02-21 10:58:47 EST
This bug report is refering to Windows.  Please open a new Linux one with a set of numbered steps we can follow to make it happen (ie. exactly how many files, which dialog).  Since you have a repeatable case, we are very interested.