Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 184413 - [WorkbenchLauncher] Invalid Thread access --
Summary: [WorkbenchLauncher] Invalid Thread access --
Status: RESOLVED DUPLICATE of bug 218104
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 major with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact: Boris Bokowski CLA
URL: http://www.eclipse.org/newsportal/art...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-27 07:35 EDT by Kandepu Ramesh CLA
Modified: 2009-04-27 22:30 EDT (History)
2 users (show)

See Also:


Attachments
log file (759.52 KB, text/plain)
2007-04-27 08:47 EDT, Kandepu Ramesh CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kandepu Ramesh CLA 2007-04-27 07:35:07 EDT
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
Comment 1 Paul Webster CLA 2007-04-27 07:41:28 EDT
We need the entire exception.  Please attach your .log file from <workspace>/.metadata/.log

PW
Comment 2 Kandepu Ramesh CLA 2007-04-27 08:47:14 EDT
Created attachment 65200 [details]
log file
Comment 3 Boris Bokowski CLA 2007-04-27 17:00:33 EDT
The attached .log file does not contain the stack trace you put in comment #0.
Comment 4 Remy Suen CLA 2007-08-29 14:14:07 EDT
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).
Comment 5 Remy Suen CLA 2009-04-16 12:50:42 EDT
Other people seem to have this problem. See bug 218104.
Comment 6 Boris Bokowski CLA 2009-04-27 22:30:00 EDT
Marking as a duplicate then.

*** This bug has been marked as a duplicate of bug 218104 ***