Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 517487 - [GTK3][Regression] Caret disappears when moving/editing
Summary: [GTK3][Regression] Caret disappears when moving/editing
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: 4.7.1   Edit
Assignee: Ian Pun CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 413837 520471 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-05-31 03:01 EDT by Missing name CLA
Modified: 2018-08-16 15:08 EDT (History)
15 users (show)

See Also:
daniel_megert: pmc_approved+


Attachments
Caret disappearing by clicking on different lines (185.53 KB, video/x-msvideo)
2017-05-31 03:01 EDT, Missing name CLA
no flags Details
caret performance fix (708.28 KB, video/webm)
2017-07-26 08:36 EDT, Ian Pun CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2017-05-31 03:01:01 EDT
Created attachment 268649 [details]
Caret disappearing by clicking on different lines

On Oxygen RC1 and RC2, the text editor caret (in JDT editors at least) is going missing very frequently, especially when I position it at the end of a line (by clicking or via the keyboard).

Just clicking on the end of a line, then the line under it, and going back and forth fails almost instantly. Same for keyboard.

I've attached a video (sorry this is an AVI, I tried to crop webm w/o success).

I'm using Oxygen RC2 x86_64 with gtk3-3.22.15 (Fedora 26).

I've checked for duplicates and there are many but for older versions, none for Oxygen yet. Hope it can be tackled before final release as it's extremely frustrating to work w/ the caret going missing every other second.
Comment 1 Andrey Loskutov CLA 2017-05-31 03:11:46 EDT
Works fine for me on RHEL 7.2 / gtk3-3.14.13-16.el7.x86_64
Comment 2 Leo Ufimtsev CLA 2017-05-31 11:13:39 EDT
Looks like you're on Rawhide?

- Is this a regression, I.e, did updating from F25 to F26 break things for you, or is this a first-time setup and things are not working? Was this working on F25?
- Are you using the 'dark theme' eclipse? If so, does the issue occur in light theme (restart after switching themes).

- Does it behave different with gtk2 backend?
export SWT_GTK3=0
eclipse
Comment 3 Missing name CLA 2017-05-31 11:26:16 EDT
- yes, F26 alpha
- ho right, I forgot to add that there's no problem at all with Neon.3, this only regressed on Oxygen
- i'm using the dark theme, but the bug is present both in the dark and light themes in Oxygen
- no problem with gtk2 indeed

I do not experience any kind of bug wrt to gtk 3.22 except this in Eclipse Oxygen.

Would it somehow help to bisect to which release this regressed? M1, M2...? Could this partially narrow it down?
Comment 4 Leo Ufimtsev CLA 2017-05-31 12:22:15 EDT
I can't seem to reproduce on my F25 setup. Might be something in W26 broke things.

@Ian, this might be up your alley since you worked on related fixes maybe? I would suggest setting up a F26 vm.
Comment 5 Missing name CLA 2017-05-31 15:25:49 EDT
I've bisected that regression to 4.7M6. In M5 everything is working fine.

