Invalid Thread Access during DebugUIPlugin.start() [message #323614] |
Thu, 03 January 2008 17:22  |
Eclipse User |
|
|
|
Originally posted by: david.c.pace.gmail.com
Hello,
In my RCP application (based on Eclipse 3.3), if I hover over some text
in my editor and the org.eclipse.debug.ui plugin has not yet been
activated, I get an Invalid Thread Access SWTException.
My editor's ITextHover calls DebugUITools.getDebugContext() when
determining what hover text to display. It does not do this on the UI
thread.
Because the plugin has not been activated at this point, the bundle
activation is started from a non-UI thread and the SWTException is thrown.
Should the DebugUIPlugin.start() method be making any calls that require
the UI thread?
It seems like this is a bug similar to:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=79757.
Below is the stack trace from the DebugUIPlugin.start() method call.
The invalid access comes from the default preference initializer.
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:3563)
at org.eclipse.swt.SWT.error(SWT.java:3481)
at org.eclipse.swt.SWT.error(SWT.java:3452)
at org.eclipse.swt.widgets.Display.error(Display.java:1137)
at org.eclipse.swt.widgets.Display.checkDevice(Display.java:666 )
at org.eclipse.swt.widgets.Display.getSystemColor(Display.java: 2129)
at
org.eclipse.debug.internal.ui.DebugUIPreferenceInitializer.i nitializeDefaultPreferences(DebugUIPreferenceInitializer.jav a:79)
at
org.eclipse.core.internal.preferences.PreferenceServiceRegis tryHelper.runInitializer(PreferenceServiceRegistryHelper.jav a:276)
at
org.eclipse.core.internal.preferences.PreferenceServiceRegis tryHelper.applyRuntimeDefaults(PreferenceServiceRegistryHelp er.java:130)
at
org.eclipse.core.internal.preferences.PreferencesService.app lyRuntimeDefaults(PreferencesService.java:337)
at
org.eclipse.core.internal.preferences.DefaultPreferences.app lyRuntimeDefaults(DefaultPreferences.java:163)
at
org.eclipse.core.internal.preferences.DefaultPreferences.loa dDefaults(DefaultPreferences.java:236)
at
org.eclipse.core.internal.preferences.DefaultPreferences.loa d(DefaultPreferences.java:232)
at
org.eclipse.core.internal.preferences.EclipsePreferences.cre ate(EclipsePreferences.java:307)
at
org.eclipse.core.internal.preferences.EclipsePreferences.int ernalNode(EclipsePreferences.java:543)
at
org.eclipse.core.internal.preferences.EclipsePreferences.nod e(EclipsePreferences.java:662)
at
org.eclipse.core.internal.preferences.AbstractScope.getNode( AbstractScope.java:38)
at
org.eclipse.core.runtime.preferences.DefaultScope.getNode(De faultScope.java:67)
at
org.eclipse.ui.preferences.ScopedPreferenceStore.getDefaultP references(ScopedPreferenceStore.java:247)
at
org.eclipse.ui.preferences.ScopedPreferenceStore.getPreferen ceNodes(ScopedPreferenceStore.java:281)
at
org.eclipse.ui.preferences.ScopedPreferenceStore.internalGet (ScopedPreferenceStore.java:471)
at
org.eclipse.ui.preferences.ScopedPreferenceStore.getString(S copedPreferenceStore.java:531)
at
org.eclipse.debug.internal.ui.launchConfigurations.Perspecti veManager.initPerspectives(PerspectiveManager.java:947)
at
org.eclipse.debug.internal.ui.launchConfigurations.Perspecti veManager.startup(PerspectiveManager.java:252)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.start(DebugUIPlu gin.java:499)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:260)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:111)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:417)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:37)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:405)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:369)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:357)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
....
-Dave
|
|
|
|
Re: Invalid Thread Access during DebugUIPlugin.start() [message #323667 is a reply to message #323623] |
Fri, 04 January 2008 18:17  |
Eclipse User |
|
|
|
Originally posted by: david.c.pace.gmail.com
Thanks for the quick response Ed.
I filed a bug but it was a duplicate of a bug 193317 that had been fixed
in 3.3.1. We'll upgrade our target platform to 3.3.1 to resolve the issue.
thanks,
Dave
Ed Merks wrote:
> Dave,
>
> I'm surprised that DebugUIPlugin.start would do things that require
> being on the GUI thread. Maybe that's necessary but it seems like a
> problematic thing. It seems the other bug was fixed though, so maybe a
> new such issue has crept back in, so perhaps that's worth another
> bugzilla. It might be best to have DebugUITools.getDebugContext() be
> called on the UI thread to avoid the problem (or at least call it there
> once to force bundle activation)...
>
>
> Dave Pace wrote:
>> Hello,
>>
>> In my RCP application (based on Eclipse 3.3), if I hover over some
>> text in my editor and the org.eclipse.debug.ui plugin has not yet been
>> activated, I get an Invalid Thread Access SWTException.
>>
>> My editor's ITextHover calls DebugUITools.getDebugContext() when
>> determining what hover text to display. It does not do this on the UI
>> thread.
>>
>> Because the plugin has not been activated at this point, the bundle
>> activation is started from a non-UI thread and the SWTException is
>> thrown.
>>
>> Should the DebugUIPlugin.start() method be making any calls that
>> require the UI thread?
>>
>> It seems like this is a bug similar to:
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=79757.
>>
>> Below is the stack trace from the DebugUIPlugin.start() method call.
>> The invalid access comes from the default preference initializer.
>>
>> org.eclipse.swt.SWTException: Invalid thread access
>> at org.eclipse.swt.SWT.error(SWT.java:3563)
>> at org.eclipse.swt.SWT.error(SWT.java:3481)
>> at org.eclipse.swt.SWT.error(SWT.java:3452)
>> at org.eclipse.swt.widgets.Display.error(Display.java:1137)
>> at org.eclipse.swt.widgets.Display.checkDevice(Display.java:666 )
>> at org.eclipse.swt.widgets.Display.getSystemColor(Display.java: 2129)
>> at
>> org.eclipse.debug.internal.ui.DebugUIPreferenceInitializer.i nitializeDefaultPreferences(DebugUIPreferenceInitializer.jav a:79)
>>
>> at
>> org.eclipse.core.internal.preferences.PreferenceServiceRegis tryHelper.runInitializer(PreferenceServiceRegistryHelper.jav a:276)
>>
>> at
>> org.eclipse.core.internal.preferences.PreferenceServiceRegis tryHelper.applyRuntimeDefaults(PreferenceServiceRegistryHelp er.java:130)
>>
>> at
>> org.eclipse.core.internal.preferences.PreferencesService.app lyRuntimeDefaults(PreferencesService.java:337)
>>
>> at
>> org.eclipse.core.internal.preferences.DefaultPreferences.app lyRuntimeDefaults(DefaultPreferences.java:163)
>>
>> at
>> org.eclipse.core.internal.preferences.DefaultPreferences.loa dDefaults(DefaultPreferences.java:236)
>>
>> at
>> org.eclipse.core.internal.preferences.DefaultPreferences.loa d(DefaultPreferences.java:232)
>>
>> at
>> org.eclipse.core.internal.preferences.EclipsePreferences.cre ate(EclipsePreferences.java:307)
>>
>> at
>> org.eclipse.core.internal.preferences.EclipsePreferences.int ernalNode(EclipsePreferences.java:543)
>>
>> at
>> org.eclipse.core.internal.preferences.EclipsePreferences.nod e(EclipsePreferences.java:662)
>>
>> at
>> org.eclipse.core.internal.preferences.AbstractScope.getNode( AbstractScope.java:38)
>>
>> at
>> org.eclipse.core.runtime.preferences.DefaultScope.getNode(De faultScope.java:67)
>>
>> at
>> org.eclipse.ui.preferences.ScopedPreferenceStore.getDefaultP references(ScopedPreferenceStore.java:247)
>>
>> at
>> org.eclipse.ui.preferences.ScopedPreferenceStore.getPreferen ceNodes(ScopedPreferenceStore.java:281)
>>
>> at
>> org.eclipse.ui.preferences.ScopedPreferenceStore.internalGet (ScopedPreferenceStore.java:471)
>>
>> at
>> org.eclipse.ui.preferences.ScopedPreferenceStore.getString(S copedPreferenceStore.java:531)
>>
>> at
>> org.eclipse.debug.internal.ui.launchConfigurations.Perspecti veManager.initPerspectives(PerspectiveManager.java:947)
>>
>> at
>> org.eclipse.debug.internal.ui.launchConfigurations.Perspecti veManager.startup(PerspectiveManager.java:252)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin.start(DebugUIPlu gin.java:499)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
>>
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
>>
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:974)
>>
>> at
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
>>
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:260)
>>
>> at
>> org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:400)
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:111)
>>
>> at
>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:417)
>>
>> at
>> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:189)
>>
>> at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:340)
>>
>> at
>> org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:37)
>>
>> at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:405)
>>
>> at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:369)
>>
>> at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:357)
>>
>> at
>> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:83)
>>
>> at java.lang.ClassLoader.loadClass(Unknown Source)
>> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>> ...
>>
>> -Dave
|
|
|
Powered by
FUDForum. Page generated in 0.27415 seconds