Community
Participate
Working Groups
The Linux-GTK implementation of SWT does not appear to release all OS resources when disposing an org.eclipse.swt.printing.Printer object. The following code snippet results in a "No more handles" SWT error: Display.getDefault().syncExec(new Runnable() { public void run() { for (int i = 0; i < 100; i++) { Printer printer = new Printer(); printer.dispose(); } } }); The stack trace looks like: org.eclipse.swt.SWTError: No more handles at org.eclipse.swt.SWT.error(SWT.java:2717) at org.eclipse.swt.SWT.error(SWT.java:2616) at org.eclipse.swt.SWT.error(SWT.java:2587) at org.eclipse.swt.printing.Printer.<init>(Printer.java:100) at org.eclipse.swt.printing.Printer.<init>(Printer.java:77) at com.example.MyPlugin$1.run(PetalUIPlugin.java:106) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:135) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:25) at org.eclipse.swt.widgets.Display.syncExec(Display.java:3022) at com.example.MyPlugin.doStartup(PetalUIPlugin.java:102) ... This code manifests no problems on Windows platforms. Configuration: Platform: Intel x86 32-bit dual-processor OS: RedHat Linux 9 (Shrike) WS: GTK Eclipse: 3.0.1 JVM: java version "1.4.2" IBM J9SE VM (build 2.2, J2RE 1.4.2 IBM J9 2.2 Linux x86-32 j9xia32142-2040917 (JIT enabled) J9VM - 20040916_0910_1HdSMR JIT - r7_level20040915_1801
Printing is not implemented on GTK.
*** This bug has been marked as a duplicate of 24796 ***