Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[swtbot-dev] SWTWorkbenchBot.closeAllShells()

Hi,

I found a strange issue with SWTBot, and I would like to know if you can reproduce or explain it.
I use SWTBot-2.1.1 on linux, with eclipse kepler.

At the beginning of a test, I call "SWTWorkbenchBot.closeAllShells()".
Theoretically, this method closes all shell but the Eclipse one (I experimentally verified that the Eclipse shell is not closed). Am I right ?

Unfortunately, after this call, a lot of subsequent workbench operations (such as perspective switching, opening a view, closing a view, ...) are throwing exceptions similar to the following one:

---------------------------
!ENTRY org.eclipse.equinox.event 4 0 2014-01-28 09:55:07.835
!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@1f624df6
!STACK 0
java.lang.IllegalArgumentException: Argument not valid
    at org.eclipse.swt.SWT.error(SWT.java:4378)
    at org.eclipse.swt.SWT.error(SWT.java:4312)
    at org.eclipse.swt.SWT.error(SWT.java:4283)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:481)
    at org.eclipse.swt.widgets.Control.setParent(Control.java:4505)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.handleEvent(PartRenderingEngine.java:206) at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:4491)
    [...]
---------------------------

If I remove "SWTWorkbenchBot.closeAllShells()" statement, all goes well.



By the way, I would like to warmly thank you for this great project.
We have deployed SWTBot with jacoco in continuous integration for our product (Kalray produces a massively parallel embedded device, with more that 256 processors, and uses Eclipse as IDE). Thanks to SWTBot, we are able to deploy complex test scenarios, such as remote debugging of multi-platform applications (running on both x86 and our parallel device). I do not know if you have a "testimonial" section in your project, but I'm OK to write one if you want !


Xavier Raynaud


Back to the top