-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SWTException while SWTCleanupHandler is called #2
Comments
Hi Falk, I vaguely recall an issue with setText being called on the search field even though the widget is already disposed, but it's been a while since my last changes, so I'll have to do some digging:
|
Correctly i merged the branch - Problem is i've got changes on local side which are not entirely on your side so i needed to merge branches and cannot use binaries :( If i can help you out somehow there let me know. |
I was right, it's a bug (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=449485). This bug has been fixed in Eclipse 4.5. We are still working with Eclipse 4.4, that's why I've created a so called "feature patch" that includes the bug fix and gets applied to our "application under test" before testing. Added the feature patch here: https://github.com/fredg02/windowtester/releases/download/6.1.2-beta1-e44x/featurePatch449485.zip Note: make sure that you delete the old plugin jar (org.eclipse.ui.workbench_*.jar) from your plugins folder before applying the feature patch. Please let me know if that works for you. |
Hi fred, forgot to mention that this fixed my problem :) |
Cool. Thanks for the feedback. |
Hi Fred,
today i found a curious issue in our test environment. After switching to 4.4 with our Eclipse RCP application and merging your branch to our local one i got these error at the end of every test:
Exception in thread "WT Test Thread" org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed)
[java] at org.eclipse.swt.SWT.error(SWT.java:4441)
[java] at org.eclipse.swt.SWT.error(SWT.java:4356)
[java] at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:209)
[java] at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:156)
[java] at org.eclipse.swt.widgets.Display.syncExec(Display.java:4590)
[java] at com.windowtester.runtime.swt.internal.junit.SWTCleanupHandler.closeDecendentShells(SWTCleanupHandler.java:155)
[java] at com.windowtester.runtime.swt.internal.junit.SWTCleanupHandler.closeUnexpectedShells(SWTCleanupHandler.java:106)
[java] at com.windowtester.runtime.swt.internal.junit.SWTCleanupHandler.cleanUp(SWTCleanupHandler.java:74)
[java] at com.windowtester.internal.runtime.junit.core.AbstractExecutionMonitor.cleanUp(AbstractExecutionMonitor.java:151)
[java] at com.windowtester.internal.runtime.junit.core.AbstractExecutionMonitor.testFinishing(AbstractExecutionMonitor.java:137)
[java] at com.windowtester.internal.runtime.junit.core.SequenceRunner.runFinishing(SequenceRunner.java:93)
[java] at com.windowtester.internal.runtime.junit.core.SequenceRunner.access$0(SequenceRunner.java:92)
[java] at com.windowtester.internal.runtime.junit.core.SequenceRunner$1.run(SequenceRunner.java:56)
[java] Caused by: org.eclipse.swt.SWTException: Widget is disposed
[java] at org.eclipse.swt.SWT.error(SWT.java:4441)
[java] at org.eclipse.swt.SWT.error(SWT.java:4356)
[java] at org.eclipse.swt.SWT.error(SWT.java:4327)
[java] at org.eclipse.swt.widgets.Widget.error(Widget.java:476)
[java] at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:413)
[java] at org.eclipse.swt.widgets.Text.setText(Text.java:2475)
[java] at org.eclipse.ui.internal.quickaccess.SearchField$2.doClose(SearchField.java:160)
[java] at org.eclipse.ui.internal.quickaccess.SearchField$3.shellClosed(SearchField.j
After debugging i found out, that he seems to collect some views also as Shell and trying to close them results in the thing that they are disposed... do you know of any changes regarding this?
I simply added a try/catch thing around the display.syncExec in closeDecendentShells in line 151 in the file SWTCleanupHandler, so this prevents the tests from throwing away the test result execptions in my case.
The text was updated successfully, but these errors were encountered: