Community
Participate
Working Groups
Build Identifier: 3.7.0.v3735b 1. Launch the attached test case (OS X 10.6 or 10.7) 2. Press Cmd+Q 3. The attached stacktrace occurs Reproducible: Always
Created attachment 200183 [details] Sample to reproduce the bug
Created attachment 200184 [details] stacktrace
The sample has been launched with the VM options "-d32 -XstartOnFirstThread".
Created attachment 200276 [details] patch The exception is caused because the default menu action is invoked after the display has been disposed in the Selection Listener. It can be prevented in the code by setting event.doit = false in the Listener so that the default action is not called. Patch adds a check to see if the display is disposed. Silenio, can you please review?
(In reply to comment #4) > Patch adds a check to see if the display is disposed. Silenio, can you please > review? instead of: // display may be disposed at this point if (display == null || display.isDisposed()) return; would the usuall check work ? // widget could be disposed at this point if (isDisposed ()) return; (note, you need to release the code to GIT, if you release to CVS the change will be lost).
(In reply to comment #5) > (In reply to comment #4) > > Patch adds a check to see if the display is disposed. Silenio, can you please > > review? > > instead of: > // display may be disposed at this point > if (display == null || display.isDisposed()) return; > > would the usuall check work ? > // widget could be disposed at this point > if (isDisposed ()) return; > > (note, you need to release the code to GIT, if you release to CVS the change > will be lost). Yes, the above check works. I wonder why I didn't do that... :(
(In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > Patch adds a check to see if the display is disposed. Silenio, can you please > > > review? > > > > instead of: > > // display may be disposed at this point > > if (display == null || display.isDisposed()) return; > > > > would the usuall check work ? > > // widget could be disposed at this point > > if (isDisposed ()) return; > > > > (note, you need to release the code to GIT, if you release to CVS the change > > will be lost). > Yes, the above check works. I wonder why I didn't do that... :( good, please release the code if you haven't already done so.
Fixed in HEAD. http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=088c790db90f4fa52ce003e223a41c7ccdfd384a