Project: SWT
Bug 252251 Can't create multiple Displays in same application
Reported: 2008-10-27 14:54:33 | Status: resolved fixed

The following snippet will crash. This prevents our SnippetLaucher code from working on Cocoa. import org.eclipse.swt.widgets.*; public class Snippet1 { public static void main (String [] args) { go(); go(); go(); go(); go(); } public static void go() { Display display = new Display (); Shell shell = new Shell(display); shell.open (); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); } display.dispose (); } }

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java