Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[swtbot-dev] 答复:"org.eclipse.swt.SWTException: Invalid thread access" in SWTBot Headless

Hi All:
    I got the solution at:http://xerus.zugaina.org/dotclear/index.php?tag/eclipse.
   Sorry for any inconvenience.
RegardsX
At 2012-01-11 21:55:59,"邢云" <mouzonherry@xxxxxxx> wrote:
Hi Guys:
   Test case works well in my Eclipse development but gets this error in test automation with SWTBot Headless

   Test code:
          Shell s = Display.getDefault().getActiveShell();
          wizardPage.createControl(s);

   Error:
   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)
  .............................

   Tried: 
 I googled it and added " -XstartOnFirstThread " as JVM arg to SWTBot headless. No tests was executed, then. It is the same with http://www.eclipse.org/forums/index.php/t/175576/.


  My server is SUSE Linux 64bit.

  How can I do with it? Thanks a lot!

Regards
Xing Yun





Back to the top