Bug 492379 - Welcome screen is empty or has bad size on Ubuntu 16.04 unless libwebkitgtk-3.0-0 is installed
Summary: Welcome screen is empty or has bad size on Ubuntu 16.04 unless libwebkitgtk-3...
Status: CLOSED DUPLICATE of bug 498829
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy, readme
: 496866 (view as bug list)
Depends on:
Blocks: 492371
  Show dependency tree
 
Reported: 2016-04-25 11:46 EDT by Per Mildner CLA
Modified: 2016-10-11 11:26 EDT (History)
6 users (show)

See Also:


Attachments
Screenshot (501.33 KB, image/png)
2016-05-02 17:06 EDT, Per Mildner CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Per Mildner CLA 2016-04-25 11:46:33 EDT
The Welcome screen (menu Help/Welcome) has a blank content area in Eclipse 4.6.0M6 (64-bit) on Ubuntu 16.04 Desktop, unless SWT_GTK3=0 is set in the environment.

Note: When installing with Oomph, and starting the installed Eclipse-variant using the "Launch"-button, SWT_GTK3=0 is set in the environment, so everything seems OK until you try to launch the installed program from the desktop (by double-clicking), at which point the graphical problems appear.

I tried this with CDT and Eclipse for committers, installed via Oomph. No difference in behavior.

(This and other more severe UI problems makes 4.5.2 unusable on Ubuntu 16.04)

PS. The graphics card is "RV730 XT [Radeon HD 4670] [1002:9490]", not Intel as in some other related reports.
Comment 1 Patrik Suzzi CLA 2016-05-02 13:45:26 EDT
AFAIK GTK 3.20+ should work with Eclipse Neon M7+

