Bug 534759 - [GTK3] Running Eclipse with -nosplash causes input problems
Summary: [GTK3] Running Eclipse with -nosplash causes input problems
Status: VERIFIED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Launcher (show other bugs)
Version: 4.6.0 Neon   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: Photon RC2   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-16 08:39 EDT by Simeon Andreev CLA
Modified: 2019-05-30 17:05 EDT (History)
8 users (show)

See Also:
akurtakov: review+
sravankumarl: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simeon Andreev CLA 2018-05-16 08:39:53 EDT
In our product we observe obscure problems, mostly the same as the ones described in bug 435742.

Mostly, arrows and backspace, and/or different key bindings such as ctrl+z, ctrl+s, ctrl+c, ctrl+v stop working seemingly at random.

After two unfortunate weeks we discovered bug 435742 by chance. Again by chance, we noticed that GDK_CORE_DEVICE_EVENTS is not set in our product.

We then found the cause: Running Eclipse with -nosplash option which causes the fix for bug 435742 to not be applied. This looks like a regression caused by fix for bug 472042.

Observed with Eclipse SDK 4.7.2, on RHEL 7.2 (GTK 3.14.13) and RHEL 7.4 (GTK 3.22.10).

Setting severity to critical since Eclipse is mostly unusable with -nosplash and GTK3.
Comment 1 Simeon Andreev CLA 2018-05-16 12:19:42 EDT
Looking at https://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=7259e7994a1de3254e321b735a3f375c5d961d09, this is maybe not really a regression from bug 472042 but a coincidence.

A message was removed in the commit and so the GTK initialization is no longer done. I.e. it was more of a coincidence that the fix for bug 435742 ran in general.
Comment 2 Eclipse Genie CLA 2018-05-17 06:12:14 EDT
New Gerrit change created: https://git.eclipse.org/r/122853
Comment 3 Simeon Andreev CLA 2018-05-17 06:22:24 EDT
https://git.eclipse.org/r/#/c/122853/ fixes the problem of missing GDK_CORE_DEVICE_EVENTS=1 with -nosplash option.

After rebuilding the launcher, I just copied the eclipse executable to a copy of my normal Eclipse installation. I also removed eclipse_1703.so from plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.700.v20180323-1026/
 and replaced it with the eclipse_1704.so which was produced from the build. I hope this is enough for validation, I could see the GTK env variable after this.

I ran the Java code formatter application without DISPLAY, to try to see if the problem from 472042 is re-introduced with the change. Output is:

(unset DISPLAY && ~/eclipses/eclipse48SDKContributorNightly_copy/eclipse -nosplash  -consoleLog --launcher.appendVmargs -vm $JAVA_HOME/bin/java -application org.eclipse.jdt.core.JavaCodeFormatter -verbose -data ~/tmp/tmpws/ -config ~/tmp/formatter_test/org.eclipse.jdt.core.prefs ~/tmp/formatter_test/sources/)
Configuration Name: /home/sandreev/tmp/formatter_test/org.eclipse.jdt.core.prefs
Starting format job ...
Formatting: /home/sandreev/tmp/formatter_test/sources/CodeFormatterApplication.java
Done.

Since bug 472042 lacks an example "headless" application, I assume the code formatter is good enough to check if the problem is seen.

So far I don't know how to update the binaries as specified in https://bugs.eclipse.org/bugs/show_bug.cgi?id=472042#c13.
Comment 4 Eclipse Genie CLA 2018-05-18 04:19:58 EDT
New Gerrit change created: https://git.eclipse.org/r/122917
Comment 6 Andrey Loskutov CLA 2018-05-18 07:51:37 EDT
Thanks Sravan & Alexander for your review & time!

We will wait for the next SDK build to verify & close.

@Simeon: I will not be able to test on Linux build because I will not have access to my Linux workstation from today till Juni.

Can you please verify on the *next* platform build (after RC1) that the GDK_CORE_DEVICE_EVENTS variable is set even with -nosplash?
Comment 8 Simeon Andreev CLA 2018-05-20 07:53:18 EDT
Checked with:

Eclipse SDK
Version: Photon (4.8)
Build id: I20180519-1500

I can see the env variable when starting Eclipse with -nosplash option. I.e. the patch works.
Comment 9 Kit Lo CLA 2019-05-30 16:38:29 EDT
We have users seeing the problem in 4.6 as originally reported in this bug. Can this fix be backported to 4.6?
Comment 10 Andrey Loskutov CLA 2019-05-30 17:05:11 EDT
(In reply to Kit Lo from comment #9)
> We have users seeing the problem in 4.6 as originally reported in this bug.
> Can this fix be backported to 4.6?

Sure, but not by me. 4.6 support time is over, if you need this backport, you must do it yourself.