Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » InvalidThreadAccess when starting SWTBot in headless mode
InvalidThreadAccess when starting SWTBot in headless mode [message #559432] Thu, 16 September 2010 15:20 Go to next message
Gabriel Petrovay is currently offline Gabriel Petrovay
Messages: 42
Registered: July 2009
Member
Hi Ketan,

Are you aware of the following error? Should we make a bug out of it?

I am trying to run SWTBot in headless mode on a Mac OSX 10.6 64 bit and I get:


org.eclipse.swt.SWTException: Invalid thread access
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.Display.error(Display.java:1027)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:7 94)
at org.eclipse.swt.widgets.Display.create(Display.java:777)
at org.eclipse.swt.graphics.Device.<init>(Device.java:130)
at org.eclipse.swt.widgets.Display.<init>(Display.java:668)
at org.eclipse.swt.widgets.Display.<init>(Display.java:659)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.ja va:707)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at org.eclipse.ui.internal.ide.application.IDEApplication.creat eDisplay(IDEApplication.java:145)
at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:88)
at org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication .start(UITestApplication.java:53)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run (MainApplicationLauncher.java:32)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
at org.eclipse.core.launcher.Main.main(Main.java:34)


Regards,
Gabriel
Re: InvalidThreadAccess when starting SWTBot in headless mode [message #560205 is a reply to message #559432] Tue, 21 September 2010 14:43 Go to previous message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
The thread that dumps this stack trace contains the main method, and is
the main thread. It appears that there is something else that is
creating the display in a different (non-main) thread before the
UITestApplication starts it.

Also could you check that you've set the -XstartOnFirstThread jvm flag
on the jvm when running headless ?

--
Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot

On 9/16/10 8:20 AM, Gabriel Petrovay wrote:
> Hi Ketan,
>
> Are you aware of the following error? Should we make a bug out of it?
>
> I am trying to run SWTBot in headless mode on a Mac OSX 10.6 64 bit and
> I get:
>
>
> org.eclipse.swt.SWTException: Invalid thread access
> 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.Display.error(Display.java:1027)
> at org.eclipse.swt.widgets.Display.createDisplay(Display.java:7 94)
> at org.eclipse.swt.widgets.Display.create(Display.java:777)
> at org.eclipse.swt.graphics.Device.<init>(Device.java:130)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:668)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:659)
> at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.ja va:707)
> at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
> at org.eclipse.ui.internal.ide.application.IDEApplication.creat
> eDisplay(IDEApplication.java:145)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start
> (IDEApplication.java:88)
> at org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication
> .start(UITestApplication.java:53)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips
> eAppHandle.java:196)
> at org.eclipse.equinox.internal.app.MainApplicationLauncher.run
> (MainApplicationLauncher.java:32)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher
> .runApplication(EclipseAppLauncher.java:110)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher
> .start(EclipseAppLauncher.java:79)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS
> tarter.java:369)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS
> tarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
> ssorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
> at org.eclipse.core.launcher.Main.main(Main.java:34)
>
>
> Regards,
> Gabriel
Previous Topic:Close and open the workbench in a test
Next Topic:Issues with the forums
Goto Forum:
  


Current Time: Sat Sep 20 02:10:44 GMT 2014

Powered by FUDForum. Page generated in 0.01721 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software