Bug 343454 - XULRunner 2.0 kills Eclipse when opening anything Browser related
Summary: XULRunner 2.0 kills Eclipse when opening anything Browser related
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.1   Edit
Hardware: PC Linux
: P3 blocker with 1 vote (vote)
Target Milestone: 3.7 RC1   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 341250 341547 348567 349252 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-20 16:23 EDT by Chris Aniszczyk CLA
Modified: 2011-06-14 09:40 EDT (History)
17 users (show)

See Also:
Silenio_Quarti: review+


Attachments
Some more raw debug output (2.43 KB, text/plain)
2011-04-20 16:24 EDT, Chris Aniszczyk CLA
no flags Details
hs_err_pid23317.log (58.70 KB, text/x-log)
2011-04-27 14:20 EDT, Chris Aniszczyk CLA
no flags Details
hs_err_pid22397.log (78.46 KB, text/x-log)
2011-04-27 14:21 EDT, Chris Aniszczyk CLA
no flags Details
patch for WebKitGTK (4.89 KB, patch)
2011-05-09 12:15 EDT, Grant Gayed CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Aniszczyk CLA 2011-04-20 16:23:40 EDT
If you open anything browser related with the latest version of XULRunner, Eclipse just tanks...

You'll get errors like this...

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x03a9b1d7, pid=31555, tid=3078592192
#
# JRE version: 6.0_22-b22
# Java VM: OpenJDK Client VM (20.0-b10 mixed mode linux-x86 )
# Derivative: IcedTea6 1.10
# Distribution: Fedora release 15 (Lovelock), package fedora-55.1.10.fc15-i386
# Problematic frame:
# C  [libxul.so+0xc841d7]  NS_UTF16ToCString_P+0x1a326
#
# An error report file with more information is saved as:
# /home/zx/eclipses/eclipse/hs_err_pid31555.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Comment 1 Chris Aniszczyk CLA 2011-04-20 16:24:12 EDT
Created attachment 193755 [details]
Some more raw debug output
Comment 2 Chris Aniszczyk CLA 2011-04-21 11:20:13 EDT
This is with XULRunner 2.0 btw...

http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/2.0/
Comment 3 Chris Aniszczyk CLA 2011-04-21 11:20:40 EDT
To reproduce, simply go to the preferences and select Browser, it will crash.
Comment 4 Grant Gayed CLA 2011-04-27 14:15:53 EDT
It shouldn't attempt to use XULRunner 2.0, are you doing anything to explicitly point at it (eg.- setting the org.eclipse.swt.browser.XULRunnerPath java property)?  And if not, can you attach the crash log?
Comment 5 Chris Aniszczyk CLA 2011-04-27 14:20:53 EDT
Created attachment 194190 [details]
hs_err_pid23317.log

Here you go.
Comment 6 Chris Aniszczyk CLA 2011-04-27 14:21:52 EDT
Created attachment 194191 [details]
hs_err_pid22397.log
Comment 7 Chris Aniszczyk CLA 2011-04-27 14:22:46 EDT
I hope those two logs help.

To reproduce, have an updated xulrunner and just run the latest i-build. Go to Preferences->General->Browser and BOOM.
Comment 8 Severin Gehwolf CLA 2011-04-27 14:41:35 EDT
(In reply to comment #4)
> It shouldn't attempt to use XULRunner 2.0, are you doing anything to explicitly
> point at it (eg.- setting the org.eclipse.swt.browser.XULRunnerPath java
> property)?  And if not, can you attach the crash log?

Hmm, so what should it use instead if there is no other XULRunner version on the system? I am on F15 and there is only one XULRunner, v2.0.

$ rpm -qa | grep xulrunner
xulrunner-2.0-3.fc15.x86_64

Just wanted to point out that there is only XULRunner 2 on some systems :)
Comment 9 Grant Gayed CLA 2011-04-27 14:48:11 EDT
As of Eclipse 3.7 it should first attempt to use WebKitGTK.
Comment 10 Chris Aniszczyk CLA 2011-04-27 15:21:17 EDT
It seems like it is doing something that causes XULRunner to be initialized and then it crashes. In Fedora, we patch eclipse to completely make XULRunner find nothing.

