Error starting eclim: SWTException: Invalid thread access

206 views
Skip to first unread message

miketwo

unread,
Jul 24, 2011, 6:18:33 PM7/24/11
to eclim-user
Hi,

I'm having trouble getting eclim up and running on a new install of OS
X Lion. I've installed Eclipse Indigo and eclipse fresh (as of today)
and have deleted my workspace. Any pointers?


Here's a snapshot of the log:

java -jar "/Applications/eclipse/plugins/
org.eclipse.equinox.launcher_1.2.0.v20110502.jar" -debug -clean -
refresh -application org.eclim.application_headless
Install location:
file:/Applications/eclipse/
Configuration file:
file:/Applications/eclipse/configuration/config.ini loaded
Configuration location:
file:/Applications/eclipse/configuration/
Framework located:
file:/Applications/eclipse/plugins/
org.eclipse.osgi_3.7.0.v20110613.jar
Framework classpath:
file:/Applications/eclipse/plugins/
org.eclipse.osgi_3.7.0.v20110613.jar
Debug options:
file:/Applications/eclipse/.options not found
Time to load bundles: 106
Starting application: 11949
2011-07-24 18:12:12,768 INFO
[org.eclim.eclipse.AbstractEclimApplication] Workspace: /Users/mike/
Documents/workspace
2011-07-24 18:12:12,770 INFO
[org.eclim.eclipse.AbstractEclimApplication] Starting eclim...
***WARNING: Display must be created on main thread due to Cocoa
restrictions.
2011-07-24 18:12:12,942 ERROR
[org.eclim.eclipse.AbstractEclimApplication] Error starting eclim:
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4282)
at org.eclipse.swt.SWT.error(SWT.java:4197)
at org.eclipse.swt.SWT.error(SWT.java:4168)
at org.eclipse.swt.widgets.Display.error(Display.java:1065)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:822)
at org.eclipse.swt.widgets.Display.create(Display.java:805)
at org.eclipse.swt.graphics.Device.<init>(Device.java:130)
at org.eclipse.swt.widgets.Display.<init>(Display.java:696)
at org.eclipse.swt.widgets.Display.<init>(Display.java:687)
at org.eclipse.swt.widgets.EclimDisplay.<init>(EclimDisplay.java:42)
at
org.eclim.eclipse.EclimApplicationHeadless.onStart(EclimApplicationHeadless.java:
73)
at
org.eclim.eclipse.AbstractEclimApplication.start(AbstractEclimApplication.java:
108)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:
110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:
79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
344)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

Eric Van Dewoestine

unread,
Jul 24, 2011, 7:00:40 PM7/24/11
to eclim...@googlegroups.com

It seems as though the eclimd script is not properly detecting that
Lion is OSX. Can you send me the result of running the following from
a command line:

$ echo $OSTYPE
$ uname -a


As a workaround you should be able to add the following to your
~/.eclimrc file:

-XstartOnFirstThread

--
eric

miketwo

unread,
Jul 24, 2011, 7:08:59 PM7/24/11
to eclim-user
Eric,

Thanks, -XstartOnFirstThread did the job.

Here are the results from echo $OSTYPE and uname -a:
darwin11.0
Darwin mba.home 11.0.0 Darwin Kernel Version 11.0.0: Sat Jun 18
12:56:35 PDT 2011; root:xnu-1699.22.73~1/RELEASE_X86_64 x86_64

Thanks again -- eclim is an incredible piece of software!


-Mike

Eric Van Dewoestine

unread,
Jul 24, 2011, 8:55:08 PM7/24/11
to eclim...@googlegroups.com
On 2011-07-24 16:08:59, miketwo wrote:
> Eric,
>
> Thanks, -XstartOnFirstThread did the job.
>
> Here are the results from echo $OSTYPE and uname -a:
> darwin11.0
> Darwin mba.home 11.0.0 Darwin Kernel Version 11.0.0: Sat Jun 18
> 12:56:35 PDT 2011; root:xnu-1699.22.73~1/RELEASE_X86_64 x86_64
>
> Thanks again -- eclim is an incredible piece of software!
>
>
> -Mike

