Community
Participate
Working Groups
If you try to close the quick access shell you get an exception. This happen if you run Window Tester tests, which try to close all open shells on tear down. Best Regards Stefan Caused by: org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:4441) at org.eclipse.swt.SWT.error(SWT.java:4356) at org.eclipse.swt.SWT.error(SWT.java:4327) at org.eclipse.swt.widgets.Widget.error(Widget.java:476) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:413) at org.eclipse.swt.widgets.Text.setText(Text.java:2458) at org.eclipse.ui.internal.quickaccess.SearchField$2.doClose(SearchField.java:156) at org.eclipse.ui.internal.quickaccess.SearchField$3.shellClosed(SearchField.java:201) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:98) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4425) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1412) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1397) at org.eclipse.swt.widgets.Shell.closeWidget(Shell.java:646) at org.eclipse.swt.widgets.Shell.close(Shell.java:642) at com.windowtester.runtime.swt.internal.junit.SWTCleanupHandler$1.closeShells(SWTCleanupHandler.java:186) at com.windowtester.runtime.swt.internal.junit.SWTCleanupHandler$1.run(SWTCleanupHandler.java:162)
It looks like it closed the WorkbenchWindow shell and then the quick access shell (which doesn't happen in real life). Please describe how to cause the problem with the vanilla eclipse. PW
I have a fix for https://git.eclipse.org/r/#/c/34419/ I understand if you asking for example if you need to investigate to fix it, but if fix is known and safe to apply, can we just apply the patch? I have same issue with SWTBot tests on RCP app, and fix took 2 minutes, but it may take hours to reproduce it on something else.
(In reply to Elena Laskavaia from comment #2) > I have a fix for > https://git.eclipse.org/r/#/c/34419/ > > I understand if you asking for example if you need to investigate to > fix it, but if fix is known and safe to apply, can we just apply the patch? > > I have same issue with SWTBot tests on RCP app, and fix took 2 minutes, but > it may take hours to reproduce it on something else. The SearchField can assume that is is used in a correct way where the error isn't happening. The guards shouldn't be necessary. We need check which client code is wrong and fix it there.
Client code is testing framework that is doing programmatic shutdown Its SWTBot in my case, but originator reported it from Window tester which is another testing framework. I cannot provide a small example since it is RCP application being tested. I can provide full backtrace, but it probably won't be enough because it will in dispatch loop rather from shutdown call itself.
(In reply to Elena Laskavaia from comment #4) > Client code is testing framework that is doing programmatic shutdown > Its SWTBot in my case, but originator reported it from Window tester > which is another testing framework. I cannot provide a small example since > it is RCP application being tested. I can provide full backtrace, but > it probably won't be enough because it will in dispatch loop rather > from shutdown call itself. This would probably look similar to the one in comment 0 I guess. You could remote debug the running tests and add a breakpoint when the quick access gets closed/disposed. That way you might find out why it is closed two times.
This is my backtrace ENTRY org.eclipse.ui 4 0 2015-02-20 21:53:45.347 !MESSAGE Unhandled event loop exception !STACK 0 org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed) at org.eclipse.swt.SWT.error(SWT.java:4441) at org.eclipse.swt.SWT.error(SWT.java:4356) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:139) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3806) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3444) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at com.reflexit.magiccards_rcp.MAApplication.start(MAApplication.java:103) at org.eclipse.swtbot.eclipse.core.UITestApplication.start(UITestApplication.java:54) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603) at org.eclipse.equinox.launcher.Main.run(Main.java:1465) at org.eclipse.equinox.launcher.Main.main(Main.java:1438) Caused by: org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:4441) at org.eclipse.swt.SWT.error(SWT.java:4356) at org.eclipse.swt.SWT.error(SWT.java:4327) at org.eclipse.swt.widgets.Widget.error(Widget.java:476) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:413) at org.eclipse.swt.widgets.Text.setText(Text.java:2463) at org.eclipse.ui.internal.quickaccess.SearchField$2.doClose(SearchField.java:160) at org.eclipse.ui.internal.quickaccess.SearchField$3.shellClosed(SearchField.java:207) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:98) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4486) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1412) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1397) at org.eclipse.swt.widgets.Shell.closeWidget(Shell.java:647) at org.eclipse.swt.widgets.Shell.close(Shell.java:643) at org.eclipse.swtbot.swt.finder.widgets.SWTBotShell$2.run(SWTBotShell.java:101) at org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable$5.doRun(UIThreadRunnable.java:221) at org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable$1.run(UIThreadRunnable.java:89) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136) ... 25 more
Add related Bug 259895
I think what happened here is bot closes all active shells during reset workbech operation, besides the main eclipse shell. SearchField keeps some sort of invisible shell around which I assume it does not expect to be closed. So when it gets closed it creates havok in the class and bunch of disposed widgets which are not re-created. So patch I created really does not solve the problem...
Submitted another patch in attempt to dispose the shell properly https://git.eclipse.org/r/#/c/34419/ Bug 433746: dispose SearchField shell properly
Dani, are you OK with the latest patch? It looks fine to me.
(In reply to Sergey Prigogin from comment #10) > Dani, are you OK with the latest patch? It looks fine to me. See my comment in Gerrit.
Gerrit change https://git.eclipse.org/r/34419 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=edfd614409db4ba42c88f50ce753c3ffb7fa58b3
Thanks Elena.
Elena, can you validate this fix in one of the latest integration builds?
(In reply to Lars Vogel from comment #14) > Elena, can you validate this fix in one of the latest integration builds? Where integration builds are posted?
(In reply to Elena Laskavaia from comment #15) > (In reply to Lars Vogel from comment #14) > > Elena, can you validate this fix in one of the latest integration builds? > > Where integration builds are posted? The one from today is here: http://download.eclipse.org/eclipse/downloads/drops4/I20150428-0100/ Or in general you find the latest and greatest on the following website: http://download.eclipse.org/eclipse/downloads/
This fix looks like the reason for bug 462467 and needs to be reverted IMHO. The call to quickAccessContents.doClose() would reset the different providers which is no longer being performed. The code in SearchField and the QuickAccessContents subclass is already higgledy-piggledy. Why can't the doClose() perform isDisposed() tests on the text field and the shell?
New Gerrit change created: https://git.eclipse.org/r/46796
I've pushed up an alternative patch: the SearchClosingTest still passes. Note that there are the failures in the QuickAccessTestSuite, specifically QuickAccessDialogTests, that are not caused by this change. The QATS is not currently being run as part of the UiTestSuite. I've opened bug 465842 to track.
Please see bug 462467 comment 9 and let's continue the discussion there.