Hope this will help a bit.
Comment 6 Leo Ufimtsev CLA 2017-06-01 16:22:23 EDT
(In reply to Missing name from comment #5)
> I've bisected that regression to 4.7M6. In M5 everything is working fine.
> 
> Hope this will help a bit.

So as per https://wiki.eclipse.org/Eclipse/Release_checklist some where between January to March-ish.

We'll probably have to setup a F26 vm to investigate this.
Comment 7 Ian Pun CLA 2017-06-01 16:24:42 EDT
(In reply to Missing name from comment #5)
> I've bisected that regression to 4.7M6. In M5 everything is working fine.
> 
> Hope this will help a bit.

Hey, It might have to do with something I did related to cursor drawing here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=517487
Comment 8 Leo Ufimtsev CLA 2017-06-01 16:31:56 EDT
(In reply to Ian Pun from comment #7)
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=517487

This link points to this bug. Copy & paste typo?
Comment 9 Alexander Kurtakov CLA 2017-06-02 00:17:25 EDT
Is this with wayland or x11? I'm on f26 alpha gnome on wayland and don't see the issue.
Comment 10 Ian Pun CLA 2017-06-02 10:17:01 EDT
ah, sorry, this is the real bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=500013
Comment 11 Missing name CLA 2017-06-02 10:36:43 EDT
I have the problem on both x11 and wayland backends.

I also just tried the recently-released RC3, same issue.

The bug linked might indeed be the source of the issue. Can you tell me if I can retest in an upcoming integration milestone or the last RC maybe?
Comment 12 Leo Ufimtsev CLA 2017-06-09 11:39:28 EDT
(In reply to Missing name from comment #11)
> I have the problem on both x11 and wayland backends.
> 
> I also just tried the recently-released RC3, same issue.
> 
> The bug linked might indeed be the source of the issue. Can you tell me if I
> can retest in an upcoming integration milestone or the last RC maybe?

Could you try with latest integration here:
http://download.eclipse.org/eclipse/downloads/

See "4.7 Integration Builds" section, click on something like: I20170608-0530 , then find your platform like Linux x86_64 under Eclipse sdk.
Comment 13 Missing name CLA 2017-06-09 13:24:59 EDT
It's the same with this build.

I'm running latest Fedora 26 (which is stated for release as beta next tuesday, final release is targeted the 11th of july ATM). Still works with Neon.3.
Comment 14 Missing name CLA 2017-06-09 15:15:57 EDT
ha I see why nobody got the issue earlier. I always disabled the cursor blink on my desktop through the org.gnome.desktop.interface cursor-blink gsettings key.

If I enable it back, the blinking helps to find out the cursor. But even in this configuration, it does not seem to work like it used to be.

At the very moment the cursor is moved through mouse or keyboard, whether the caret is visible or not, it used to be made visible again (it's the same on Windows, MacOSX, Gtk ...) so it's easy to find it, like restarting a timeout until it's hidden.

But it does not behave like that, the blinking keeps getting on / off at the same interval whether we move or not the cursor. Maybe the origin is be the same.
Comment 15 Ian Pun CLA 2017-06-21 14:06:49 EDT
(In reply to Missing name from comment #14)
> ha I see why nobody got the issue earlier. I always disabled the cursor
> blink on my desktop through the org.gnome.desktop.interface cursor-blink
> gsettings key.
> 
> If I enable it back, the blinking helps to find out the cursor. But even in
> this configuration, it does not seem to work like it used to be.
> 
> At the very moment the cursor is moved through mouse or keyboard, whether
> the caret is visible or not, it used to be made visible again (it's the same
> on Windows, MacOSX, Gtk ...) so it's easy to find it, like restarting a
> timeout until it's hidden.
> 
> But it does not behave like that, the blinking keeps getting on / off at the
> same interval whether we move or not the cursor. Maybe the origin is be the
> same.


The current method with how the caret is being drawn has changed a bit over time, but ultimately should not be a usability problem anymore. If the general problem of the caret being actually "missing" is not there anymore, I would suggest we close this bug.
Comment 16 Missing name CLA 2017-06-21 14:14:19 EDT
Well, I'm not sure I'm easy to follow, but this is still broken on Fedora 26 Beta (almost final freeze), whether I activate cursor blinking or not.

If do not, I almost never see the caret, if I do, it's made visible at each keypress, which is barely usable.
Comment 17 Eric Williams CLA 2017-06-30 10:43:37 EDT
Not sure why this is assigned to swt-traged@eclipse.org, re-assigning to the regular inbox.
Comment 18 Michael Stopa CLA 2017-07-04 12:19:52 EDT
I'm getting this problem too, I'm on a fresh Gentoo x86-64 4.9.34, with X11, i3wm,  and Gtk 3.22.15, running Oxygen release 4.7.0

I don't get the disappearing act on the ends of lines but the caret blink is definitely different. It continues to blink as if the user were idle even when I'm typing.

I use vrapper so it's very noticeable and destroys my ability to quickly navigate with the keyboard.
Comment 19 Steven Nuzum CLA 2017-07-04 13:09:17 EDT
I'm getting this problem on Fedora25 with all the latest updates installed running
Oxygen release 4.7.0 x86_64.

If you use down arrow key to move down the page, the caret only appears on
every 2nd line.

If you click with the mouse at the beginning of a line it may take one or more
clicks for the caret to appear. Likewise when clicking the middle of a line.

If you click in the space past the end of the line the caret will not appear on
every 2nd line.
Comment 20 Ian Pun CLA 2017-07-05 19:37:57 EDT
(In reply to Steven Nuzum from comment #19)
> I'm getting this problem on Fedora25 with all the latest updates installed
> running
> Oxygen release 4.7.0 x86_64.
> 
> If you use down arrow key to move down the page, the caret only appears on
> every 2nd line.
> 

Hi Steven,

this is likely due to how the blinking mechanism is done for carets. The assumption is that the caret blinks every half a second, but if you move the caret inbetween an interval, it screws up the blinking flags, causing it possibly to not show at all. I will be working on fixing this.
Comment 21 Eclipse Genie CLA 2017-07-06 12:21:45 EDT
New Gerrit change created: https://git.eclipse.org/r/100860
Comment 22 Ian Pun CLA 2017-07-06 16:40:10 EDT
Just an update, the reason for some of the blinking issues of it disappearing is likely due to the fact that the scrollbar is sending out a spam of draw signals that causes the caret to blink very very fast, causing stuttering/pausing.

In regards to the blinking mechanism, this issue began starting with GTK3. However, A few of the caret changes I did in Bug 500013 may have affected it more intensely on X11 as well. The current Gerrit change will move the blinking mechanism back to prior my Wayland fix if you are on X11. I still do notice that the caret disappears once in a while, but please do let me know if has improved.
Comment 23 Michael Katzmann CLA 2017-07-07 15:56:50 EDT
I see this issue under Fedora 25, X11, gtk-3 3.22.16 & Eclipse Oxygen 4.7.0.
The caret disappears on odd columns (if the first is column 0). As I move the cursor along the line it appears and disappears.
(The cursor is not set to blink)
Comment 24 Michael Katzmann CLA 2017-07-07 16:04:45 EDT
It's definitely related to the scrollbar. As I scroll, the caret appears and disappears.
Comment 25 Eclipse Genie CLA 2017-07-25 11:11:11 EDT
New Gerrit change created: https://git.eclipse.org/r/101926
Comment 27 Eric Williams CLA 2017-07-25 16:02:25 EDT
(In reply to Eclipse Genie from comment #26)
> Gerrit change https://git.eclipse.org/r/101926 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=44c4faf4c081e6824275571292883da6d93d4ed1

In master now, thanks for the patch Ian! This makes cursors a lot more smooth.
Comment 28 Ian Pun CLA 2017-07-26 08:36:31 EDT
Created attachment 269545 [details]
caret performance fix

Screencasting doesn't take all the frames, please try for yourself :)
Comment 29 Ian Pun CLA 2017-07-26 08:37:31 EDT
Left is the fixed version, right is the pre-patch (regarding webm).
Comment 30 Lars Vogel CLA 2017-07-26 10:53:28 EDT
I suggest to downport this to 4.7.1 once this feature got a bit more testing in the usage of the 4.8 stream
Comment 31 Calin Crisan CLA 2017-08-04 08:38:49 EDT
OK, so how exactly do I fix this caret blinking/disappearing issue? Do we have a build that incorporates the fix? I'm running 4.7.0 and it's almost impossible to type code in the editor.
Comment 32 Eric Williams CLA 2017-08-04 08:47:23 EDT
(In reply to Calin Crisan from comment #31)
> OK, so how exactly do I fix this caret blinking/disappearing issue? Do we
> have a build that incorporates the fix? I'm running 4.7.0 and it's almost
> impossible to type code in the editor.

That version does not have the fix in it. To get the version with it fixed:

1) Download yesterday's I-build: http://download.eclipse.org/eclipse/downloads/drops4/I20170802-2000/

or

2) Download 4.8 M1: http://download.eclipse.org/eclipse/downloads/drops4/S-4.8M1-201708022000/

Either one of those options will have the fix included.
Comment 33 Lakshmi P Shanmugam CLA 2017-08-28 03:58:46 EDT
Hi Eric, 
We are in 4.7.1 RC3 week already, do you still want to push this for 4.7.1? If yes, you need to ask for PMC approval. If not, please move the target to 4.7.2.
Comment 34 Eric Williams CLA 2017-08-28 09:57:04 EDT
(In reply to Lakshmi Shanmugam from comment #33)
> Hi Eric, 
> We are in 4.7.1 RC3 week already, do you still want to push this for 4.7.1?
> If yes, you need to ask for PMC approval. If not, please move the target to
> 4.7.2.

Sorry, lost track of this bug. Will send an email out.
Comment 35 Eclipse Genie CLA 2017-08-28 10:28:20 EDT
New Gerrit change created: https://git.eclipse.org/r/103771
Comment 37 Eric Williams CLA 2017-08-28 12:01:42 EDT
(In reply to Eclipse Genie from comment #36)
> Gerrit change https://git.eclipse.org/r/103771 was merged to
> [R4_7_maintenance].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=0000f83f1701abe0a7de15c642bb62b517318bd0

Backport merged.
Comment 38 Ian Pun CLA 2017-08-29 10:00:18 EDT
(In reply to Eric Williams from comment #37)
> (In reply to Eclipse Genie from comment #36)
> > Gerrit change https://git.eclipse.org/r/103771 was merged to
> > [R4_7_maintenance].
> > Commit:
> > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> > ?id=0000f83f1701abe0a7de15c642bb62b517318bd0
> 
> Backport merged.

Thanks for the backport Eric!
Comment 39 Lakshmi P Shanmugam CLA 2017-08-31 08:00:27 EDT
Hi Eric/Ian,
Can you please verify the fix on the 4.7.1RC3 candidate build -  http://download.eclipse.org/eclipse/downloads/drops4/M20170830-1700/ ?
Comment 40 Ian Pun CLA 2017-08-31 09:30:42 EDT
(In reply to Lakshmi Shanmugam from comment #39)
> Hi Eric/Ian,
> Can you please verify the fix on the 4.7.1RC3 candidate build - 
> http://download.eclipse.org/eclipse/downloads/drops4/M20170830-1700/ ?

Hi Lakshmi, I can confirm that this fix is in 4.7.1RC3, tested on both Wayland and X11.
Comment 41 Donato Marrazzo CLA 2017-09-02 05:42:43 EDT
*** Bug 520471 has been marked as a duplicate of this bug. ***
Comment 42 Eclipse Genie CLA 2017-09-06 11:38:22 EDT
New Gerrit change created: https://git.eclipse.org/r/104582
Comment 44 Eric Williams CLA 2018-08-16 15:08:28 EDT
*** Bug 413837 has been marked as a duplicate of this bug. ***