Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 250505 - [Forms] AbstractHyperlink should check if widget is disposed before calling triggerAccessible
Summary: [Forms] AbstractHyperlink should check if widget is disposed before calling t...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P2 major (vote)
Target Milestone: 3.4.2   Edit
Assignee: Adam Archer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 242902 250282 250461 251411 258886 259887 262281 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-10 18:47 EDT by Izzet Safer CLA
Modified: 2009-02-02 20:42 EST (History)
9 users (show)

See Also:


Attachments
proposed patch (881 bytes, patch)
2008-10-10 18:52 EDT, Izzet Safer CLA
agarcher: iplog+
Details | Diff
mylyn/context/zip (893 bytes, application/octet-stream)
2008-10-10 18:52 EDT, Izzet Safer CLA
no flags Details
applied patch (1.15 KB, patch)
2008-10-17 14:15 EDT, Adam Archer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Izzet Safer CLA 2008-10-10 18:47:38 EDT
We're using the v20080708_34x version of org.eclipse.ui.forms and getting an SWT exception because AbstractHyperlink.handleActivate(Event) does not check if widget is disposed or not before calling triggerAccessible().

To reproduce, attach a listener to the hyperlink that is set to dispose the same hyperlink after the link is activated. This use to work in v20080611 when the call to triggerAccessible() was made before notifying the listeners.

Exception trace:

org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(Unknown Source)
	at org.eclipse.swt.SWT.error(Unknown Source)
	at org.eclipse.swt.SWT.error(Unknown Source)
	at org.eclipse.swt.widgets.Widget.error(Unknown Source)
	at org.eclipse.swt.widgets.Widget.checkWidget(Unknown Source)
	at org.eclipse.swt.widgets.Control.getAccessible(Unknown Source)
	at org.eclipse.ui.forms.widgets.AbstractHyperlink.triggerAccessible(Unknown Source)
	at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(Unknown Source)
	at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(Unknown Source)
	at org.eclipse.ui.forms.widgets.AbstractHyperlink.access$2(Unknown Source)
	at org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown Source)
	at org.eclipse.ui.internal.Workbench.runUI(Unknown Source)
	at org.eclipse.ui.internal.Workbench.access$4(Unknown Source)
	at org.eclipse.ui.internal.Workbench$5.run(Unknown Source)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Unknown Source)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown Source)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown Source)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(Unknown Source)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown Source)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Unknown Source)
	at org.eclipse.equinox.launcher.Main.basicRun(Unknown Source)
	at org.eclipse.equinox.launcher.Main.run(Unknown Source)
	at org.eclipse.equinox.launcher.Main.main(Unknown Source)
Comment 1 Izzet Safer CLA 2008-10-10 18:52:36 EDT
Created attachment 114853 [details]
proposed patch

proposed patch
Comment 2 Izzet Safer CLA 2008-10-10 18:52:40 EDT
Created attachment 114854 [details]
mylyn/context/zip
Comment 3 Izzet Safer CLA 2008-10-10 19:02:23 EDT
I guess this is more suitable for the UA component, sorry about opening this in SWT
Comment 4 Adam Archer CLA 2008-10-14 15:18:51 EDT
Reproduced the bug and verified the patch against both HEAD and 3.4.x.

The fix looks good. Delivered to HEAD and R3_4_maintenance.
Comment 5 Adam Archer CLA 2008-10-14 15:26:17 EDT
*** Bug 250461 has been marked as a duplicate of this bug. ***
Comment 6 Adam Archer CLA 2008-10-14 15:55:52 EDT
*** Bug 242902 has been marked as a duplicate of this bug. ***
Comment 7 Adam Archer CLA 2008-10-15 10:55:54 EDT
*** Bug 250282 has been marked as a duplicate of this bug. ***
Comment 8 Adam Archer CLA 2008-10-17 14:15:20 EDT
Created attachment 115441 [details]
applied patch

A modified version of the previous patch that adds a statement to the copyright to attribute the contribution to Izzet. This is the patch that was applied to all branches.
Comment 9 Adam Archer CLA 2008-10-20 12:53:05 EDT
*** Bug 251411 has been marked as a duplicate of this bug. ***
Comment 10 Remy Suen CLA 2008-12-16 00:41:16 EST
*** Bug 258886 has been marked as a duplicate of this bug. ***
Comment 11 Steffen Pingel CLA 2009-02-02 20:41:51 EST
*** Bug 262281 has been marked as a duplicate of this bug. ***
Comment 12 Steffen Pingel CLA 2009-02-02 20:42:09 EST
*** Bug 259887 has been marked as a duplicate of this bug. ***