Bug 486316 - [GTK3] Invoking quick fix from hover window does not work
Summary: [GTK3] Invoking quick fix from hover window does not work
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 normal with 6 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo, triaged
: 543203 (view as bug list)
Depends on:
Blocks: 542104
  Show dependency tree
 
Reported: 2016-01-22 03:11 EST by Kaloyan Raev CLA
Modified: 2021-02-23 05:06 EST (History)
19 users (show)

See Also:


Attachments
Logs while trying latest photon release and a nightly build. (6.86 KB, application/zip)
2018-09-07 04:53 EDT, Muhammad Gelbana CLA
no flags Details
Ubuntu working hover (139.41 KB, video/webm)
2019-03-27 12:01 EDT, Xi Yan CLA
no flags Details
Reproduction for 2019-03 build (778.76 KB, image/gif)
2019-03-27 12:13 EDT, Muhammad Gelbana CLA
no flags Details
Pop-ups not working (966.30 KB, video/webm)
2019-08-12 08:35 EDT, Ante Smolčić CLA
no flags Details
Test with keyboard layout options (1.30 MB, video/webm)
2020-06-10 19:54 EDT, Ante Smolčić CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kaloyan Raev CLA 2016-01-22 03:11:07 EST
This issue happens only when GTK3 is used. GTK2 is not affected.

When I hover the mouse on a problem marker inside the code editor, a hover window with proposed quick fixes is displayed. Clicking on a quick fix does not produce the expected result. The following exception is logged in the error log:

org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4491)
	at org.eclipse.swt.SWT.error(SWT.java:4406)
	at org.eclipse.swt.SWT.error(SWT.java:4377)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:482)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:419)
	at org.eclipse.swt.widgets.Control.redraw(Control.java:3719)
	at org.eclipse.swt.widgets.Link.gtk_event_after(Link.java:387)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1966)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:5590)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4717)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:9279)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1225)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2425)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3428)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
Comment 1 Alexander Kurtakov CLA 2016-01-26 17:00:29 EST
Which OS is that? Which Gtk version? Which Eclipse version? I can't reproduce with latest Neon N-build on Fedora 23.
Comment 2 Kaloyan Raev CLA 2016-01-28 07:20:25 EST
I've just tried with Eclipse SDK N20160123-1500 and it is still reproducible.

The OS is Fedora 23 64-bit. I could not find how to get the exact version of GTK3 I have installed.

Here are the exact steps to reproduce:
1. Download and extract Eclipse SDK.
2. Start it in a new workspace.
3. Create new Java Project.
4. Create new Java Class.
5. Have the following code in the class file: 

public class Main {
	public static void main(String[] args) {
		System.out.println(myvar);
	}
}

