Bug 288357 - [Widgets] ComboBoxCellEditor throws SWTException if parent is disposed before it pops up
Summary: [Widgets] ComboBoxCellEditor throws SWTException if parent is disposed before...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.8   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted, triaged
Depends on:
Blocks:
 
Reported: 2009-09-02 09:43 EDT by Eleanor Joslin CLA
Modified: 2020-06-17 11:41 EDT (History)
4 users (show)

See Also:


Attachments
Sample program (4.77 KB, text/x-java)
2009-09-02 09:44 EDT, Eleanor Joslin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eleanor Joslin CLA 2009-09-02 09:43:16 EDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.9) Gecko/2009042115 Fedora/3.0.9-1.fc10 Firefox/3.0.9
Build Identifier: I20090611-1540

A dialog in my application contains an editable table with combo box cell editors whose contents are calculated on the fly.  Occasionally it takes a long time to find what the cell editor's options should be.  If the user closes the dialog while a call to ICellModifier.canModify(Object, String) is in progress, an SWTException (Widget is disposed) occurs when the cell editor is finally ready to appear.

Reproducible: Always

Steps to Reproduce:
1. Run the attached sample program.
2. Click on the "Open Dialog" button.
3. Click on the table cell labelled "Apples".  There is a 2-second delay before the cell editor activates.
4. Click OK before the 2 seconds are up.

org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed)
	at org.eclipse.swt.SWT.error(SWT.java:3884)
	at org.eclipse.swt.SWT.error(SWT.java:3799)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3468)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3115)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at SlowOpeningComboBoxCellEditor.main(SlowOpeningComboBoxCellEditor.java:150)
Caused by: org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:3884)
	at org.eclipse.swt.SWT.error(SWT.java:3799)
	at org.eclipse.swt.SWT.error(SWT.java:3770)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:450)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:388)
	at org.eclipse.swt.custom.CCombo.setListVisible(CCombo.java:1475)
	at org.eclipse.jface.viewers.AbstractComboBoxCellEditor$1.run(AbstractComboBoxCellEditor.java:96)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	... 5 more



The DROP_DOWN_ON_MOUSE_ACTIVATION activation style must be set on the ComboBoxCellEditor for the bug to occur.
Comment 1 Eleanor Joslin CLA 2009-09-02 09:44:11 EDT
Created attachment 146279 [details]
Sample program
Comment 2 Praveen CLA 2010-02-11 10:46:58 EST
The problem is reproducible on most of the platforms and it seems the problem is more due to the attempt of using disposed widget in JFace code.
Comment 3 Ian Pun CLA 2017-06-26 17:35:15 EDT
Bug is still reproducible and has been triaged. Visit https://wiki.eclipse.org/SWT/Devel/Triage for more information.
Comment 4 Niraj Modi CLA 2018-05-08 03:06:33 EDT
Please re-target this bug as required.
Comment 5 Eclipse Genie CLA 2020-06-17 11:41:22 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.