Project: JDT
Bug 36554 JDT/UI plugin activation fails when activated in non UI thread
Reported: 2003-04-16 04:02:29 | Status: verified fixed

2.1 Activating the JDT/UI plug-in in a non UI thread fails with an SWT.Error. The stack trace is: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:2332) at org.eclipse.swt.SWT.error(SWT.java:2262) at org.eclipse.swt.widgets.Widget.error(Widget.java:385) at org.eclipse.swt.widgets.Shell.<init>(Shell.java:246) at org.eclipse.swt.widgets.Shell.<init>(Shell.java:237) at org.eclipse.swt.widgets.Shell.<init>(Shell.java:190) at org.eclipse.swt.widgets.Shell.<init>(Shell.java:128) at org.eclipse.jface.resource.FontRegistry.defaultFont (FontRegistry.java:293) at org.eclipse.jface.resource.FontRegistry.get(FontRegistry.java:370) at org.eclipse.jface.resource.JFaceResources.getFont (JFaceResources.java:183) at org.eclipse.jdt.internal.ui.JavaPlugin.startup(JavaPlugin.java:241) at org.eclipse.core.internal.plugins.PluginDescriptor$1.run (PluginDescriptor.java:728) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:889) at org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation (PluginDescriptor.java:740) at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation (PluginDescriptor.java:188) at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin (PluginClassLoader.java:112) at org.eclipse.core.internal.plugins.PluginClassLoader.internalFindClassParentsSel f(PluginClassLoader.java:185) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassParentsSelf (DelegatingURLClassLoader.java:490) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass (DelegatingURLClassLoader.java:882) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.access$0 (DelegatingURLClassLoader.java:876) at org.eclipse.core.internal.boot.DelegatingURLClassLoader$DelegateLoader.loadClas s(DelegatingURLClassLoader.java:90) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassPrerequisites (DelegatingURLClassLoader.java:554) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass (DelegatingURLClassLoader.java:890) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass (DelegatingURLClassLoader.java:862) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.getConstructor(Unknown Source) at org.eclipse.core.internal.plugins.PluginDescriptor.internalDoPluginActivation (PluginDescriptor.java:701) at org.eclipse.core.internal.plugins.PluginDescriptor.doPluginActivation (PluginDescriptor.java:188) at org.eclipse.core.internal.plugins.PluginClassLoader.activatePlugin (PluginClassLoader.java:112) at org.eclipse.core.internal.plugins.PluginClassLoader.internalFindClassParentsSel f(PluginClassLoader.java:185) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassParentsSelf (DelegatingURLClassLoader.java:485) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass (DelegatingURLClassLoader.java:882) at org.eclipse.core.internal.boot.DelegatingURLClassLoader.loadClass (DelegatingURLClassLoader.java:862) at java.lang.ClassLoader.loadClass(Unknown Source) at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension (PluginDescriptor.java:130) at org.eclipse.core.internal.plugins.PluginDescriptor.createExecutableExtension (PluginDescriptor.java:167) at org.eclipse.core.internal.plugins.ConfigurationElement.createExecutableExtensio n(ConfigurationElement.java:103) at org.eclipse.core.internal.events.BuildManager.instantiateBuilder (BuildManager.java:555) at org.eclipse.core.internal.events.BuildManager.initializeBuilder (BuildManager.java:509) at org.eclipse.core.internal.events.BuildManager.getBuilder (BuildManager.java:359) at org.eclipse.core.internal.events.BuildManager.basicBuild (BuildManager.java:170) at org.eclipse.core.internal.events.BuildManager.basicBuild (BuildManager.java:191) at org.eclipse.core.internal.events.BuildManager$1.run (BuildManager.java:151) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:889) at org.eclipse.core.runtime.Platform.run(Platform.java:413) at org.eclipse.core.internal.events.BuildManager.basicBuild (BuildManager.java:165) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop (BuildManager.java:243) at org.eclipse.core.internal.events.BuildManager.build (BuildManager.java:212) at org.eclipse.core.internal.resources.Workspace.endOperation (Workspace.java:884) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1600) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:85) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:101)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java