Community
Participate
Working Groups
Build Identifier: 20100917-0705 on Cocoa platform, SWT UI Thread needs to run on main thread. It is a cocoa restriction.If you use SWTBotApplicationLauncherClassRunner on Mac OSX, you'll get the follow message. ***WARNING: Display must be created on main thread due to Cocoa restrictions. Exception in thread "Thread-2" 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:794) 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.kompiro.jamcircle.scripting.ui.internal.action.MockActionRunner.startApplication(MockActionRunner.java:21) at org.eclipse.swtbot.swt.finder.junit.SWTBotApplicationLauncherClassRunner$1.run(SWTBotApplicationLauncherClassRunner.java:63) at java.lang.Thread.run(Thread.java:680) SWTBotApplicationLauncherClassRunner creates Display on another thread. So it can't use on cocoa platform. Reproducible: Always
Created attachment 183634 [details] suggested source I suggest to change point of view to think SWTBot's TestRunner like attachment source.The attached source is start on main thread, and running test on another thread.
Correct me if I am wrong but this is not related to GEFBot. This is may be related to (or a duplicate of) bug 308425.
Marking as dup. Fixing this on cocoa is turning out to be a nightmare. Any suggestions to improve the situation are welcome. I'm myself stuck with development of swtbot on carbon 32bit. *** This bug has been marked as a duplicate of bug 308425 ***