Bug 242466 [JFace] Widget is disposed error when closing dialog from OSX dock
- run the snippet below which shows a dialog - right-click its icon in the OSX dock and select Quit -> the exception at the bottom will be spewed - it looks like the last line of Window.runEventLoop(Shell) should change from: display.update(); to... if (!display.isDisposed()) display.update(); snippet: public static void main (String [] args) { try { final Display display = new Display (); final Shell shell = new Shell (display); TitleAreaDialog dialog = new TitleAreaDialog(shell); dialog.setBlockOnOpen(true); dialog.open(); display.dispose (); } catch (Exception e) { e.printStackTrace(); } } exception: org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:3777) at org.eclipse.swt.SWT.error(SWT.java:3695) at org.eclipse.swt.SWT.error(SWT.java:3666) at org.eclipse.swt.widgets.Display.error(Display.java:1126) at org.eclipse.swt.widgets.Display.checkDevice(Display.java:626) at org.eclipse.swt.widgets.Display.update(Display.java:4084) at org.eclipse.jface.window.Window.runEventLoop(Window.java:832) at org.eclipse.jface.window.Window.open(Window.java:801) at win32.Main1.main(Main1.java:20)
bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java
* Creates this window's widgetry in a new top-level shell.
	 * <p>
	 * The default implementation of this framework method creates this window's
	 * shell (by calling <code>createShell</code>), and its controls (by
	 * calling <code>createContents</code>), then initializes this window's
	 * shell bounds (by calling <code>initializeBounds</code>).
	 * </p>
	 */
	public void create() {
		shell = createShell();
		contents = createContents(shell);
		
		
		initializeBounds();
	}
	/**
	 * Creates and returns this window's contents. Subclasses may attach any
	 * number of children to the parent. As a convenience, the return value of
	 * this method will be remembered and returned by subsequent calls to
	 * getContents(). Subclasses may modify the parent's layout if they overload
	 * getLayout() to return null.
	 * 
	 * <p>
	 * It is common practise to create and return a single composite that
	 * contains the entire window contents.
	 * </p>
	 * 
	 * <p>
	 * The default implementation of this framework method creates an instance
	 * of <code>Composite</code>. Subclasses may override.