Bug 492259 - Eclipse crashes when using SWT_GTK3=0
Summary: Eclipse crashes when using SWT_GTK3=0
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks: 492371
  Show dependency tree
 
Reported: 2016-04-22 11:07 EDT by Antoun Kanawati CLA
Modified: 2017-01-08 08:49 EST (History)
4 users (show)

See Also:


Attachments
Crash trace (72.02 KB, text/plain)
2016-04-22 11:07 EDT, Antoun Kanawati CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antoun Kanawati CLA 2016-04-22 11:07:19 EDT
Created attachment 261177 [details]
Crash trace

Attempted using this environment variable to mitigate some UI problems that popped upon upgrading up to ubuntu 16.04.

The IDE crashes with a trace, after bringing up the splash screen and the initial window.

Using java 8u77 from Oracle, x86_64 host, ubuntu 16.04.
Comment 1 Brian de Alwis CLA 2016-04-25 11:30:05 EDT
Moving to SWT: I haven't seen reports like this error before.

The version of GTK3 that ships with 16.04 is known to cause issues.  Eclipse Neon, which ships officially in June, is known to work very well on 16.04. The milestone builds are very stable:

   https://www.eclipse.org/downloads/index-developer.php
Comment 2 Arun Thondapu CLA 2016-04-25 13:34:08 EDT
Thanks for the bug report!

I just tried this on Ubuntu 16.04 with 4.5.2 as well as 4.6 (recent I-build).

I'm able to launch and run eclipse both with and without using SWT_GTK3=0, not sure if something went wrong during the upgrading of Ubuntu that is causing this issue, I tried on a fresh install of Ubuntu 16.04.

Would it be possible for you to try on a fresh install of Ubuntu to confirm? Also, can you attach the hs_err_*pid* log file that gets generated when eclipse crashes?
Comment 3 Antoun Kanawati CLA 2016-04-26 10:51:50 EDT
I did a fresh re-install, and I have no problems anymore, with or without the environment variable.

Thanks.
Comment 4 Antoun Kanawati CLA 2016-04-26 10:57:04 EDT
Will have to do some work to bring up the old environment, and look for or generate the hs_err* files.
Comment 5 Alexander Kurtakov CLA 2016-04-27 04:58:44 EDT
Looking at the attached log the problem is caused by /usr/lib/browser-plugin-freshplayer-pepperflash/libfreshwrapper-flashplayer.so which is compiled against Gtk2(IIRC) and due to Eclipse using webkit 1.x api plugins are loaded in process thus resulting in gtk3 and gtk2 loaded in same process leading to the crash.  We have hit many issues wiht browser plugins and until a move to webkit 2.x api is completed to run them out of process eclipse is open to browser plugins taking it down.
Comment 6 Arun Thondapu CLA 2016-05-06 06:27:32 EDT
(In reply to Antoun Kanawati from comment #3)
> I did a fresh re-install, and I have no problems anymore, with or without
> the environment variable.
> 
> Thanks.

Thanks for the response Antoun! I propose to close this bug as WORKSFORME now, can be reopened if necessary.
Comment 7 Arun Thondapu CLA 2016-05-06 06:37:34 EDT
(In reply to Alexander Kurtakov from comment #5)
> Looking at the attached log the problem is caused by
> /usr/lib/browser-plugin-freshplayer-pepperflash/libfreshwrapper-flashplayer.
> so which is compiled against Gtk2(IIRC) and due to Eclipse using webkit 1.x
> api plugins are loaded in process thus resulting in gtk3 and gtk2 loaded in
> same process leading to the crash.  We have hit many issues wiht browser
> plugins and until a move to webkit 2.x api is completed to run them out of
> process eclipse is open to browser plugins taking it down.

Alex, I'm probably missing something here but I don't seem to understand how loading the freshplayerplugin could be the cause for this crash. There cannot be a mix up of GTK3 and GTK2 libraries here as eclipse is loading the GTK2 libraries (SWT_GTK3=0) and libfreshwrapper-flashplayer.so is also dependent on the same, where/how would GTK3 be coming into the picture here?

I have the same doubt regarding bug 492045 as well as the crash log seems to indicate eclipse running in GTK2 mode.
Comment 8 Marc-André Laperle CLA 2016-05-16 18:40:58 EDT
I think this is probably a "normal crash" in libfreshwrapper-flashplayer.so, not caused by a mix-up of GTK versions.
Comment 9 Marc-André Laperle CLA 2016-11-03 00:02:29 EDT
I can reproduce the crash:
Ubuntu 16.04 64-bit
Eclipse Neon.1
Install package: browser-plugin-freshplayer-pepperflash
SWT_GTK3=0
Start a new workspace or open the welcome screen.
Comment 10 Alexander Kurtakov CLA 2017-01-08 08:49:35 EST
Whoever experiences crashes caused by some browser plugings installed has single option - use GTK3 and enforce webkit2 (via SWT_WEBKIT2=1 env variable). Reason for that is that Webkit2 runs plugins out of process so plugin crashes do not bring the whole webkit down and as a result swt too.  Webkit1 runs browser plugins in-process so there is nothing we can do and there is no Webkit2 for gtk2. 
Other option is to uninstall the plugin in question.
Resolving the bug as wontfix due to the previous.