6. Hover the mouse over "myvar".
7. Click on any the action link of the proposed quick fixes in the hover window, e.g. "Create local variable".
Comment 3 Andrey Loskutov CLA 2016-01-28 07:31:15 EST
(In reply to Kaloyan Raev from comment #2)
> The OS is Fedora 23 64-bit. I could not find how to get the exact version of
> GTK3 I have installed.

rpm -q gtk3
Comment 4 Kaloyan Raev CLA 2016-02-16 03:23:30 EST
(In reply to Andrey Loskutov from comment #3)
> rpm -q gtk3

gtk3-3.18.6-1.fc23.x86_64

P.S. Sorry for the late response. I've just found that most of the Bugzilla notifications go to my mail's junk folder.
Comment 5 Snjezana Peco CLA 2016-02-16 17:45:17 EST
I can't reproduce the issue. I have tested Neon 4.6M4 with GTK 3.14.13 and SWT master with GTK 3.18.5, GTK 3.18.6, GTK 3.18.7
However, I think https://git.eclipse.org/r/#/c/60027/ (bug 354842) will fix this issue as well as a lot of freezing issues.
Comment 6 Robert Roth CLA 2016-04-16 20:22:47 EDT
Can not reproduce either with F23 and GTK 3.18.9, on Eclipse Neon 4.6M7, so maybe this could be set as fixed.
Comment 7 Alexander Kurtakov CLA 2016-04-17 02:11:52 EDT
Marking as fixed as per last two comments. If someone still reproduce it please reopen with details about versions of relevant libraries, distro, special cases to reproduce and etc.
Comment 8 Kaloyan Raev CLA 2016-04-20 03:50:50 EDT
I still get the error with the latest N-build N20160418-2000, following the exact same steps from comment #2.

I updated my Fedora with "sudo dnf update --refresh". Now I have GTK 3.18.9.
Comment 9 Alexander Kurtakov CLA 2016-04-20 05:28:52 EDT
(In reply to Kaloyan Raev from comment #8)
> I still get the error with the latest N-build N20160418-2000, following the
> exact same steps from comment #2.
> 
> I updated my Fedora with "sudo dnf update --refresh". Now I have GTK 3.18.9.

Any chance you're using Gnome on wayland, KDE, XFCE, smth else?
Comment 10 Kaloyan Raev CLA 2016-04-20 05:58:50 EDT
No. I believe I have a pretty standard installation of Fedora.
Comment 11 Robert Roth CLA 2016-04-20 07:46:46 EDT
I have just tried again with the latest nightlies, also on Fedora 23 (X11 session, not Wayland) freshly updated with the same command, with gtk3-3.18.9-1.fc23.x86_64, I have tried all the links in the quick fix tooltip, and all of them work.
Comment 12 Kaloyan Raev CLA 2016-04-22 08:26:57 EDT
Alex suggested that I try debugging the issue.

I've put a breakpoint on the call to redraw() in the Link.gtk_event_after() method (currently line 414).

When clicking on a quick fix's link on the hover window, the debugger stops at the breakpoint, i.e. a "focus change" event has been generated. The Link's reference to the Display is still != null.

The Link.gtk_event_after() method calls the super Control.gtk_event_after() method, which sends the focus event, which is handled by the StickyHoverManager, which closes the hover window. Closing the hover windows disposes all contained widgets, including the Link I've just clicked. Disposing the widget makes its reference to Display == null.

So far, so good. The problem comes when immediately a second focus change event comes and the debugger stops at the same breakpoint. But the Display reference for this Link is already null and hence the "Widget is disposed" exception is thrown.

Perhaps, the root cause of the issue is that GTK generates two "focus change" events for a single click on the Link widget. 

Can't we just check if the widget is disposed before calling the redraw() method? I see this approach is already used in the Link.enableWidget() method.
Comment 13 Kazimieras Vaina CLA 2017-06-29 02:31:49 EDT
Hi, any progress on this ?
Problem is still reproducible on Fedora 25 (gtk3-3.22.16-1.fc25.x86_64) and Eclipse Neon.

Also I'm unable navigate to another source file in java editor when clicking a link in javadoc tooltip. The tooltip just disappears, no error is logged.
Comment 14 Alexander Kurtakov CLA 2017-06-29 02:36:05 EDT
Would you please try with the just released Oxygen? Also with SWT_WEBKIT2=1 env variable if it doesn't work initially. There were quite some changes in SWT so we would better be sure it is not fixed or changed before being investigated. I can  not reproduce on Fedora 26 with Oxygen for now.
Comment 15 Kazimieras Vaina CLA 2017-06-29 15:25:03 EDT
Thank you for the suggestion, I just tried to reproduce problem on oxygen and fedora 26 (gtk3-3.22.16-1.fc26.x86_64) but without additional environment variable.

The problem is gone, but only in gnome-wayland session. In gnome-xorg session the bug is still present.. very strange.

Would it be possible for you login into gnome-xorg session and attempt to reproduce the problem for yourself? I wonder if there's anything special with my setup.

I made a mistake in my previous comment - I was using eclipse oxygen (some RC version) but not neon. Prior writing this comment I downloaded the release version of eclipse oxygen.
Comment 16 Leo Ufimtsev CLA 2017-06-29 17:17:19 EDT
(In reply to Kazimieras Vaina from comment #15)
> The problem is gone, but only in gnome-wayland session. In gnome-xorg
> session the bug is still present.. very strange.

Side note:
I think this is the first time I hear something eclipse related works on Wayland but not on X11 (as oppose to the other way around) :-)
Comment 17 Alexander Kurtakov CLA 2017-06-30 01:42:20 EDT
Just tried with gnome on xorg. Can't reproduce the issue again.
Comment 18 Alexander Kurtakov CLA 2017-06-30 01:43:43 EDT
Would you please try with new user? So we can verify it's not some config for your user.
Comment 19 Kazimieras Vaina CLA 2017-06-30 06:50:46 EDT
> Would you please try with new user? So we can verify it's not some config for your user.
I tried that on fedora 25 - it works. I wonder what is causing tooltip/hover window to disappear with my regular user...
Comment 20 Alexander Kurtakov CLA 2017-06-30 06:52:19 EDT
(In reply to Kazimieras Vaina from comment #19)
> > Would you please try with new user? So we can verify it's not some config for your user.
> I tried that on fedora 25 - it works. I wonder what is causing tooltip/hover
> window to disappear with my regular user...

Seriously, I'm out of ideas here. Any browser plugins you have installed for this user maybe? In the past google talk, bluejeans and etc. were causing even hard crashes.
Comment 21 Kazimieras Vaina CLA 2017-06-30 07:24:44 EDT
I'll try to fiddle with browser plugins...

I launched eclipse in "failing" environment with GTK_DEBUG=tree 
When I click on quick fix in a hover window following is printed in console:


Gtk-Message: _gtk_rbtree_insert_after: 0x7fbf1bc0d960
(0x7fbf1ba6eb30 - BLACK) (Offset 72) (Parity 3) (Validity 110)
	(0x7fbf1ba6ead0 -  RED ) (Offset 24) (Parity 1) (Validity 110)
	(0x7fbf1bc0d960 -  RED ) (Offset 24) (Parity 1) (Validity 110)

Gtk-Message: _gtk_rbtree_insert_after finished...
(0x7fbf1ba6eb30 - BLACK) (Offset 72) (Parity 4) (Validity 110)
	(0x7fbf1ba6ead0 - BLACK) (Offset 24) (Parity 1) (Validity 110)
	(0x7fbf1bc0d960 - BLACK) (Offset 24) (Parity 2) (Validity 110)
		(0x7fbf1876da40 -  RED ) (Offset 0) (Parity 1) (Validity 110)

In the "good" environment there are no such messages.
Comment 22 Alexander Kurtakov CLA 2018-06-08 14:02:47 EDT
Would you please try with 4.8 RC just released? The browser implementation is changed significantly including switch to Webkit 2.
Comment 23 Eric Williams CLA 2018-08-16 11:11:56 EDT
Ping, any update here?
Comment 24 Kazimieras Vaina CLA 2018-08-20 02:01:36 EDT
I'm using Eclipse Java EE IDE for Web Developers on Xorg.

Version: Photon Release (4.8.0)
Build id: 20180619-1200

The problem is still there. How do know what version of webkit the eclipse is using ?
Comment 25 Eric Williams CLA 2018-08-24 12:15:50 EDT
(In reply to Kazimieras Vaina from comment #24)
> I'm using Eclipse Java EE IDE for Web Developers on Xorg.
> 
> Version: Photon Release (4.8.0)
> Build id: 20180619-1200
> 
> The problem is still there. How do know what version of webkit the eclipse
> is using ?

In Eclipse's about dialog, there should be an entry "org.eclipse.swt.internal.webkitgtk.version".
Comment 26 Eric Williams CLA 2018-08-24 13:18:32 EDT
Furthermore, if you want to force Webkit2 to check if the issue reproduces, set the environment variable SWT_WEBKIT2=1.
Comment 27 Kazimieras Vaina CLA 2018-08-28 03:16:16 EDT
In eclipse About/Installation details/Configuration I can find only:
org.eclipse.swt.internal.deviceZoom=100
org.eclipse.swt.internal.gdk.backend=x11
org.eclipse.swt.internal.gtk.theme=Plano
org.eclipse.swt.internal.gtk.version=3.22.30

But there is no org.eclipse.swt.internal.webkitgtk.version

Setting the SWT_WEBKIT2=1 does not help.
Comment 28 Alexander Kurtakov CLA 2018-08-28 03:22:42 EDT
(In reply to Kazimieras Vaina from comment #27)
> In eclipse About/Installation details/Configuration I can find only:
> org.eclipse.swt.internal.deviceZoom=100
> org.eclipse.swt.internal.gdk.backend=x11
> org.eclipse.swt.internal.gtk.theme=Plano
> org.eclipse.swt.internal.gtk.version=3.22.30
> 
> But there is no org.eclipse.swt.internal.webkitgtk.version
> 
> Setting the SWT_WEBKIT2=1 does not help.

Open internal web browser first and check for that property again - it is set only after browser is opened.
Comment 29 Kazimieras Vaina CLA 2018-08-28 03:31:18 EDT
ok, I found 
org.eclipse.swt.internal.webkitgtk.version=2.20.5

even without SWT_WEBKIT2=1
Comment 30 Muhammad Gelbana CLA 2018-09-07 04:53:05 EDT
Created attachment 275736 [details]
Logs while trying latest photon release and a nightly build.
Comment 31 Muhammad Gelbana CLA 2018-09-07 04:56:05 EDT
Comment on attachment 275736 [details]
Logs while trying latest photon release and a nightly build.

Based on a discussion here: https://stackoverflow.com/questions/52046336/javadoc-tooltip-hides-when-i-click-on-it

Howlger requested to share my logs using the photon release I'm using and a nightly build release he sent a link for. I remember downloading that release but I find the version in the logs different from what I expected ! Unfortunately the link is broken now so I used the version I downloaded.

Pardon me for the mess and thank you for your efforts. Please tell me if there is anything else I can do.
Comment 32 Anthony Enrione CLA 2018-12-02 13:07:32 EST
I can confirm that this happens to me as well.

If a tooltip popups over say a variable in the debugger and I attempt to click on the tooltip to view the variable contents, the tooltip will close.

I am running eclipse on Gnome 3.30 on Arch Linux.

I have eclipse 2018-09. I have seen this on previous versions of eclipse. Before I was able to go back to using GTK2 but this has now been dropped from eclipse 2018-09.
Comment 33 Eric Williams CLA 2018-12-02 18:37:39 EST
(In reply to Anthony Enrione from comment #32)
> I can confirm that this happens to me as well.
> 
> If a tooltip popups over say a variable in the debugger and I attempt to
> click on the tooltip to view the variable contents, the tooltip will close.
> 
> I am running eclipse on Gnome 3.30 on Arch Linux.
> 
> I have eclipse 2018-09. I have seen this on previous versions of eclipse.
> Before I was able to go back to using GTK2 but this has now been dropped
> from eclipse 2018-09.

Are you on Wayland by any chance? This is a known issue on Wayland which we are planning to fix in 4.11.
Comment 34 Xi Yan CLA 2018-12-04 09:30:28 EST
Is this a duplicate of https://bugs.eclipse.org/bugs/show_bug.cgi?id=541185 ?
Comment 35 Xi Yan CLA 2018-12-04 09:30:34 EST
Is this a duplicate of https://bugs.eclipse.org/bugs/show_bug.cgi?id=541185 ?
Comment 36 Eric Williams CLA 2019-01-04 13:28:21 EST
Please try a relatively "modern" (i.e. anything newer than December 12th) I-build, as this could be a duplicate of bug 541854.
Comment 37 Muhammad Gelbana CLA 2019-01-07 06:26:40 EST
(In reply to Eric Williams from comment #36)
> Please try a relatively "modern" (i.e. anything newer than December 12th)
> I-build, as this could be a duplicate of bug 541854.

The issue still persists using

- Eclipse's 2018-12 build
- X11
$echo $XDG_SESSION_TYPE
x11

- Kernel 4.15
$ uname -primo
4.15.0-43-generic x86_64 x86_64 x86_64 GNU/Linux

- I have both GTK 2 & 3 installed
$ dpkg -l libgtk2.0-0 libgtk-3-0
ii  libgtk-3-0:amd64
ii  libgtk2.0-0:amd64
Comment 38 Eric Williams CLA 2019-01-07 11:12:31 EST
(In reply to Muhammad Gelbana from comment #37)
> (In reply to Eric Williams from comment #36)
> > Please try a relatively "modern" (i.e. anything newer than December 12th)
> > I-build, as this could be a duplicate of bug 541854.
> 
> The issue still persists using
> 
> - Eclipse's 2018-12 build
> - X11
> $echo $XDG_SESSION_TYPE
> x11
> 
> - Kernel 4.15
> $ uname -primo
> 4.15.0-43-generic x86_64 x86_64 x86_64 GNU/Linux
> 
> - I have both GTK 2 & 3 installed
> $ dpkg -l libgtk2.0-0 libgtk-3-0
> ii  libgtk-3-0:amd64
> ii  libgtk2.0-0:amd64

Which version of GTK3 do you have installed?
Comment 39 Muhammad Gelbana CLA 2019-01-18 11:50:50 EST
(In reply to Eric Williams from comment #38)
> (In reply to Muhammad Gelbana from comment #37)
> > (In reply to Eric Williams from comment #36)
> > > Please try a relatively "modern" (i.e. anything newer than December 12th)
> > > I-build, as this could be a duplicate of bug 541854.
> > 
> > The issue still persists using
> > 
> > - Eclipse's 2018-12 build
> > - X11
> > $echo $XDG_SESSION_TYPE
> > x11
> > 
> > - Kernel 4.15
> > $ uname -primo
> > 4.15.0-43-generic x86_64 x86_64 x86_64 GNU/Linux
> > 
> > - I have both GTK 2 & 3 installed
> > $ dpkg -l libgtk2.0-0 libgtk-3-0
> > ii  libgtk-3-0:amd64
> > ii  libgtk2.0-0:amd64
> 
> Which version of GTK3 do you have installed?

As I shown in my comment, I have both GTK 2 & 3 installed. I figured that out by running the following command.
$ dpkg -l libgtk2.0-0 libgtk-3-0
ii  libgtk-3-0:amd64
ii  libgtk2.0-0:amd64

Should I run a different command ?
Comment 40 Eric Williams CLA 2019-01-25 11:09:56 EST
(In reply to Muhammad Gelbana from comment #39)
> As I shown in my comment, I have both GTK 2 & 3 installed. I figured that
> out by running the following command.
> $ dpkg -l libgtk2.0-0 libgtk-3-0
> ii  libgtk-3-0:amd64
> ii  libgtk2.0-0:amd64
> 
> Should I run a different command ?

This command should show a little table in the terminal, including a "version" column -- what does this say? I.e. for GTK3, 3.22.xx, as an example.
Comment 41 Muhammad Gelbana CLA 2019-01-25 17:48:09 EST
(In reply to Eric Williams from comment #40)
> (In reply to Muhammad Gelbana from comment #39)
> > As I shown in my comment, I have both GTK 2 & 3 installed. I figured that
> > out by running the following command.
> > $ dpkg -l libgtk2.0-0 libgtk-3-0
> > ii  libgtk-3-0:amd64
> > ii  libgtk2.0-0:amd64
> > 
> > Should I run a different command ?
> 
> This command should show a little table in the terminal, including a
> "version" column -- what does this say? I.e. for GTK3, 3.22.xx, as an
> example.

Sure. The architecture of both installations is amd64 and the versions are (3.22.30-1ubuntu1) and (2.24.32-1ubuntu1)
Comment 42 Muhammad Gelbana CLA 2019-03-27 10:51:30 EDT
I'm still facing the same problem with 2019-03 build (4.11.0)
Comment 43 Xi Yan CLA 2019-03-27 12:01:10 EDT
Created attachment 278040 [details]
Ubuntu working hover
Comment 44 Xi Yan CLA 2019-03-27 12:02:25 EDT
(In reply to Muhammad Gelbana from comment #42)
> I'm still facing the same problem with 2019-03 build (4.11.0)

I cannot reproduce the issue with Eclipse 2019-03 on Fedora 29 GTK3.24 under both x11 and Wayland, and the issue also doesn't reproduce for me on Ubuntu 18.04 with GTK3.22 on x11 (see attachment). 

Can you try a fresh install? What are your exact steps to reproduce the issue?
Comment 45 Muhammad Gelbana CLA 2019-03-27 12:13:25 EDT
Created attachment 278041 [details]
Reproduction for 2019-03 build

I just downloaded the 2019-03 build, extracted it, updated my .desktop file (~/.local/share/applications/eclipse.desktop) to be

[Desktop Entry]
Version=Photon
Name=Java IDE (Eclipse Photon)
Comment=Eclipse is an IDE
Exec=/path/eclipse-jee-2019-03-R-linux-gtk-x86_64/eclipse/eclipse
Path=/path/eclipse-jee-2019-03-R-linux-gtk-x86_64/eclipse
Icon=/path/eclipse-jee-2019-03-R-linux-gtk-x86_64/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Utility;Application;Development;

Then I just start it up.
Comment 46 Alexander Kurtakov CLA 2019-03-27 12:28:42 EDT
(In reply to Muhammad Gelbana from comment #45)
> Created attachment 278041 [details]
> Reproduction for 2019-03 build
> 
> I just downloaded the 2019-03 build, extracted it, updated my .desktop file
> (~/.local/share/applications/eclipse.desktop) to be
> 
> [Desktop Entry]
> Version=Photon
> Name=Java IDE (Eclipse Photon)
> Comment=Eclipse is an IDE
> Exec=/path/eclipse-jee-2019-03-R-linux-gtk-x86_64/eclipse/eclipse
> Path=/path/eclipse-jee-2019-03-R-linux-gtk-x86_64/eclipse
> Icon=/path/eclipse-jee-2019-03-R-linux-gtk-x86_64/eclipse/icon.xpm
> Terminal=false
> Type=Application
> Categories=Utility;Application;Development;
> 
> Then I just start it up.

Muhammad, is your Ubuntu fully uptodate? I'm looking for webkit update.
Comment 47 Muhammad Gelbana CLA 2019-03-27 12:56:31 EDT
Yes I usually upgrade my system. I even ran one last upgrade and retried again but had the same behavior.
Comment 48 Ante Smolčić CLA 2019-08-12 08:07:00 EDT
I have the same problem.

Javadoc tooltip disappears when clicked (immediately on mouse-down), when starting to resize, and sometimes just on mouse-hover. Before that you can scroll the contents with mouse-wheel. 

If you click on a disabled button in the little toolbar on the bottom (let's say previous/next) it doesn't close! But, if you click on an enabled one, like "Open Declaration" button, it closes immediately.

When you position the mouse on the bottom-right corner before the scrollbars appear, the focus is grabbed (without clicking) and you can resize the windows but only for a 2-3 pixels, and then it disappears again.

Pressing F2 also closes the window.

After closing the pop-up window, it appears as if the whole Eclipse is refreshed. You can see redrawing of several parts like tab, vertical ruler, scrollbars, toolbar buttons, and sometimes even the Eclipse icon on the Ubuntu Dock. :) this doesn't happen when you close code-completion pop-up.

Code-completion pop-ups work mostly OK, but they lose all keyboard focus after resize (ESC is not working and up/down as well).


- Tried with:
eclipse-jee-2019-06-R-linux-gtk-x86_64
eclipse-jee-2019-09-M2-linux-gtk-x86_64
- Gnome: 3.28.2
- Gnome extensions: 
Alt-tab switcher pop-up delay removal
- tried a few themes, currently on Adwaita, Animations: off
- libwebkit packages:
libwebkit2gtk-4.0-37
libwebkitgtk-1.0-0
- Ubuntu 18.04, X11 session (I cannot use Wayland)
- tried on a single display and on 2 displays
- tried turning off overlay scrollbars (through etc-environment along with gtk3/gtk.css)
- tried: export SWT_WEBKIT2=1
- tried: export SWT_GTK3=0
- Tried gnome/settings: Attach modal dialogs on/off
- tried gnome Tweaks, Window Focus: all 3 options.
- tried disabling Eclipse themes and animations


Eclipse on start outputs this:

(Eclipse:12854): Gtk-CRITICAL **: 13:24:14.223: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar


Maybe related: I had a similar problem with a version of Eclipse from January 2019, on a VM-Fedora30+KDE+Wayland. The tooltips will close on first click and stay open second time they were opened.

Are there any debugging options I can try?
Comment 49 Ante Smolčić CLA 2019-08-12 08:35:19 EDT
Created attachment 279544 [details]
Pop-ups not working

Apparently, Javadoc pop-up works if you go through code completion, but only the second time!

First, I show how is the reqular pop-up closing and how the disabled/inactive toolbar buttons 'previous' and 'next' are not affected.

Then, when you open code completion pop-up and go to javadoc pop-up through there, the first time it's also not working but the second time it works.
Comment 50 Eric Williams CLA 2019-08-12 10:02:14 EDT
(In reply to Ante Smolčić from comment #48)
> I have the same problem.
> 
> Javadoc tooltip disappears when clicked (immediately on mouse-down), when
> starting to resize, and sometimes just on mouse-hover. Before that you can
> scroll the contents with mouse-wheel.

I can kind of reproduce this one. It reproduces sometimes but not reliably.

 
> If you click on a disabled button in the little toolbar on the bottom (let's
> say previous/next) it doesn't close! But, if you click on an enabled one,
> like "Open Declaration" button, it closes immediately.

I cannot reproduce this issue.

 
> When you position the mouse on the bottom-right corner before the scrollbars
> appear, the focus is grabbed (without clicking) and you can resize the
> windows but only for a 2-3 pixels, and then it disappears again.

I can reproduce this.

 
> Pressing F2 also closes the window.

And this. :)
 

> After closing the pop-up window, it appears as if the whole Eclipse is
> refreshed. You can see redrawing of several parts like tab, vertical ruler,
> scrollbars, toolbar buttons, and sometimes even the Eclipse icon on the
> Ubuntu Dock. :) this doesn't happen when you close code-completion pop-up.

Hmm, I don't see this one. It's worth noting that the code-completion pop-up is a completely different thing than the Javadoc hover. The former is just a List whereas the Javadoc hover is actually a Browser instance inside a pop-up. There might be some Ubuntu specific behaviour going on that causes this issue.

 
> Code-completion pop-ups work mostly OK, but they lose all keyboard focus
> after resize (ESC is not working and up/down as well).

I can reproduce this as well.

> - Tried with:
> eclipse-jee-2019-06-R-linux-gtk-x86_64
> eclipse-jee-2019-09-M2-linux-gtk-x86_64
> - Gnome: 3.28.2
> - Gnome extensions: 
> Alt-tab switcher pop-up delay removal
> - tried a few themes, currently on Adwaita, Animations: off
> - libwebkit packages:
> libwebkit2gtk-4.0-37
> libwebkitgtk-1.0-0
> - Ubuntu 18.04, X11 session (I cannot use Wayland)
> - tried on a single display and on 2 displays
> - tried turning off overlay scrollbars (through etc-environment along with
> gtk3/gtk.css)
> - tried: export SWT_WEBKIT2=1
> - tried: export SWT_GTK3=0
> - Tried gnome/settings: Attach modal dialogs on/off
> - tried gnome Tweaks, Window Focus: all 3 options.
> - tried disabling Eclipse themes and animations
> 

A few notes here:
-SWT_GTK3=0 does nothing, GTK2 support is gone
-Trying with SWT_WEBKIT2=0, which *should* force WebKit1 instead of WebKit2, though I don't think this will solve your issues as the bugs are likely in Shell

 
> Eclipse on start outputs this:
> 
> (Eclipse:12854): Gtk-CRITICAL **: 13:24:14.223: gtk_box_gadget_distribute:
> assertion 'size >= 0' failed in GtkScrollbar

This is not related to this bug, it's just a generic sizing warning.


> Maybe related: I had a similar problem with a version of Eclipse from
> January 2019, on a VM-Fedora30+KDE+Wayland. The tooltips will close on first
> click and stay open second time they were opened.

Wayland is a completely different story when it comes to pop-ups, the solution there is to hover inside the window for a second or two to make sure it gets focus. Not ideal, but there are some Wayland limitations we have to deal with.


> Are there any debugging options I can try?

Not much, apart from trying with WebKit1 like I alluded to above.

In general, I know there are some issues surrounding pop-ups and I will try to get to them as soon as I can!
Comment 51 Ante Smolčić CLA 2019-08-13 08:24:36 EDT
Hi,

As you suspected, SWT_WEBKIT2=0 did not help.
Comment 52 Ante Smolčić CLA 2019-08-17 05:39:50 EDT
I have a working VM without this problem and with similar environment. VirtualBox6, Ubuntu 18.04, kernel 5+ (I also tried with the same 4+ kernel as my problematic one), X11, same themes, and same Eclipse and JRE. It all works.
Comment 53 Fred Rothganger CLA 2019-09-25 11:57:59 EDT
I have similar problems with Eclipse 2019-06 (4.12.0). Running on Fedora Core 29 with Nvidia proprietary driver.

org.eclipse.swt.internal.gdk.backend=x11
org.eclipse.swt.internal.gtk.theme=Adwaita
org.eclipse.swt.internal.gtk.version=3.24.1
org.eclipse.swt.internal.webkitgtk.version=2.24.3

Message: Unhandled event loop exception

org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4699)
	at org.eclipse.swt.SWT.error(SWT.java:4614)
	at org.eclipse.swt.SWT.error(SWT.java:4585)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:532)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:469)
	at org.eclipse.swt.widgets.Control.redraw(Control.java:4498)
	at org.eclipse.swt.widgets.Link.gtk_event_after(Link.java:423)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2228)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:6814)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6132)
	at org.eclipse.swt.internal.gtk.GTK._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.GTK.gtk_main_do_event(GTK.java:4166)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1429)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1585)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4661)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1441)

Session Data:
eclipse.buildId=4.12.0.I20190605-1800
java.version=1.8.0_222
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -data /home/frothga/software/work/n2a -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product
Comment 54 Eric Williams CLA 2019-09-26 14:02:15 EDT
*** Bug 543203 has been marked as a duplicate of this bug. ***
Comment 55 Hoan Le CLA 2020-06-03 10:10:31 EDT
if you only need to have that quick tooltip fix focused, I see this is a work-around (at least it works for me :-D): place the text cursor into the error and press F2
Comment 56 Ante Smolčić CLA 2020-06-10 19:53:02 EDT
I think I've found something directly related to this problem, and also a workaround! Everything works fine if you don't use the GNOME option: "Input-sources: Allow different sources for each window."

I have mostly the same environment as before, but with regular upgrades since my last comment. I usually use the above option for keyboard layout, since I use Croatian and English layout. I was playing with it and apparently turned it back to the default ("Use the same source for all windows") and the problem was gone. This explains why my test VM worked OK, since it had a single keyboard layout.

I tried switching the preferred layout from English to Croatian but it didn't help. So the problem can be reproduced with English (preferred) and Croatian layout and with the above option set (different sources for each window).

I will add another attachment with a video. You can see it all works fine. Then I change the window option and it falls apart. You can see I have difficulties resizing the tooltip and clicking the quick-fix link. Then I turn it all back to default and it works again.

In the video I used Eclipse 2019-06, and afterwards I tried it with Eclipse 2020-03 and the problem persisted.
Comment 57 Ante Smolčić CLA 2020-06-10 19:54:40 EDT
Created attachment 283224 [details]
Test with keyboard layout options
Comment 58 Natalie Mogilka CLA 2021-02-07 06:03:53 EST
(In reply to Ante Smolčić from comment #57)
> Created attachment 283224 [details]
> Test with keyboard layout options

thank you very much!
Comment 59 Yuriy Prokopiv CLA 2021-02-23 05:05:21 EST
(In reply to Ante Smolčić from comment #57)
> Created attachment 283224 [details]
> Test with keyboard layout options

That's a brilliant workaround! Many thanks for all efforts.
Comment 60 Yuriy Prokopiv CLA 2021-02-23 05:06:03 EST
(In reply to Ante Smolčić from comment #57)
> Created attachment 283224 [details]
> Test with keyboard layout options

That's a brilliant workaround! Many thanks for all efforts.