Bug 424657 - WebKit crash in Luna M4 and Kepler SR2 on Kubuntu 13.10
Summary: WebKit crash in Luna M4 and Kepler SR2 on Kubuntu 13.10
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: 4.4 M6   Edit
Assignee: Arun Thondapu CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-26 03:53 EST by Stephan Herrmann CLA
Modified: 2014-03-06 10:51 EST (History)
7 users (show)

See Also:
daniel_megert: pmc_approved+
daniel_megert: review+
akurtakov: review+


Attachments
Empty feature list (50.19 KB, image/png)
2014-01-25 15:12 EST, Andrey Loskutov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2013-12-26 03:53:01 EST
Fresh install of eclipse-standard as of Luna M4.
Launch with fresh new workspace.
After splash disappears a grey empty window appears and then nothing.

I seems that the welcome screen has trouble starting a web browser widget:

(stacktrace at dead state):

        at org.eclipse.swt.internal.webkit.WebKitGTK._webkit_web_view_get_type(Native Method)
        at org.eclipse.swt.internal.webkit.WebKitGTK.webkit_web_view_get_type(WebKitGTK.java:1190)
        at org.eclipse.swt.browser.WebKit.<clinit>(WebKit.java:105)
        at org.eclipse.swt.browser.BrowserFactory.createWebBrowser(BrowserFactory.java:18)
        at org.eclipse.swt.browser.Browser.<init>(Browser.java:96)
        at org.eclipse.ui.internal.intro.impl.presentations.BrowserIntroPartImplementation.createPartControl(BrowserIntroPartImplementation.java:209)
        at org.eclipse.ui.internal.intro.impl.model.IntroPartPresentation.createPartControl(IntroPartPresentation.java:231)
        at org.eclipse.ui.intro.config.CustomizableIntroPart.createPartControl(CustomizableIntroPart.java:203)
        at org.eclipse.ui.internal.ViewIntroAdapterPart.createPartControl(ViewIntroAdapterPart.java:138)
        at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:138)
        at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(CompatibilityView.java:155)
        at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:319)

The same platform has no problems showing the welcome screen of kepler
Comment 1 Stephan Herrmann CLA 2013-12-26 04:28:54 EST
I used kepler to get past the welcome screen, then relaunched luna M4.
Now Eclipse is partly usable (this is using GTK-3, right?),
... until the next time you need a browser widget.
Comment 2 Dani Megert CLA 2014-01-22 03:54:04 EST
We fixed a similar bug for 4.4 M3 (see bug 420581 for details). Can you verify the following:

1. Does it still break when using latest M5 candidate:
http://download.eclipse.org/eclipse/downloads/drops4/I20140121-2000/

2. Does it work if you use M3:
http://download.eclipse.org/eclipse/downloads/drops4/S-4.4M3-201310302000/

