Bug 425614 - Crash in webkit_web_view_get_type using Ubuntu 14.04
Summary: Crash in webkit_web_view_get_type using Ubuntu 14.04
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 433099 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-01-13 17:32 EST by Marc-André Laperle CLA
Modified: 2014-04-21 14:49 EDT (History)
5 users (show)

See Also:


Attachments
Test project (1.14 KB, application/gzip)
2014-01-13 17:32 EST, Marc-André Laperle CLA
no flags Details
Java error log (147.24 KB, text/plain)
2014-01-13 17:36 EST, Marc-André Laperle CLA
no flags Details
GDB backtrace from core dump (2.32 KB, text/plain)
2014-01-13 17:47 EST, Marc-André Laperle CLA
no flags Details
Occasionally coming console error message. (8.66 KB, text/plain)
2014-01-27 00:02 EST, Niraj Modi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Laperle CLA 2014-01-13 17:32:19 EST
Created attachment 238942 [details]
Test project

Using Eclipse 4.4-I20140107-0800
Ubuntu 14.04 64 bit (trusty)
libwebkitgtk 2.3.2 (package from trusty)

1. Start Eclipse with SWT_GTK3=0 to disable GTK3.
2. Create a plug-in project with a JUnit test or import the attached project
3. Run as a Plug-in test
4. Crash occurs at [libwebkitgtk-1.0.so.0+0x43df2c]  webkit_web_view_get_type+0x23fc
Comment 1 Marc-André Laperle CLA 2014-01-13 17:36:00 EST
Created attachment 238943 [details]
Java error log
Comment 2 Marc-André Laperle CLA 2014-01-13 17:47:19 EST
Created attachment 238944 [details]
GDB backtrace from core dump
Comment 3 Dani Megert CLA 2014-01-22 03:54:45 EST
Looks like bug 424657.

*** This bug has been marked as a duplicate of bug 424657 ***
Comment 4 Arun Thondapu CLA 2014-01-23 06:50:54 EST
I'm not able to reproduce the problem reported in bug 424657 on Ubuntu 13.10 but this one could be something specific to Ubuntu 14.04. Niraj, can you please test with the steps from comment 0 on Ubuntu 14.04 and verify? Thanks!
Comment 5 Marc-André Laperle CLA 2014-01-23 10:28:53 EST
It's specific to Ubuntu 14.04. I have reproduced it on 3 different machines (1 real, 2 vms on different machines) and it's not happening on 13.10 (2 real, 1 vm). 14.04 has a newer version or libwebkitgtk (2.3.2) compared to 13.10 which had libwebkitgtk 1.10.2. Also, make sure you have the libwebkitgtk-1.0-0 package installed when testing. I also reproduced it with yesterday's build I20140122-0800.
Comment 6 Dani Megert CLA 2014-01-23 10:44:55 EST
Also note, that we currently have problems with GTK+ 3 on Ubuntu 14.04. See bug 421127 for details.