I just checked in a change[1] to the eclimd script. Can you remove
the -XstartOnFirstThread option from your ~/.eclimrc and patch[2] or
replace your $ECLIPSE_HOME/plugins/org.eclim_<verson>/bin/eclimd
script with the new version[3] and let me know if it properly adds the
-XstartOnFirstThread for you now?

[1] https://github.com/ervandew/eclim/commit/880566c1cec49636829ecd5ecae4c541e7155747
[2] https://github.com/ervandew/eclim/commit/880566c1cec49636829ecd5ecae4c541e7155747.patch
[3] https://raw.github.com/ervandew/eclim/880566c1cec49636829ecd5ecae4c541e7155747/src/shell/eclimd

--
eric

miketwo

unread,
Jul 25, 2011, 2:20:46 AM7/25/11
to eclim-user
Eric,

I removed -XstartOnFirstThread from ~/.eclimrc and replaced the script
with the new version and it properly adds -XstartOnFirstThread.

Thanks!

On Jul 24, 8:55 pm, Eric Van Dewoestine <ervan...@gmail.com> wrote:
> On 2011-07-24 16:08:59, miketwo wrote:
>
> > Eric,
>
> > Thanks, -XstartOnFirstThread did the job.
>
> > Here are the results from echo $OSTYPE and uname -a:
> > darwin11.0
> > Darwin mba.home 11.0.0 Darwin Kernel Version 11.0.0: Sat Jun 18
> > 12:56:35 PDT 2011; root:xnu-1699.22.73~1/RELEASE_X86_64 x86_64
>
> > Thanks again -- eclim is an incredible piece of software!
>
> > -Mike
>
> I just checked in a change[1] to the eclimd script.  Can you remove
> the -XstartOnFirstThread option from your ~/.eclimrc and patch[2] or
> replace your $ECLIPSE_HOME/plugins/org.eclim_<verson>/bin/eclimd
> script with the new version[3] and let me know if it properly adds the
> -XstartOnFirstThread for you now?
>
> [1]https://github.com/ervandew/eclim/commit/880566c1cec49636829ecd5ecae4...
> [2]https://github.com/ervandew/eclim/commit/880566c1cec49636829ecd5ecae4...
> [3]https://raw.github.com/ervandew/eclim/880566c1cec49636829ecd5ecae4c54...
>
> --
> eric

doughanks

unread,
Jul 27, 2011, 1:30:10 AM7/27/11
to eclim-user
Hi. I'm getting the same invalid thread access error in Windows 7.

From within Eclipse, when I open a file with the vim editor (open
with), 3 errors are thrown with the same thread access error. The
editor does work and the eclim commands seem to work okay after the
error dialogs are cleared.

I'm running Eclipse 3.7 with PDT and gVim 7.3. I'm using the embedded
editor option, but the same errors are thrown if I turn the embed
option off.

I tried adding the -XstartOnFirstThread option to my eclimd.bat file,
but it did not have any affect.

Is there a trick for Windows users to keep this error from occurring?

Here are the 3 entries from the log file:

