Bug 746425 - Crash on launch because can't load "libswt-gnome-gtk"
Summary: Crash on launch because can't load "libswt-gnome-gtk"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: eclipse
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Alexander Kurtakov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 755591 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-15 16:55 UTC by Kanak Kshetri
Modified: 2011-11-23 04:22 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-18 14:42:20 UTC
Type: ---
Embargoed:


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

Description Kanak Kshetri 2011-10-15 16:55:55 UTC
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):
4.6.0.4 (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 20:01:33 UTC
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 13:57:29 UTC
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 14:00:35 UTC
Created attachment 530289 [details]
reproducer

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 14:38:42 UTC
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 14:55:04 UTC
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 15:53:21 UTC
Some further test (suggested by Aleksandar)

Changing the test program to use 
Program.launch("/tmp/foo");
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 16:08:05 UTC
David,
Can you try with latest rawhide build? If this fixes the problem I'll backport to F16.

Comment 8 David Juran 2011-11-02 11:04:35 UTC
It does, with eclipse-3.7.0-9 azureus now at least starts up.

Comment 9 Alexander Kurtakov 2011-11-09 20:06:41 UTC
David, 
Please test https://admin.fedoraproject.org/updates/eclipse-3.7.1-1.fc16

Comment 10 Arthur Clement 2011-11-12 20:20:54 UTC
Problem solved with eclipse-swt-3.7.1-1.fc16.x86_64.rpm, thanks !

Comment 11 Alexander Kurtakov 2011-11-18 14:42:20 UTC
Thanks for verifying.

Comment 12 Mike 2011-11-23 04:22:56 UTC
*** 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.