Bug 827685 - MercurialEclipsePlugin gives org.eclipse.swt.SWTError Invalid thread access with eclipse 4.2 (Juno)
MercurialEclipsePlugin gives org.eclipse.swt.SWTError Invalid thread access w...
Product: Fedora
Classification: Fedora
Component: eclipse-mercurial (Show other bugs)
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Severin Gehwolf
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-06-02 05:23 EDT by Thomas Meyer
Modified: 2013-07-08 17:19 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-08 17:19:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Thomas Meyer 2012-06-02 05:23:46 EDT
Description of problem:
class com.vectrace.MercurialEclipse.MercurialEclipsePlugin fails with "Invalid thread access" on eclipse.

After upgrading from Fedora 16 to 17 this package is still installed:

But this version crashes eclipse with stack traces like:
!ENTRY org.eclipse.core.jobs 4 2 2012-06-02 11:02:05.637
!MESSAGE Während "Changeset detection" ist ein interner Fehler aufgetreten.
org.eclipse.swt.SWTError: Invalid thread access
	at org.eclipse.ui.plugin.AbstractUIPlugin.createImageRegistry(AbstractUIPlugin.java:212)
	at org.eclipse.ui.plugin.AbstractUIPlugin.getImageRegistry(AbstractUIPlugin.java:256)
	at com.vectrace.MercurialEclipse.MercurialEclipsePlugin.getImageDescriptor(MercurialEclipsePlugin.java:312)
	at com.vectrace.MercurialEclipse.views.console.HgConsole.<init>(HgConsole.java:74)
	at com.vectrace.MercurialEclipse.views.console.HgConsoleHolder.init(HgConsoleHolder.java:59)
	at com.vectrace.MercurialEclipse.views.console.HgConsoleHolder.getConsole(HgConsoleHolder.java:135)
	at com.vectrace.MercurialEclipse.DefaultConfiguration.commandInvoked(DefaultConfiguration.java:101)
	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.logConsoleCommandInvoked(AbstractShellCommand.java:551)
	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToStream(AbstractShellCommand.java:411)
	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToBytes(AbstractShellCommand.java:388)
	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToString(AbstractShellCommand.java:611)
	at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToString(AbstractShellCommand.java:607)
	at com.vectrace.MercurialEclipse.commands.HgDebugInstallClient.hgSupportsEncoding(HgDebugInstallClient.java:54)
	at com.vectrace.MercurialEclipse.team.MercurialTeamProvider$3.run(MercurialTeamProvider.java:324)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

After removing eclipse-mercurial, eclipse comes up as expected.

Version-Release number of selected component (if applicable):
$ yum list installed 'eclipse*'
Geladene Plugins: auto-update-debuginfo, langpacks, presto, refresh-packagekit
Installierte Pakete
eclipse-cdt.x86_64                                 1:8.1.0-0.6.junom6.fc17                                                   @fedora   
eclipse-egit.noarch                                1.3.0-3.fc17                                                              @fedora   
eclipse-emf.noarch                                 2.8.0-0.7.e674bb28ad412fc9bc786f2f9b3c157eb2cbdae0.fc17                   @updates  
eclipse-emf-core.x86_64                            1:2.8.0-0.22.I201205031800.fc17                                           @updates  
eclipse-jdt.x86_64                                 1:4.2.0-0.22.I201205031800.fc17                                           @updates  
eclipse-jgit.noarch                                1.3.0-3.fc17                                                              @fedora   
eclipse-mylyn.noarch                               3.7.0-5.fc17                                                              @fedora   
eclipse-mylyn-commons.noarch                       3.7.0-12.fc17                                                             @fedora   
eclipse-mylyn-context.noarch                       3.7.0-1.fc17                                                              @fedora   
eclipse-mylyn-context-team.noarch                  3.7.0-1.fc17                                                              @fedora   
eclipse-nls.noarch                                 3.6.0.v20100814043401-8.fc17                                              @fedora   
eclipse-nls-de.noarch                              3.6.0.v20100814043401-8.fc17                                              @fedora   
eclipse-pde.x86_64                                 1:4.2.0-0.22.I201205031800.fc17                                           @updates  
eclipse-platform.x86_64                            1:4.2.0-0.22.I201205031800.fc17                                           @updates  
eclipse-rcp.x86_64                                 1:4.2.0-0.22.I201205031800.fc17                                           @updates  
eclipse-rse.noarch                                 3.3.1-1.fc17                                                              @fedora   
eclipse-subclipse.noarch                           1.8.9-2.fc17                                                              @fedora   
eclipse-svnkit.noarch                              1.3.4-2.fc15                                                              @fedora/16
eclipse-swt.x86_64                                 1:4.2.0-0.22.I201205031800.fc17                                           @updates  
eclipse-testframework.noarch                       3.8.0-0.1.fc17                                                            @fedora 

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Krzysztof Daniel 2012-06-06 11:23:11 EDT
The problem is caused by Mercurial not obeying Eclipse rules. In Eclipse, there is only UI thread, and only from that's thread it is possible to access UI elements.
In this case, we have a generic background thread (Worker) trying to access the UI bits (getImageRegistry). I'm rather suprised that it worked earlier, but maybe the registry was initialized in the UI thread, and the read-only access from the non-UI thread was allowed. This should be reported upstream.
Comment 2 Thomas Meyer 2012-06-07 05:44:24 EDT
current fedora version is:
Name       : eclipse-mercurial
Architektur : noarch
Version    : 1.8.2
Ausgabe    : 1.fc16
Größe : 1.3 M
Repo        : fedora
Zusammenfassung     : Eclipse Mercurial plugin
URL        : http://javaforge.com/project/HGE
Lizenz     : EPL
Beschreibung : Eclipse plugins to interact with Mercurial Repositories.

Latest version provided by http://javaforge.com/project/HGE is 1.9.1.

Version 1.9.1 of the plug-in works correctly with eclipse-rcp-4.2.0

Is it possible to update the version delivered with fedora to 1.9.1?
Comment 3 Severin Gehwolf 2012-09-19 06:40:24 EDT
I'll look into updating this.
Comment 4 Severin Gehwolf 2012-09-19 06:43:07 EDT
Upstream bug is: http://javaforge.com/issue/52552
Comment 5 Fedora End Of Life 2013-07-03 23:21:54 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 6 Thomas Meyer 2013-07-08 17:19:56 EDT
closed as nobody cares. I'm using the upstream version of eclipse now, which works for me.

Note You need to log in before you can comment on or make changes to this bug.