*** This bug has been marked as a duplicate of bug 425123 ***
Comment 7 Marc-André Laperle CLA 2014-01-23 10:46:21 EST
(In reply to Dani Megert from comment #6)
> Also note, that we currently have problems with GTK+ 3 on Ubuntu 14.04. See
> bug 421127 for details.

But I'm using GTK2 (SWT_GTK3=0)
Comment 8 Dani Megert CLA 2014-01-23 10:48:08 EST
(In reply to Marc-Andre Laperle from comment #7)
> (In reply to Dani Megert from comment #6)
> > Also note, that we currently have problems with GTK+ 3 on Ubuntu 14.04. See
> > bug 421127 for details.
> 
> But I'm using GTK2 (SWT_GTK3=0)

Sure. Just a reminder in case you try GTK3+.
Comment 9 Niraj Modi CLA 2014-01-27 00:02:26 EST
Created attachment 239327 [details]
Occasionally coming console error message.

Hi Marc,
I tried the steps/configuration as mentioned in comment 0 on Ubuntu 14.04
The test project when run as 'JUnit Plug-in Test' always passes as green; with occasionally coming console error message, refer attachment.

One difference I could note:- you seems to be using Open JDK 6 (as seen in your core dump) where as I am using IBM JRE 7.
Comment 10 Marc-André Laperle CLA 2014-01-27 13:24:32 EST
(In reply to Niraj Modi from comment #9)
> Created attachment 239327 [details]
> Occasionally coming console error message.
> 
> Hi Marc,
> I tried the steps/configuration as mentioned in comment 0 on Ubuntu 14.04
> The test project when run as 'JUnit Plug-in Test' always passes as green;
> with occasionally coming console error message, refer attachment.

Thanks for trying! That error looks unrelated. Do you have the package libwebkitgtk-1.0-0 installed? It should be version 2.3.4-1ubuntu2. Also, it's even easier to reproduce the bug than importing the project. Help > Welcome triggers the crash for me.

I tested again with SWT_GTK3=1 and it works OK (well except the fact that all views are empty but it doesn't crash). So it's really when using GTK2 (SWT_GTK3=0) that it's problematic. It's not too surprising though since the crashing webkit code in question is in #ifdef GTK_API_VERSION_2.

> One difference I could note:- you seems to be using Open JDK 6 (as seen in
> your core dump) where as I am using IBM JRE 7.

Hmm, I wonder if it really makes a difference. I see the crash with Open JDK 7 as well.
Comment 11 Marc-André Laperle CLA 2014-01-27 15:14:44 EST
(In reply to Dani Megert from comment #8)
> (In reply to Marc-Andre Laperle from comment #7)
> > (In reply to Dani Megert from comment #6)
> > > Also note, that we currently have problems with GTK+ 3 on Ubuntu 14.04. See
> > > bug 421127 for details.
> > 
> > But I'm using GTK2 (SWT_GTK3=0)
> 
> Sure. Just a reminder in case you try GTK3+.

Oops, sorry, I thought you misread my original comment but I was the one who misinterpreted your comment ;) Thanks.

From what I understand, webkit2gtk is a different library/.so, it's like different framework level. libwebkitgtk 2.3.2 contains both webkit1 and webkit2 source and builds both framework versions, webkit1 being in maintenance mode. SWT always uses webkit1 either with GTK2 (libwebkitgtk-1.0.so) or GTK3 (libwebkitgtk-3.0.so). SWT doesn't try to load webkit2 yet (libwebkit2gtk-3.0.so) which is what Bug 425123 is about. This crash occurs when webkit1 is used which makes it not a duplicate of 425123. I also tested the patch there and it did not address the crash.
Comment 12 Niraj Modi CLA 2014-01-29 11:23:04 EST
Tried with GTK2 on Ubuntu 14.04 with libwebkitgtk-1.0-0 version 2.3.4-1Ubuntu3, the issue is reproducible
whereas with GTK2 on Ubuntu 13.10 with libwebkitgtk-1.0-0 version 1.10.2-0Ubuntu3 issue is not reproducible.

The problem doesn't seems to be with libwebkitgtk-1.0-0 library as such but in the way it gets packaged under version 2.3.4-1Ubuntu3.

Note:- In both of the above configurations Internal Browser works.
Comment 13 Marc-André Laperle CLA 2014-01-29 11:42:34 EST
(In reply to Niraj Modi from comment #12)
> Tried with GTK2 on Ubuntu 14.04 with libwebkitgtk-1.0-0 version
> 2.3.4-1Ubuntu3, the issue is reproducible

Great thank you!

> The problem doesn't seems to be with libwebkitgtk-1.0-0 library as such but
> in the way it gets packaged under version 2.3.4-1Ubuntu3.

Sorry I'm not sure I understand what you mean. Can you expand on that? Are you talking about the mismatching version numbers (1.0 vs 2.3.4)? All the libwebkitgtk shared objects come from the same source package (webkitgtk 2.3.4) but are produced using different parameters: --with-gtk=2.0|3.0, --enable-webkit1, --enable-webkit2, etc.

               GTK2                GTK3
Webkit1  libwebkitgtk-1.0.so   libwebkitgtk-3.0.so

Webkit2  -------------------   libwebkit2gtk-3.0.so
Comment 14 Marc-André Laperle CLA 2014-02-03 17:10:47 EST
I have spent some time debugging this issue and I have found that disabling overlay-scrollbar (LIBOVERLAY_SCROLLBAR=0) works around the issue. I am not sure why this is the case yet. WEBKIT_WEB_VIEW(widget)->priv->backingStore is null because ChromeClient::widgetSizeChanged doesn't get called...because webView->priv->needsResizeOnMap is false. It looks like the behavior for size allocation is different between 13.10 and 14.04 but I'll have to debug some more to know where the real problem is.
Comment 15 Marc-André Laperle CLA 2014-03-12 20:08:43 EDT
I sent a patch to webkit.
https://bugs.webkit.org/show_bug.cgi?id=129784
Comment 16 Arun Thondapu CLA 2014-04-21 10:06:38 EDT
*** Bug 433099 has been marked as a duplicate of this bug. ***
Comment 17 Arun Thondapu CLA 2014-04-21 14:49:53 EDT
Closing as NOT_ECLIPSE as this seems to be a bug either with the overlay scrollbars library or the webkit library. Since the fix(workaround) for bug 424343 disables overlay scrollbars in Ubuntu by default for Eclipse, this bug should also be not seen now.