Bug 810895

Summary: eclipse-swt falls back on non-existent swt-gnome-gtk
Product: [Fedora] Fedora Reporter: David Juran <djuran>
Component: eclipseAssignee: Alexander Kurtakov <akurtako>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: akurtako, andjrobins, kdaniel, mizdebsk, overholt, patrickm, rgrunber, sgehwolf, swagiaal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-22 07:13:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Juran 2012-04-09 15:05:24 UTC
Description of problem:
When trying to start azureus on F17, it fails with the following trace-back:

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
	at org.gudy.azureus2.ui.swt.Main.<init>(Main.java:114)
	at org.gudy.azureus2.ui.swt.Main.main(Main.java:292)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.aelitis.azureus.launcher.MainExecutor$1.run(MainExecutor.java:37)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
	no swt-gnome-gtk-3824 in java.library.path
	no swt-gnome-gtk in java.library.path
	Can't load library: /home/david/.swt/lib/linux/x86_64/libswt-gnome-gtk-3824.so
	Can't load library: /home/david/.swt/lib/linux/x86_64/libswt-gnome-gtk.so

	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:331)
	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
	at org.eclipse.swt.internal.gnome.GNOME.<clinit>(GNOME.java:21)
	at org.eclipse.swt.program.Program.gnome_24_launch(Program.java:397)
	at org.eclipse.swt.program.Program.launch(Program.java:1086)
	at org.eclipse.swt.program.Program.launch(Program.java:1042)
	at org.gudy.azureus2.ui.swt.Utils.launch(Utils.java:955)
	at com.aelitis.azureus.ui.swt.Initializer.checkInstallID(Initializer.java:303)
	at com.aelitis.azureus.ui.swt.Initializer.runInSWTThread(Initializer.java:272)
	at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.<init>(SWTThread.java:220)
	at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.createInstance(SWTThread.java:63)
	at com.aelitis.azureus.ui.swt.Initializer.<init>(Initializer.java:162)
	... 12 more

