Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329228

Summary: [Browser-IE] Callback happens on disposed control and generates an error
Product: [Eclipse Project] Platform Reporter: Christopher Deckers <chrriis>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description Christopher Deckers CLA 2010-11-01 18:04:20 EDT
Build Identifier: SWT 3.6

I have an SWT_AWT application and when the browser gets removed (disposed), I occasionally see an SWT error:
org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4083)
	at org.eclipse.swt.SWT.error(SWT.java:3998)
	at org.eclipse.swt.SWT.error(SWT.java:3969)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:340)
	at org.eclipse.swt.widgets.Control.getParent(Control.java:1377)
	at org.eclipse.swt.browser.WebSite.MapUrlToZone(WebSite.java:494)
	at org.eclipse.swt.browser.WebSite$4.method5(WebSite.java:88)
	at org.eclipse.swt.internal.ole.win32.COMObject.callback5(COMObject.java:110)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655)

It seems the SWT browser still receives calls from the IE COM object and processes them though the control is disposed from an SWT point of view.
I am not sure what should happen in this case but I doubt it should raise an exception.

Reproducible: Sometimes

Steps to Reproduce:
1. Launch an SWT_AWT application with a Browser using IE.
2. Dispose the Browser.
-> Occasionally you get an exception.
Comment 1 Christopher Deckers CLA 2010-11-01 18:19:20 EDT
Note that though I tried, I was not able to create a test case showing the issue...
Comment 2 Christopher Deckers CLA 2010-11-03 18:52:36 EDT
Another one of the same kind:
org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4083)
	at org.eclipse.swt.SWT.error(SWT.java:3998)
	at org.eclipse.swt.SWT.error(SWT.java:3969)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:340)
	at org.eclipse.swt.browser.Browser.checkWidget(Browser.java:172)
	at org.eclipse.swt.widgets.Control.getShell(Control.java:1432)
	at org.eclipse.swt.widgets.Control.getShell(Control.java:1433)
	at org.eclipse.swt.widgets.Control.getShell(Control.java:1433)
	at org.eclipse.swt.ole.win32.OleClientSite.OnUIDeactivate(OleClientSite.java:996)
	at org.eclipse.swt.ole.win32.OleControlSite.OnUIDeactivate(OleControlSite.java:662)
	at org.eclipse.swt.ole.win32.OleClientSite$5.method10(OleClientSite.java:526)
	at org.eclipse.swt.internal.ole.win32.COMObject.callback10(COMObject.java:155)
	at org.eclipse.swt.internal.win32.OS.VtblCall(Native Method)
	at org.eclipse.swt.internal.ole.win32.IOleInPlaceObject.UIDeactivate(IOleInPlaceObject.java:24)
	at org.eclipse.swt.ole.win32.OleControlSite.onFocusOut(OleControlSite.java:698)
	at org.eclipse.swt.ole.win32.OleClientSite$1.handleEvent(OleClientSite.java:131)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
	at org.eclipse.swt.ole.win32.OleFrame$2.run(OleFrame.java:155)
	at org.eclipse.swt.widgets.Display.runTimer(Display.java:4167)
	at org.eclipse.swt.widgets.Display.messageProc(Display.java:3256)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655)
Comment 3 Eclipse Webmaster CLA 2019-09-06 16:08:31 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.

If you have further information on the current state of the bug, please add it. 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.
Comment 4 Eclipse Genie CLA 2021-09-01 03:09:43 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.