!ENTRY org.eclipse.ui.workbench 4 0 2011-07-27 00:19:35.328
!MESSAGE Invalid thread access
!STACK 0
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4282)
at org.eclipse.swt.SWT.error(SWT.java:4197)
at org.eclipse.swt.SWT.error(SWT.java:4168)
at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
at org.eclipse.swt.widgets.Widget.getData(Widget.java:525)
at
org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getTab(DefaultTabFolder.java:
186)
at
org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getItems(DefaultTabFolder.java:
238)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder.findItem(AbstractTabFolder.java:
171)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.getTab(PresentablePartFolder.java:
375)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.childPropertyChanged(PresentablePartFolder.java:
304)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.access
$2(PresentablePartFolder.java:303)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder
$3.propertyChanged(PresentablePartFolder.java:83)
at
org.eclipse.ui.internal.presentations.PresentablePart.firePropertyChange(PresentablePart.java:
137)
at org.eclipse.ui.internal.presentations.PresentablePart
$1.propertyChanged(PresentablePart.java:97)
at org.eclipse.ui.internal.PartPane.firePropertyChange(PartPane.java:
620)
at org.eclipse.ui.internal.PartPane.propertyChanged(PartPane.java:
625)
at
org.eclipse.ui.internal.WorkbenchPartReference.immediateFirePropertyChange(WorkbenchPartReference.java:
571)
at
org.eclipse.ui.internal.WorkbenchPartReference.firePropertyChange(WorkbenchPartReference.java:
564)
at
org.eclipse.ui.internal.WorkbenchPartReference.deferEvents(WorkbenchPartReference.java:
219)
at
org.eclipse.ui.internal.WorkbenchPartReference.refreshFromPart(WorkbenchPartReference.java:
328)
at
org.eclipse.ui.internal.WorkbenchPartReference.partPropertyChanged(WorkbenchPartReference.java:
296)
at
org.eclipse.ui.internal.EditorReference.partPropertyChanged(EditorReference.java:
501)
at org.eclipse.ui.internal.WorkbenchPartReference
$2.propertyChanged(WorkbenchPartReference.java:181)
at
org.eclipse.ui.part.WorkbenchPart.firePropertyChange(WorkbenchPart.java:
129)
at
org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange(AbstractTextEditor.java:
6355)
at
org.eclipse.ui.part.WorkbenchPart.internalSetContentDescription(WorkbenchPart.java:
451)
at
org.eclipse.ui.part.WorkbenchPart.setContentDescription(WorkbenchPart.java:
437)
at
org.eclipse.ui.part.EditorPart.setContentDescription(EditorPart.java:
256)
at org.vimplugin.editors.VimEditor.setTitleTo(VimEditor.java:664)
at org.vimplugin.listeners.FileOpened.handleEvent(FileOpened.java:38)
at org.vimplugin.VimConnection.run(VimConnection.java:159)
at java.lang.Thread.run(Unknown Source)

!ENTRY org.eclipse.ui.workbench 4 0 2011-07-27 00:19:35.331
!MESSAGE Invalid thread access
!STACK 0
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4282)
at org.eclipse.swt.SWT.error(SWT.java:4197)
at org.eclipse.swt.SWT.error(SWT.java:4168)
at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
at org.eclipse.swt.widgets.Widget.getData(Widget.java:525)
at
org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getTab(DefaultTabFolder.java:
186)
at
org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.getItems(DefaultTabFolder.java:
238)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder.findItem(AbstractTabFolder.java:
171)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.getTab(PresentablePartFolder.java:
375)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.childPropertyChanged(PresentablePartFolder.java:
304)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.access
$2(PresentablePartFolder.java:303)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder
$3.propertyChanged(PresentablePartFolder.java:83)
at
org.eclipse.ui.internal.presentations.PresentablePart.firePropertyChange(PresentablePart.java:
137)
at org.eclipse.ui.internal.presentations.PresentablePart
$1.propertyChanged(PresentablePart.java:97)
at org.eclipse.ui.internal.PartPane.firePropertyChange(PartPane.java:
620)
at org.eclipse.ui.internal.PartPane.propertyChanged(PartPane.java:
625)
at
org.eclipse.ui.internal.WorkbenchPartReference.immediateFirePropertyChange(WorkbenchPartReference.java:
571)
at
org.eclipse.ui.internal.WorkbenchPartReference.firePropertyChange(WorkbenchPartReference.java:
564)
at
org.eclipse.ui.internal.WorkbenchPartReference.deferEvents(WorkbenchPartReference.java:
219)
at
org.eclipse.ui.internal.WorkbenchPartReference.refreshFromPart(WorkbenchPartReference.java:
328)
at
org.eclipse.ui.internal.WorkbenchPartReference.partPropertyChanged(WorkbenchPartReference.java:
296)
at
org.eclipse.ui.internal.EditorReference.partPropertyChanged(EditorReference.java:
501)
at org.eclipse.ui.internal.WorkbenchPartReference
$2.propertyChanged(WorkbenchPartReference.java:181)
at
org.eclipse.ui.part.WorkbenchPart.firePropertyChange(WorkbenchPart.java:
129)
at
org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange(AbstractTextEditor.java:
6355)
at org.vimplugin.editors.VimEditor.setTitleTo(VimEditor.java:665)
at org.vimplugin.listeners.FileOpened.handleEvent(FileOpened.java:38)
at org.vimplugin.VimConnection.run(VimConnection.java:159)
at java.lang.Thread.run(Unknown Source)