This traceback is generated by the new azureus-4.7.0.2 (http://koji.fedoraproject.org/koji/buildinfo?buildID=312133) but the same traceback is also seen with the F16 version of azureus, which works fine with the F16 eclipse.


Version-Release number of selected component (if applicable):
eclipse-swt-3.8.0-0.21.I201203201400.fc17.x86_64

How reproducible:
every time

Steps to Reproduce:
1. run azureus

Additional info:

Bug 746425 exhibited very similar behaviour

Comment 1 David Juran 2012-04-09 15:07:47 UTC
The reproducer from bug 746425 (https://bugzilla.redhat.com/attachment.cgi?id=530289 ) also works to reproduce this issue.

Comment 2 Alexander Kurtakov 2012-04-09 16:03:57 UTC
Hmm, Azureus started just fin on my F-17 vm. Which jvm are you using?

Comment 3 David Juran 2012-04-10 11:32:26 UTC
java-1.7.0-openjdk-1.7.0.3-2.1.fc17.1.x86_64

Do note the x86_64, I have a vague memory this was an issue in bug 746425...

Comment 4 Krzysztof Daniel 2012-04-10 12:02:12 UTC
I have just double checked using eclipse 4.2 (rawhide) and it works for me.

I have seen errors like this when I was trying to launch some program from within Eclipse, but the file that was to be opened was missing (f.e. deleted from command line). In this case, it is very likely that you azureus is passing to Program.launch incorrect arguments (specifically, a program that is not in the filesystem). 

This is exactly the same case as bug 746425 testcase. Alex, is there anything that can be done in SWT to show proper error message?

Comment 5 Alexander Kurtakov 2012-04-10 12:13:43 UTC
Changing the way SWT reports issues will be hard but it should never fallback to gnome24 calls nowadays on Fedora. I'll go through the code to find what might be causing it.

Comment 6 David Juran 2012-04-10 18:54:37 UTC
Not sure if this helps, but checking with jdb, it seems that the URL used in Program.launch was http://www.vuze.com:80/install/first.start?iid=&azid=C3DEY6WZYZI57ZUJADAKP24MZOMWH4TW&azv=4.7.0.2&locale=en&os.name=Linux

Comment 7 Krzysztof Daniel 2012-04-11 06:18:22 UTC
Actually the swt fallbacks on gnome24 in one of two cases:
(1) The desktop is actually gnome24, I do not expect this to be the case here.
(2) GIO launch fails - which imho is the case here.

This is the snippet:

package test;

import org.eclipse.swt.program.Program;
import org.eclipse.swt.widgets.Display;

public class Test {
	public static void main(String[] args) {
		Display display = new Display();
		boolean result = Program.launch("http://www.vuze.com:80/install/first.start?iid=&azid=C3DEY6WZYZI57ZUJADAKP24MZOMWH4TW&azv=4.7.0.2&locale=en&os.name=Linux");
		System.out.println(result);
	}

}

Comment 8 Alexander Kurtakov 2012-04-11 08:30:48 UTC
I can't make the snippet fail to me nor to reproduce it in any other way.
David, can you try with new user so we can be sure it's not some user config/cache?

Comment 9 David Juran 2012-04-13 12:40:26 UTC
If you start azureus locally on your computer running in a full gnome environment it works. At least a workaround...

Comment 10 Krzysztof Daniel 2012-04-13 12:49:27 UTC
So how you were starting it earlier?

Comment 11 David Juran 2012-07-30 13:48:50 UTC
For testing purpose, I created a minimal VM running F17 (or the beta at the time) and connected there by remote X.

Comment 12 David Juran 2013-01-10 13:59:04 UTC
*** Bug 882547 has been marked as a duplicate of this bug. ***

Comment 13 Alexander Kurtakov 2013-01-10 14:02:00 UTC
Just for reference - I have a patch series sent upstream that should help identifing/fixing this issue but they are waiting for some more reviews as Platform is a bit touchy place. 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=376659

Comment 14 Alexander Kurtakov 2013-01-10 14:03:49 UTC
http://fedorapeople.org/cgit/akurtakov/public_git/eclipse.platform.swt.git/commit/?id=5527250a03712668daf31d8216bdea5f3d17fc4a is the one I think should fix the issue but we would see it only in eclipse 4.3(if approved) as I would not risk breaking local swt usage in anyway.

Comment 15 Alexander Kurtakov 2013-03-11 20:01:03 UTC
David, can you try on current rawhide ? My patchset is in and it should fix at least a few of the wrong fallbacks.

Comment 16 Mikolaj Izdebski 2013-03-11 21:13:00 UTC
Still fails with the same error:

file:/usr/lib64/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64_3.101.0.v20130305-1021.jar ; file:/usr/bin/build-classpath ; file:/%20error ; file:/%20JVM_LIBDIR%20/usr/lib/jvm-exports/java-openjdk%20does%20not%20exist%20or%20is%20not%20a%20directory ; file:/usr/share/azureus/Azureus2.jar ; file:/
changeLocale: *Default Language* != English (United States). Searching without country..
changeLocale: Searching for language English in *any* country..
changeLocale: no message properties for Locale 'English (United States)' (en_US), using 'English (default)'
DEBUG::Mon Mar 11 22:08:19 CET 2013  Successfully migrated key management

(Vuze:2452): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
	at org.gudy.azureus2.ui.swt.Main.<init>(Main.java:114)
	at org.gudy.azureus2.ui.swt.Main.main(Main.java:292)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.aelitis.azureus.launcher.MainExecutor$1.run(MainExecutor.java:37)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
	no swt-gnome-gtk-4320 in java.library.path
	no swt-gnome-gtk in java.library.path
	Can't load library: /home/me/.swt/lib/linux/x86_64/libswt-gnome-gtk-4320.so
	Can't load library: /home/me/.swt/lib/linux/x86_64/libswt-gnome-gtk.so

	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:331)
	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
	at org.eclipse.swt.internal.gnome.GNOME.<clinit>(GNOME.java:21)
	at org.eclipse.swt.program.Program.gnome_launch(Program.java:388)
	at org.eclipse.swt.program.Program.launch(Program.java:983)
	at org.eclipse.swt.program.Program.launch(Program.java:939)
	at org.gudy.azureus2.ui.swt.Utils.launch(Utils.java:1033)
	at com.aelitis.azureus.ui.swt.Initializer.checkInstallID(Initializer.java:305)
	at com.aelitis.azureus.ui.swt.Initializer.runInSWTThread(Initializer.java:274)
	at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.<init>(SWTThread.java:229)
	at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.createInstance(SWTThread.java:63)
	at com.aelitis.azureus.ui.swt.Initializer.<init>(Initializer.java:164)
	... 12 more

eclipse-swt-4.3.0-0.24.git3fd9eca.fc19.x86_64
azureus-4.8.1.2-3.fc19.noarch

Comment 17 Alexander Kurtakov 2013-03-20 09:39:02 UTC
Resetting to rawhide for further investigation.

Comment 18 Fedora End Of Life 2013-04-03 13:36:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 19 Mikolaj Izdebski 2013-07-20 21:37:52 UTC
This bug is fixed for me in Fedora 19 + updates-testing (Azureus works fine)

Comment 20 Krzysztof Daniel 2013-07-22 07:13:34 UTC
Making as closed worksforme per comment 19.