Project: SWT
Bug 117928 JDT Text test don't run anymore (out of handles) - works with SWT 3.2 M1
Reported: 2005-11-24 12:16:27 | Status: verified fixed

I20051123-1200 I have the following setup: 1. install I20051123-1200 2. start fresh workspace 3. load org.eclipse.jdt.text.tests checked out from HEAD 4. load all its required test projects from HEAD 5. load org.eclipse.jface.text from HEAD 6. *** only needed to run against SWT from 3.2 M1 - see later step *** - replace "gc.getDevice()" with "" in all *.java files - in AnnotationPainter.java replace "getLineHeight(offset)" with "getLineHeight()" 7. run JdtTextTestSuite as JUnit Plug-in Test (ignore the error in jdt.ui.tests) ==> no more handles occurrs (at different places on each run) ==> several tests fail as consequence Works on Linux and also on releng WinXP machine but fails on several of our machines here in the lab. Integrated SWT's sleak tool code into the test runner to dump object info for each test. Before the error the figures are about the following: 221 Color(s) 8 Cursor(s) 10 Font(s) 154 Image(s) The interesting part comes now: - use the PDE importer to import SWT from 3.2 M1 and repeat step 7. ==> no SWTError - use the PDE importer to import SWT from 3.2 M2 (or newer) and repeat step 7. ==> SWTError is back Here's one such stack trace: Error while informing user about event loop exception: org.eclipse.swt.SWTError: No more handles at org.eclipse.swt.SWT.error(SWT.java:3277) at org.eclipse.swt.SWT.error(SWT.java:3174) at org.eclipse.swt.SWT.error(SWT.java:3145) at org.eclipse.swt.widgets.Widget.error(Widget.java:407) at org.eclipse.swt.widgets.Control.createHandle(Control.java:482) at org.eclipse.swt.widgets.Label.createHandle(Label.java:170) at org.eclipse.swt.widgets.Control.createWidget(Control.java:497) at org.eclipse.swt.widgets.Control.<init>(Control.java:97) at org.eclipse.swt.widgets.Label.<init>(Label.java:89) at org.eclipse.ui.internal.progress.NewProgressViewer$JobItem.<init>(NewProgressViewer.java:524) at org.eclipse.ui.internal.progress.NewProgressViewer.createItem(NewProgressViewer.java:1344) at org.eclipse.ui.internal.progress.NewProgressViewer.refresh(NewProgressViewer.java:1652) at org.eclipse.ui.internal.progress.NewProgressViewer.setInput(NewProgressViewer.java:1886) at org.eclipse.ui.internal.progress.BlockedJobsDialog.showJobDetails(BlockedJobsDialog.java:317) at org.eclipse.ui.internal.progress.BlockedJobsDialog.createDialogArea(BlockedJobsDialog.java:287) at org.eclipse.jface.dialogs.IconAndMessageDialog.createDialogAndButtonArea(IconAndMessageDialog.java:199) at org.eclipse.jface.dialogs.IconAndMessageDialog.createContents(IconAndMessageDialog.java:188) at org.eclipse.jface.window.Window.create(Window.java:417) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1051) at org.eclipse.jface.window.Window.open(Window.java:775) at org.eclipse.ui.internal.progress.BlockedJobsDialog$1.runInUIThread(BlockedJobsDialog.java:224) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:93) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3171) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2826) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.runEventLoop(EventLoopProgressMonitor.java:123) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.isCanceled(EventLoopProgressMonitor.java:97) at org.eclipse.core.internal.jobs.ThreadJob.isCanceled(ThreadJob.java:126) at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:161) at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:87) at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:217) at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:96) at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:1659) at org.eclipse.core.internal.resources.File.create(File.java:107) at org.eclipse.jdt.internal.core.JavaProject.setSharedProperty(JavaProject.java:2952) at org.eclipse.jdt.internal.core.JavaProject.saveClasspath(JavaProject.java:2722) at org.eclipse.jdt.internal.core.SetClasspathOperation.saveClasspathIfNecessary(SetClasspathOperation.java:610) at org.eclipse.jdt.internal.core.SetClasspathOperation.executeOperation(SetClasspathOperation.java:257) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:724) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1704) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:788) at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:2892) at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:2908) at org.eclipse.jdt.testplugin.JavaProjectHelper.createJavaProject(JavaProjectHelper.java:141) at org.eclipse.jdt.text.tests.contentassist.JavadocCompletionTest.setUp(JavadocCompletionTest.java:113) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:236) at junit.framework.TestSuite.run(TestSuite.java:226) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22) at junit.extensions.TestSetup$1.protect(TestSetup.java:19) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.extensions.TestSetup.run(TestSetup.java:23) at junit.framework.TestSuite.runTest(TestSuite.java:236) at junit.framework.TestSuite.run(TestSuite.java:226) at junit.framework.TestSuite.runTest(TestSuite.java:236) at junit.framework.TestSuite.run(TestSuite.java:226) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:57) at org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:105) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3171) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2826) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1794) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1758) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:381) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106) at org.eclipse.pde.internal.junit.runtime.UITestApplication.run(UITestApplication.java:45) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:167) 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:324) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java