Community
Participate
Working Groups
Build ID: 3.2 Eclipse is calling createPartControl() out of the GUI-Thread For more info:refer question Invalid Thread Access in eclipse.technology.nebula forum More information: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:3374) at org.eclipse.swt.SWT.error(SWT.java:3297) at org.eclipse.swt.SWT.error(SWT.java:3268) at org.eclipse.swt.widgets.Display.error(Display.java:978) at org.eclipse.swt.widgets.Display.checkDevice(Display.java:638) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:1931) at org.eclipse.nebula.widgets.gallery.DefaultGalleryItemRenderer.<init>(DefaultGalleryItemRenderer.java:63) at com.sequenom.everest.ui.project.GalleryView.createPartControl(GalleryView.java:335) at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:332) at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:197) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566) at org.eclipse.ui.internal.WorkbenchPage$ActivationList.setActive(WorkbenchPage.java:3915) at org.eclipse.ui.internal.WorkbenchPage.restoreState(WorkbenchPage.java:2929) at org.eclipse.ui.internal.WorkbenchWindow.restoreState(WorkbenchWindow.java:1936) at org.eclipse.ui.internal.Workbench.doRestoreState(Workbench.java:2857) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1665) at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1650) at org.eclipse.ui.internal.Workbench$17.run(Workbench.java:1529) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1473) at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigur
We need the entire exception. Please attach your .log file from <workspace>/.metadata/.log PW
Created attachment 65200 [details] log file
The attached .log file does not contain the stack trace you put in comment #0.
I don't think this is a Platform bug. Eclipse creates new Composite controls prior to passing it to createPartControl(Composite). If it was being called in a non-UI thread, it would've failed there instead of within your view's implementation. I believe the problem is with the Nebula Gallery widget itself. The DefaultGalleryImageRenderer class (and also the DefaultGalleryGroupRenderer class) uses Display.getDefault(), which, I guess, has the potential of creating another Display which is somehow causing a conflict with the original UI thread from the Platform. Ideally, those two classes should be taking a Display in its constructor and creating the colours from them, if you just try to do the following on a single-monitor environment, it will fail because you are creating a second display. DefaultGalleryGroupRenderer gr = new DefaultGalleryGroupRenderer(); Display display = new Display(); Looking at the original newsgroup posting (http://dev.eclipse.org/newslists/news.eclipse.technology.nebula/msg00672.html), you create the Gallery Nebula widget _before_ you create your renderer. Similar to what I mentioned in the first paragraph, if you were in a non-UI thread, you would _not_ be able to create a Gallery SWT widget (which is just a subclass of Canvas which is a subclass of Composite).
Other people seem to have this problem. See bug 218104.
Marking as a duplicate then. *** This bug has been marked as a duplicate of bug 218104 ***