Also, which version of WebKit are you using?
Comment 3 Dani Megert CLA 2014-01-22 03:54:45 EST
*** Bug 425614 has been marked as a duplicate of this bug. ***
Comment 4 Dani Megert CLA 2014-01-22 04:13:41 EST
Stephan, is just the Browser related stuff affected? Which GTK+ 3 version is installed?
Comment 5 Arun Thondapu CLA 2014-01-22 08:53:34 EST
(In reply to Dani Megert from comment #2)
> 1. Does it still break when using latest M5 candidate:
> http://download.eclipse.org/eclipse/downloads/drops4/I20140121-2000/

I just tested on Ubuntu 13.10 with the above build and a fresh workspace, it launches properly and works fine for me.

Stephan, are you still seeing this problem? I tested on Ubuntu 13.10 but I would expect KUbuntu 13.10 to behave the same way as it would have the same versions of GTK+ packages.
Comment 6 Arun Thondapu CLA 2014-01-23 06:47:19 EST
Resolving the bug. Please reopen if you see the problem again with the M5 build.
Comment 7 Marc-André Laperle CLA 2014-01-23 10:33:02 EST
Stephan, which version of libwebkitgtk-1.0-0 do you have? dpkg -l | grep libwebkitgtk-1.0-0
Comment 8 Stephan Herrmann CLA 2014-01-23 11:07:11 EST
Versions of libraries I have installed:

libgtk-3-0:i386                      3.8.4-0ubuntu3
libwebkitgtk-1.0-0                   1.10.2-0ubuntu2

Bug is still reproduceable using either of
- eclipse standard luna m4 (original)
- M5 candidate eclipse-SDK-I20140122-2000-linux-gtk.tar.gz

After killing eclipse and restarting on the same workspace I see the Java perspective, but attempting to get the welcome screen back freezes again.

Is the used GTK+ theme relevant? (could be a difference between plain vanilla Ubuntu and my Kubuntu setup).

Should I still try M3 as well?
Comment 9 Stephan Herrmann CLA 2014-01-23 11:51:02 EST
(In reply to Stephan Herrmann from comment #8)
> Should I still try M3 as well?

Bug occurs also with SDK 4.4 M3
Comment 10 Stephan Herrmann CLA 2014-01-23 15:14:39 EST
More info after skimming bug 420581:

SWT_GTK3=1 doesn't help
SWT_GTK3=0 does help (as expected)

Stacktrace at hang (with SWT_GTK3=1) looks just like bug 420581 comment 15.

I had libwebkitgtk-1.0-0 installed as mentioned in comment 8, but I did *not* have libwebkitgtk-3-0-0. Installing libwebkitgtk-3-0-0 *fixes* the problem. Reducing severity.

Apparently, SWT doesn't cope with GKT 3 installed but without libwebkitgtk-3-0-0.
I nice error message would be a treat :)
Comment 11 Andrey Loskutov CLA 2014-01-25 15:12:07 EST
Created attachment 239318 [details]
Empty feature list

I'm encountering slightly different issue but probably caused by the same root cause: the content of all tabs in the "Eclipse->About->Installation Details" dialog is not visible (bit content is not empty, as I can copy/paste config details text!!!).

Same effect is with the "About Eclipse features" dialogs opened if you click on any feature icon in the "Eclipse->About" dialog: the upper pane with the feature list is empty.

SWT_GTK3=0 helps, all content is there and Eclipse looks nicer (min/max buttons are normal size, no extra spacing between icons in view/window toolbars etc).

So should I open a new bug for that? I don't think this is browser related, as the "missing" content are just SWT/JFace tables and scroll panes.
I'm on KUbuntu 13.10, 4.4 M5 "final".

andrei@Pinguin:/$ uname -a
Linux Pinguin 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

andrei@Pinguin:/$ dpkg -l | grep gtk-3
gir1.2-gtk-3.0               3.8.6-0ubuntu3.1
gir1.2-javascriptcoregtk-3.0 1.10.2-0ubuntu3 
libgtk-3-0:amd64             3.8.6-0ubuntu3.1
libgtk-3-bin                 3.8.6-0ubuntu3.1
libgtk-3-common              3.8.6-0ubuntu3.1
libjavascriptcoregtk-3.0-0   1.10.2-0ubuntu3 
libwebkitgtk-3.0-0           1.10.2-0ubuntu3 
libwebkitgtk-3.0-common      1.10.2-0ubuntu3
Comment 12 Marc-André Laperle CLA 2014-01-25 15:35:25 EST
(In reply to Andrey Loskutov from comment #11)
> Created attachment 239318 [details]
> Empty feature list
> 
> I'm encountering slightly different issue but probably caused by the same
> root cause: the content of all tabs in the "Eclipse->About->Installation
> Details" dialog is not visible (bit content is not empty, as I can
> copy/paste config details text!!!).

See bug 420771
Comment 13 Andrey Loskutov CLA 2014-01-25 15:36:43 EST
Sorry for noise, I think I found better bug for my issues in comment 11 - it's bug 421127.
Comment 14 Alexander Kurtakov CLA 2014-01-30 10:47:49 EST
(In reply to Stephan Herrmann from comment #10)
> More info after skimming bug 420581:
> 
> SWT_GTK3=1 doesn't help
> SWT_GTK3=0 does help (as expected)
> 
> Stacktrace at hang (with SWT_GTK3=1) looks just like bug 420581 comment 15.
> 
> I had libwebkitgtk-1.0-0 installed as mentioned in comment 8, but I did
> *not* have libwebkitgtk-3-0-0. Installing libwebkitgtk-3-0-0 *fixes* the
> problem. Reducing severity.
> 
> Apparently, SWT doesn't cope with GKT 3 installed but without
> libwebkitgtk-3-0-0.
> I nice error message would be a treat :)

I think I understand the problem. The logic for loading webkitgtk is wrong.
Currently if libwebkitgtk-3.0.so.0 is not found libwebkit-1.0.so.2 and libwebkitgtk-1.0.so.0 will be tried and loaded. But they are not viable solutions for GTK3 based SWT thus we should give up which would result in the proper fallback to no-browser-available handling. 
Arun, what do you think ?
Comment 15 Arun Thondapu CLA 2014-01-30 12:10:24 EST
(In reply to Alexander Kurtakov from comment #14)
> (In reply to Stephan Herrmann from comment #10)
> > More info after skimming bug 420581:
> > 
> > SWT_GTK3=1 doesn't help
> > SWT_GTK3=0 does help (as expected)
> > 
> > Stacktrace at hang (with SWT_GTK3=1) looks just like bug 420581 comment 15.
> > 
> > I had libwebkitgtk-1.0-0 installed as mentioned in comment 8, but I did
> > *not* have libwebkitgtk-3-0-0. Installing libwebkitgtk-3-0-0 *fixes* the
> > problem. Reducing severity.
> > 
> > Apparently, SWT doesn't cope with GKT 3 installed but without
> > libwebkitgtk-3-0-0.
> > I nice error message would be a treat :)
> 
> I think I understand the problem. The logic for loading webkitgtk is wrong.
> Currently if libwebkitgtk-3.0.so.0 is not found libwebkit-1.0.so.2 and
> libwebkitgtk-1.0.so.0 will be tried and loaded. But they are not viable
> solutions for GTK3 based SWT thus we should give up which would result in
> the proper fallback to no-browser-available handling. 
> Arun, what do you think ?

You're right Alex. I already have the patch to fix this but I've been thinking if there is a way to provide a proper error message to the user in this scenario.
Comment 16 Alexander Kurtakov CLA 2014-01-30 12:29:22 EST
(In reply to Alexander Kurtakov from comment #14)
> (In reply to Stephan Herrmann from comment #10)
> > More info after skimming bug 420581:
> > 
> > SWT_GTK3=1 doesn't help
> > SWT_GTK3=0 does help (as expected)
> > 
> > Stacktrace at hang (with SWT_GTK3=1) looks just like bug 420581 comment 15.
> > 
> > I had libwebkitgtk-1.0-0 installed as mentioned in comment 8, but I did
> > *not* have libwebkitgtk-3-0-0. Installing libwebkitgtk-3-0-0 *fixes* the
> > problem. Reducing severity.
> > 
> > Apparently, SWT doesn't cope with GKT 3 installed but without
> > libwebkitgtk-3-0-0.
> > I nice error message would be a treat :)
> 
> I think I understand the problem. The logic for loading webkitgtk is wrong.
> Currently if libwebkitgtk-3.0.so.0 is not found libwebkit-1.0.so.2 and
> libwebkitgtk-1.0.so.0 will be tried and loaded. But they are not viable
> solutions for GTK3 based SWT thus we should give up which would result in
> the proper fallback to no-browser-available handling. 
> Arun, what do you think ?

(In reply to Arun Thondapu from comment #15)
> (In reply to Alexander Kurtakov from comment #14)
> > (In reply to Stephan Herrmann from comment #10)
> > > More info after skimming bug 420581:
> > > 
> > > SWT_GTK3=1 doesn't help
> > > SWT_GTK3=0 does help (as expected)
> > > 
> > > Stacktrace at hang (with SWT_GTK3=1) looks just like bug 420581 comment 15.
> > > 
> > > I had libwebkitgtk-1.0-0 installed as mentioned in comment 8, but I did
> > > *not* have libwebkitgtk-3-0-0. Installing libwebkitgtk-3-0-0 *fixes* the
> > > problem. Reducing severity.
> > > 
> > > Apparently, SWT doesn't cope with GKT 3 installed but without
> > > libwebkitgtk-3-0-0.
> > > I nice error message would be a treat :)
> > 
> > I think I understand the problem. The logic for loading webkitgtk is wrong.
> > Currently if libwebkitgtk-3.0.so.0 is not found libwebkit-1.0.so.2 and
> > libwebkitgtk-1.0.so.0 will be tried and loaded. But they are not viable
> > solutions for GTK3 based SWT thus we should give up which would result in
> > the proper fallback to no-browser-available handling. 
> > Arun, what do you think ?
> 
> You're right Alex. I already have the patch to fix this but I've been
> thinking if there is a way to provide a proper error message to the user in
> this scenario.

Well, the best we can do is printing smth to syserr as in BrowserFactory if webkit is not detected as installed and style is not set to webkit we would try to load mozilla which is a valid use case in general, but not on gtk3 (though there is already firefox-gtk3 in fedora http://worldofgnome.org/firefoxgtk3-fedora-repos-are-now-available/). 
Anyway, I would rather see the fix in so such cases don't happen instead of waiting for perfect fix. 
Also note that bug 425123 will also affect this when goes in so we would better prepare early to not end up with 4 level fallback soon.
Comment 18 Arun Thondapu CLA 2014-02-03 05:10:33 EST
Tested with N20140201-1500. Stephan, can you please verify too? Thanks!
Comment 19 Arun Thondapu CLA 2014-02-05 11:40:23 EST
I'm planning to back port this fix to the R4_3_maintenance branch.
Stephan, can you please confirm that the fix resolves your original problem? Thanks in advance!
Comment 20 Stephan Herrmann CLA 2014-02-05 19:06:30 EST
Yes.

I uninstalled libwebkitgtk-3-0-0 and the latest nightly come up with an empty welcome screen. This can be closed and then Eclipse starts to be its normal self.

Digging into the log I'm greeted by this warning(!):

Internal browser is not available: No more handles [Browser style SWT.MOZILLA and Java system property org.eclipse.swt.browser.DefaultType=mozilla are not supported with GTK 3 as XULRunner is not ported for GTK 3 yet]

In this situation, retrying with an earlier I-build I still get a grey window which reacts to nothing but kill -9.

Installed libwebkitgtk-3-0-0 again and the welcome screen works again.

Just 1.5 questions: why is this only a warning, and couldn't it mention the remedy in some way?
Comment 21 Arun Thondapu CLA 2014-02-06 07:14:42 EST
Reopening for backporting to 4.3.2
Comment 22 Arun Thondapu CLA 2014-03-03 14:08:16 EST
Marking it resolved as the bug is fixed for some time now in both Luna and Kepler SR2.