Project: SWT
Bug 98845 Crash when a Combo disposed on FocusOut
Reported: 2005-06-07 17:29:06 | Status: resolved fixed

Motif crashes when focus is lost to the Combo's drop down. To reproduce, run the following example and click on the down arrow in the Combo. public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new FillLayout()); final Button b1 = new Button(shell, SWT.NONE); b1.addListener(SWT.FocusOut, new Listener() { public void handleEvent(Event event) { b1.dispose(); } }); final Combo c = new Combo(shell, SWT.NONE); c.addListener(SWT.FocusOut, new Listener() { public void handleEvent(Event event) { c.dispose(); } }); c.add("Hi"); Text text = new Text(shell, SWT.NONE); shell.setSize(320, 240); shell.open(); b1.setFocus(); while(!shell.isDisposed()) { if(!display.readAndDispatch()) display.sleep(); } display.dispose(); }

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java