http://pkgs.fedoraproject.org/gitweb/?p=eclipse.git;a=blob;f=eclipse-xpcom-h.patch;h=e2dfbc4030afb0b3c7723084a28975b763edcf1e;hb=HEAD
Comment 11 Chris Aniszczyk CLA 2011-04-27 15:21:39 EDT
This will be a problem on any Linux distro that uses the latest XULRunner.
Comment 12 Grant Gayed CLA 2011-04-28 09:43:52 EDT
We'll soon have a Fedora 15 beta to investigate on.
Comment 13 CLA 2011-04-28 11:22:58 EDT
(In reply to comment #12)
> We'll soon have a Fedora 15 beta to investigate on.

What about trying Ubuntu 11.04? That's available now.
Comment 14 Chris Aniszczyk CLA 2011-04-28 12:44:36 EDT
(In reply to comment #13)
> (In reply to comment #12)
> > We'll soon have a Fedora 15 beta to investigate on.
> 
> What about trying Ubuntu 11.04? That's available now.

I'm not sure if the problem occurs on Ubuntu, I'm 100% sure it occurs on the Fedora 15 beta with a vanilla Eclipse install (not the one we patch in yum).
Comment 15 CLA 2011-04-28 12:50:12 EDT
(In reply to comment #14)
> (In reply to comment #13)
> > (In reply to comment #12)
> > > We'll soon have a Fedora 15 beta to investigate on.
> > 
> > What about trying Ubuntu 11.04? That's available now.
> 
> I'm not sure if the problem occurs on Ubuntu, I'm 100% sure it occurs on the
> Fedora 15 beta with a vanilla Eclipse install (not the one we patch in yum).

You're right. Sorry for the noise.
Comment 16 Danilo CLA 2011-05-02 05:34:49 EDT
Problem is reproducible on current Arch Linux too.
Comment 17 Danilo CLA 2011-05-02 05:45:21 EDT
(In reply to comment #9)
> As of Eclipse 3.7 it should first attempt to use WebKitGTK.

Using the following Eclipse 3.7 build, it still crashes. libwebkit is installed.

Version: 3.7.0
Build id: I20110310-1119

OS: ArchLinux
Comment 18 Benjamin Robin CLA 2011-05-06 14:16:28 EDT
(In reply to comment #17)
> (In reply to comment #9)
> > As of Eclipse 3.7 it should first attempt to use WebKitGTK.
> 
> Using the following Eclipse 3.7 build, it still crashes. libwebkit is
> installed.
> 
> Version: 3.7.0
> Build id: I20110310-1119
> 
> OS: ArchLinux

It's crashing because eclipse 3.7 looks like it isn't compatible with the latest version of libwebkit.
I just downgrade libwebkit 1.4 to 1.2.7 and everything it's working again.

Because it's failing to load libwebkit 1.4 it's trying to fallback to libxul... But we known that eclipse it isn't compatible with the latest vesrion of xulrunner. That why we can see libxul in the crash report.
Comment 19 Grant Gayed CLA 2011-05-09 12:15:55 EDT
Created attachment 195098 [details]
patch for WebKitGTK
Comment 20 Grant Gayed CLA 2011-05-09 13:38:02 EDT
*** Bug 341250 has been marked as a duplicate of this bug. ***
Comment 21 Grant Gayed CLA 2011-05-09 17:42:27 EDT
There are two things happening here:

1. WebKitGTK 1.4 is not ABI-compatible with 1.2, so the initial attempt to use it is failing.  This is fixed with the patch in comment 19, so SWT.NONE-style Browsers should no longer fall back to using Mozilla when WebKit 1.4 is present.

2. The eclipse launcher is setting MOZILLA_FIVE_HOME to a directory with XULRunner-2.0, which is invalid.  With the fix for #1 in place this case could still surface for Browsers created with style SWT.MOZILLA.  The fix for this is in bug 344270 (marked as FIXED).

The patch in comment 19 is applied to HEAD, so closing as fixed > 20110509.
Comment 22 Grant Gayed CLA 2011-05-10 12:43:58 EDT
*** Bug 341547 has been marked as a duplicate of this bug. ***
Comment 23 David Ortega CLA 2011-05-21 19:42:44 EDT
I have this problem in Fedora 15, Eclipse Helios and JDK 6, eclipse crashes with Fatal Error when opening anything related to browser.

The solution i found is to add in eclipse.ini the path to Xulrunner instalation, in Fedora 15, the new line in eclipse.ini should be like this:

-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-2/

Now it works.

hth
Comment 24 Benjamin Robin CLA 2011-05-22 02:46:49 EDT
This is NOT a solution. You are just preventing eclipse to crash. Eclipse recover the error when starting but anything related to browser will not work properly.
The only solution is to use libwebkit BUT you must have libwebkit in version < 1.3 (1.2.7 it's working).
This bug will not be fixed. In version 3.7 they just add the compatibility with libwebkit 1.4 and they make as default browser engine.
Comment 25 David Ortega CLA 2011-05-22 11:44:20 EDT
Fedora 15 only has webkitgtk 1.4, i couldn't find a safe option to downgrade the library to 1.2 without making the whole system unstable. I agree the eclipse.ini workaround is not the solution, but, until Eclipse 3.7 arrives, the eclipse.ini line help me to continue my work.
Comment 26 Chris Aniszczyk CLA 2011-05-22 12:44:31 EDT
(In reply to comment #25)
> Fedora 15 only has webkitgtk 1.4, i couldn't find a safe option to downgrade
> the library to 1.2 without making the whole system unstable. I agree the
> eclipse.ini workaround is not the solution, but, until Eclipse 3.7 arrives, the
> eclipse.ini line help me to continue my work.

3.7 is currently available in rawhide...

http://koji.fedoraproject.org/koji/buildinfo?buildID=244222
Comment 27 Grant Gayed CLA 2011-06-09 13:51:18 EDT
*** Bug 348567 has been marked as a duplicate of this bug. ***
Comment 28 Grant Gayed CLA 2011-06-14 09:40:04 EDT
*** Bug 349252 has been marked as a duplicate of this bug. ***