!ENTRY org.eclipse.ui.workbench 4 0 2011-07-27 00:19:35.333
!MESSAGE Invalid thread access
!STACK 0
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4282)
at org.eclipse.swt.SWT.error(SWT.java:4197)
at org.eclipse.swt.SWT.error(SWT.java:4168)
at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
at org.eclipse.swt.widgets.Decorations.getText(Decorations.java:730)
at
org.eclipse.ui.internal.WorkbenchWindowConfigurer.getTitle(WorkbenchWindowConfigurer.java:
311)
at
org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.recomputeTitle(IDEWorkbenchWindowAdvisor.java:
421)
at
org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.access
$2(IDEWorkbenchWindowAdvisor.java:419)
at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor
$1.propertyChanged(IDEWorkbenchWindowAdvisor.java:108)
at
org.eclipse.ui.part.WorkbenchPart.firePropertyChange(WorkbenchPart.java:
129)
at
org.eclipse.ui.texteditor.AbstractTextEditor.firePropertyChange(AbstractTextEditor.java:
6355)
at org.vimplugin.editors.VimEditor.setTitleTo(VimEditor.java:665)
at org.vimplugin.listeners.FileOpened.handleEvent(FileOpened.java:38)
at org.vimplugin.VimConnection.run(VimConnection.java:159)
at java.lang.Thread.run(Unknown Source)

Thanks,
Doug

Eric Van Dewoestine

unread,
Jul 27, 2011, 4:15:38 PM7/27/11
to eclim...@googlegroups.com
On 2011-07-26 22:30:10, doughanks wrote:
> Hi. I'm getting the same invalid thread access error in Windows 7.
>
> From within Eclipse, when I open a file with the vim editor (open
> with), 3 errors are thrown with the same thread access error. The
> editor does work and the eclim commands seem to work okay after the
> error dialogs are cleared.
>
> I'm running Eclipse 3.7 with PDT and gVim 7.3. I'm using the embedded
> editor option, but the same errors are thrown if I turn the embed
> option off.
>
> I tried adding the -XstartOnFirstThread option to my eclimd.bat file,
> but it did not have any affect.

Yeah, the -XstartOnFirstThread arg is a OSX only thing as far as I
know.

> Is there a trick for Windows users to keep this error from occurring?

Unfortunately I don't have Windows 7 to test with, but I'll see if I
can reproduce the issue on my Windows XP vm as soon as I get a chance.

--
eric

doughanks

unread,
Jul 29, 2011, 11:41:33 PM7/29/11
to eclim-user
Eric, I reinstalled eclipse and started a new workspace and the
problem does not exist in this fresh environment. I guess something
in my old install or workspace was corrupt. Everything is working
fine now. I appreciate any time you spent in looking at this.

Thanks,
Doug

Eric Van Dewoestine

unread,
Jul 30, 2011, 1:06:18 PM7/30/11
to eclim...@googlegroups.com
On 2011-07-29 20:41:33, doughanks wrote:
> Eric, I reinstalled eclipse and started a new workspace and the
> problem does not exist in this fresh environment. I guess something
> in my old install or workspace was corrupt. Everything is working
> fine now. I appreciate any time you spent in looking at this.
>
> Thanks,
> Doug

I have a feeling the error probably has something to do with eclipse's
bundle caching. If the problem happens again, starting eclipse with
the -clean argument may fix it without having to reinstall. If you
find a sequence of events to reproduce the error just let me know and
I'll see what I can do to resolve the issue.

--
eric

Reply all
Reply to author
Forward
0 new messages