May I ask you to repeat the test by downloading Neon M7 from (#1)? 

#1 http://download.eclipse.org/eclipse/downloads/drops4/S-4.6M7-201604280800/
Comment 2 Per Mildner CLA 2016-05-02 17:06:02 EDT
Created attachment 261414 [details]
Screenshot
Comment 3 Per Mildner CLA 2016-05-02 17:07:08 EDT
Still does not work.

Installed ubuntu-16.04-desktop-amd64.iso as a VMWare Fusion guest. Updated OS, Installed default JDK.

Installed the http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/S-4.6M7-201604280800/eclipse-SDK-4.6M7-linux-gtk-x86_64.tar.gz&mirror_id=1156

Double click "eclipse" in the "eclipse" folder. Opens with an empty Welcome screen. See screen shot, above.

Does this work for the contributors but not for ordinary users? Otherwise, what do you mean by "GTK 3.20+ should work with Eclipse Neon M7+", have you tried it?
Comment 4 Patrik Suzzi CLA 2016-05-03 05:57:28 EDT
(In reply to Per Mildner from comment #3)
> Does this work for the contributors but not for ordinary users? Otherwise,
> what do you mean by "GTK 3.20+ should work with Eclipse Neon M7+", have you
> tried it?

GTK Library introduced some changes in GTK 3.20.
Eclipse SWT Team addressed these changes starting from Neon. 
Most of the issues with GTK 3.20 are solved if you use Neon M7 or higher.

A typical indicator is "when a bug is solved exporting GTK_3=0", 
then probably it is a bug fixed in Neon M7
Comment 5 Per Mildner CLA 2016-05-03 06:09:31 EDT
I do not know how to check the GTK version, but "dpkg -l libgtk* | grep 3" says things line "ii  libgtk-3-0:amd 3.18.9-1ubun amd64" which suggests that the version is 3.18 rather than 3.20.
Comment 6 Arun Thondapu CLA 2016-05-03 06:47:09 EDT
This bug is indeed reproducible on stock Ubuntu 16.04 even with Neon M7 but it is not really because of an Eclipse or SWT bug.

Ubuntu 16.04, by default, comes installed with only Webkit2 (libwebkit2gtk-4.0-37 is the package name) which is not yet fully supported by SWT, there is work in progress to add support for Webkit2 (bug 441568) but that will not happen in Neon for sure.

In order to get the browser to work again in Neon, you'll need to install the Webkit1 packages via the following commands:

"sudo apt-get install libwebkitgtk-3.0-0" - to install Webkit1 for GTK3

"sudo apt-get install libwebkitgtk-1.0-0" - to install Webkit1 for GTK2

I'm not sure we can do anything in SWT to fix this in stock Ubuntu 16.04 but we should probably include this in Neon's readme documentation.
Comment 7 Per Mildner CLA 2016-05-03 06:51:39 EDT
I can confirm that "sudo apt-get install libwebkitgtk-3.0-0" brought back the contents of the Welcome screen.

Thanks.
Comment 8 Arun Thondapu CLA 2016-05-03 07:35:12 EDT
I'm curious how the Welcome screen is rendering properly with GTK2 on stock Ubuntu 16.04 even when the browser is not installed...

Brian, do you know whether there is any special handling for rendering the content of the Welcome screen when the browser widget is not available? 

If so, the next question, is why would that special handling work with GTK2 and not with GTK3?
Comment 9 Per Mildner CLA 2016-05-03 07:39:43 EDT
I will re-verify that the Welcome screen really _does_ work with SWT_GTK3=0. (This report was originally motivated by bugs in Mars, where SWT_GTK3=0 did help in some cases).

I will come back in within an hour with a result from my original machine.
Comment 10 Per Mildner CLA 2016-05-03 07:52:15 EDT
It does indeed work with SWT_GTK3=0 (but it looks different from running without SWT_GTK3=0 after "sudo apt-get install libwebkitgtk-3.0-0" (These are different machines, though).

I did this:
Downloaded download.eclipse.org/eclipse/downloads/drops4/S-4.6M7-201604280800/download.php?dropFile=eclipse-SDK-4.6M7-linux-gtk-x86_64.tar.gz

In a shell, 

   ./eclipse

shows an empty Welcome screen. (started with a new workspace, when prompted at startup).


   SWT_GTK3=0 ./eclipse 

shows a non-empty Welcome screen.  (started with a yet another new workspace, when prompted at startup).
Comment 11 Patrik Suzzi CLA 2016-05-31 11:15:37 EDT
I have the same issue with Eclipse Neon RC3 on Ubuntu Desktop 16.04 with
org.eclipse.swt.internal.gtk.version=3.18.9
- see http://i.imgur.com/o6FPJBs.png

NOTE: I did not have this issue with Ubuntu 15.10 (and gtk.version=3.16)

After exporting SWT_GTK3=0 I see the welcome screen, but icons seems too big w.r.t. Windows and MacOs, with 
org.eclipse.swt.internal.gtk.version=2.24.30
- see http://i.imgur.com/SctuwJG.png

After installing libwebkitgtk-3.0-0 as suggested and forcing SWT_GTK3=1, the welcome screen looks exactly like in Windows and MacOsX, with
org.eclipse.swt.internal.gtk.version=3.18.9
- see: http://i.imgur.com/dVla7ce.png

Hence, seems this is a non eclipse issue, solvable just by installing the following

sudo apt-get install libwebkitgtk-3.0-0
Comment 12 Patrik Suzzi CLA 2016-05-31 11:16:46 EDT
Moving to SWT.

I wonder if this will solve most of the GTK Issues on Ubuntu
Comment 13 Patrik Suzzi CLA 2016-05-31 11:32:45 EDT
(In reply to Patrik Suzzi from comment #12)
> I wonder if this will solve most of the GTK Issues on Ubuntu

This just installs a proper version of the WebKit Browser
Comment 14 Alexander Kurtakov CLA 2016-05-31 12:51:11 EDT
Alternative might be to start with SWT_WEBKIT2=1 . It will switch eclipse to use libwebkit2gtk by default. It's probably time to reverse the logic and if libwebkitgtk3 can't be dlopen to try libwebkit2gtk.
Comment 15 Brian de Alwis CLA 2016-06-01 10:43:36 EDT
(In reply to Arun Thondapu from comment #8)
> I'm curious how the Welcome screen is rendering properly with GTK2 on stock
> Ubuntu 16.04 even when the browser is not installed...
> 
> Brian, do you know whether there is any special handling for rendering the
> content of the Welcome screen when the browser widget is not available? 
> 
> If so, the next question, is why would that special handling work with GTK2
> and not with GTK3?

There is a special SWT-based renderer in the Welcome that looks like a browser, but is severely restricted.  But I don't know why it doesn't work with GTK3.
Comment 16 Patrik Suzzi CLA 2016-06-30 04:42:35 EDT
Several of the new Linux bugs on Platform are related to WEBKIT vs WEBKIT 2
(and still lots of people think WEBKIT issues are actually GTK 2/3 related)

(In reply to Alexander Kurtakov from comment #14)
> Alternative might be to start with SWT_WEBKIT2=1 . It will switch eclipse to
> use libwebkit2gtk by default. 

> It's probably time to reverse the logic and if
> libwebkitgtk3 can't be dlopen to try libwebkit2gtk.

I think this is a very good idea. This will solve many of the issues issues in Linux systems. 

Another possible option is to first look for libwebkit2gtk, if available, use it; otherwise, fall back to the current libwebkitgtk case.
Comment 17 Alexander Kurtakov CLA 2016-06-30 04:50:56 EDT
(In reply to Patrik Suzzi from comment #16)
> Several of the new Linux bugs on Platform are related to WEBKIT vs WEBKIT 2
> (and still lots of people think WEBKIT issues are actually GTK 2/3 related)
> 
> (In reply to Alexander Kurtakov from comment #14)
> > Alternative might be to start with SWT_WEBKIT2=1 . It will switch eclipse to
> > use libwebkit2gtk by default. 
> 
> > It's probably time to reverse the logic and if
> > libwebkitgtk3 can't be dlopen to try libwebkit2gtk.
> 
> I think this is a very good idea. This will solve many of the issues issues
> in Linux systems. 
> 
> Another possible option is to first look for libwebkit2gtk, if available,
> use it; otherwise, fall back to the current libwebkitgtk case.

There is a problem with loading libwebkit2gtk first and it's that it's not implementing full SWT API. Thus until this is fixed it has to be fallback option if libwebkitgtk3 is not available . Bug 441568 has details.
Comment 18 Patrik Suzzi CLA 2016-06-30 08:53:33 EDT
*** Bug 496866 has been marked as a duplicate of this bug. ***
Comment 19 Alexander Kurtakov CLA 2016-10-11 11:26:02 EDT

*** This bug has been marked as a duplicate of bug 498829 ***