Bug 746425 - Crash on launch because can't load "libswt-gnome-gtk"
Crash on launch because can't load "libswt-gnome-gtk"
Product: Fedora
Classification: Fedora
Component: eclipse (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Alexander Kurtakov
Fedora Extras Quality Assurance
: 755591 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2011-10-15 12:55 EDT by Kanak Kshetri
Modified: 2011-11-22 23:22 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-11-18 09:42:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Full stack trace (2.63 KB, text/plain)
2011-10-15 12:55 EDT, Kanak Kshetri
no flags Details
reproducer (245 bytes, text/plain)
2011-10-26 10:00 EDT, David Juran
no flags Details

  None (edit)
Description Kanak Kshetri 2011-10-15 12:55:55 EDT
Created attachment 528334 [details]
Full stack trace

Description of problem:
Azureus fails to start because:
"Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
	no swt-gnome-gtk-3735 in java.library.path
	no swt-gnome-gtk in java.library.path

Version-Release number of selected component (if applicable): (latest in Fedora 16)

How reproducible:
every time

Steps to Reproduce:
1. Install azureus
2. try launching azureus ("azureus" in command line, or through gnome menu)
3. fails to launch with stacktrace
Actual results:
Azureus starts

Expected results:
Azureus fails to start.

Additional info:
Full stack trace attached
Comment 1 David Juran 2011-10-23 16:01:33 EDT
Had a closer look at this today, and I think I'll need some help here... 
  Just like Aleksandar pointed out, Display.getCurrent() (called from the SWTThread constructor) returns null. But  Display.getDefault() also returns null. Which is weird. And even so, I don't even see why that causes azureus to fall back on (the deprecated) libswt-gnome-gtk. 
  Any clues?
Comment 2 David Juran 2011-10-26 09:57:29 EDT
Discussing this with Aleksandar, this seem to be a bug in SWT rather then in eclipse, the attached test case (courtesy of Aleksandar) reproduces the problem.
Re-assigning to eclipse
Comment 3 David Juran 2011-10-26 10:00:35 EDT
Created attachment 530289 [details]

compile with 
javac -classpath /usr/lib64/eclipse/swt.jar Test.java

[djuran@f16 tmp]$ java -classpath /usr/lib64/eclipse/swt.jar:. Test 
Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
	no swt-gnome-gtk-3735 in java.library.path
	no swt-gnome-gtk in java.library.path
	Can't load library: /home/djuran/.swt/lib/linux/x86_64/libswt-gnome-gtk-3735.so
	Can't load library: /home/djuran/.swt/lib/linux/x86_64/libswt-gnome-gtk.so

	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285)
	at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
	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 Test.main(Test.java:9)
Comment 4 Andrew Overholt 2011-10-26 10:38:42 EDT
The fact that it's attempting to use from ~/.swt, it seems like the initializer didn't run at build time (or it ran and SWT's bundle has changed since installation).  Any thoughts on that, Sami?
Comment 5 Alexander Kurtakov 2011-10-26 10:55:04 EDT
This has nothing to do with the initializer. The initializer is eclipse specific and doesn't affect normal swt applications.
Comment 6 David Juran 2011-10-26 11:53:21 EDT
Some further test (suggested by Aleksandar)

Changing the test program to use 
works (or at least opens /tmp/foo with emacs) _IF_ /tmp/foo exists. If /tmp/foo does not exist, the same error (trying to load swt-gnome-gtk-3735) occurs.

gvfs-open http://dir.bg works fine, at least after I installed firefox

Setting GIO_USE_GVFS=gvfs doesn't seem to have any effect.
Comment 7 Alexander Kurtakov 2011-11-01 12:08:05 EDT
Can you try with latest rawhide build? If this fixes the problem I'll backport to F16.
Comment 8 David Juran 2011-11-02 07:04:35 EDT
It does, with eclipse-3.7.0-9 azureus now at least starts up.
Comment 9 Alexander Kurtakov 2011-11-09 15:06:41 EST
Please test https://admin.fedoraproject.org/updates/eclipse-3.7.1-1.fc16
Comment 10 Arthur Clement 2011-11-12 15:20:54 EST
Problem solved with eclipse-swt-3.7.1-1.fc16.x86_64.rpm, thanks !
Comment 11 Alexander Kurtakov 2011-11-18 09:42:20 EST
Thanks for verifying.
Comment 12 Mike 2011-11-22 23:22:56 EST
*** Bug 755591 has been marked as a duplicate of this bug. ***

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