Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 465911

Summary: [GTK3] [Decorators] Overdrawn of label decorators
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: SWTAssignee: Snjezana Peco <snjezana.peco>
Status: RESOLVED WORKSFORME QA Contact: Sravan Kumar Lakkimsetti <sravankumarl>
Severity: major    
Priority: P3 CC: akurtakov, arunkumar.thondapu, ericwill, johannes.degler, Lars.Vogel, lshanmug, pradeepb, snjezana.peco, sravankumarl
Version: 4.5Keywords: triaged
Target Milestone: 4.6   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/54854
Whiteboard:
Attachments:
Description Flags
Screenshot
none
Label background (set to dark) seem to come through
none
Leaking text on labels
none
Screenshot overdrawn labels none

Description Lars Vogel CLA 2015-04-30 06:12:23 EDT
Created attachment 252950 [details]
Screenshot

Hard to reproduce but I see frequently label overdrawn, especially in the dark theme.
Comment 1 Lars Vogel CLA 2015-04-30 09:04:55 EDT
To reproduce:

1.) Download SDK
2.) Install EGit
3.) Switch to dark theme, restart
4.) Change a file in the project explorer to trigger the EGit icon decorators

-> Overdrawn in several cases the decoration.
Comment 2 Lars Vogel CLA 2015-04-30 09:05:27 EDT
Created attachment 252958 [details]
Label background (set to dark) seem to come through
Comment 3 Arun Thondapu CLA 2015-05-04 14:33:36 EDT
Unable to reproduce on Ubuntu 14.04 with M7 build (4.5.0.I20150430-1445).

Lars, this seems very much like a duplicate of bug 459117, did you try with a recent build which has the fix for that bug? Can you please confirm with M7?
Comment 4 Arun Thondapu CLA 2015-05-11 00:24:29 EDT
I spent some more time to try and reproduce this problem and a couple of updates:

1. I was indeed able to reproduce the problem using the Dark theme but not very consistently, it was a very random and infrequent occurrence in my observation.

2. I was never able to reproduce the problem when not using the Dark theme (I was using the default GTK theme).

3. The problem when it happens does seem restricted to projects which have changes and thus have icons decorated from EGit i.e projects with regular non-decorated icons seem fine.

Considering the bug affects only the Dark theme and is not consistently reproducible there too, I'm not sure this should be an RC1 candidate...
Comment 5 Arun Thondapu CLA 2015-05-11 03:26:19 EDT
More updates:

1. I'm able to reproduce this consistently now with the latest I-build 4.5.0.I20150510-2000 on Ubuntu 14.04 but not on Ubuntu 12.04, so it seems to be a GTK+ 3.10 related issue.

2. It can be seen in the Package Explorer as well as in the Project Explorer.

3. I was trying to debug but I don't see the problem when running a self-hosted eclipse application. I noticed that in the original eclipse launch, the projects with changes are highlighted in blue along with the addition of a > symbol to the icons, but in the self-hosted eclipse, I don't see the blue highlighting. Lars, any idea why this could be happening? I suspect that might have something to do with the problem not appearing when I run the self-hosted eclipse application.
Comment 6 Lars Vogel CLA 2015-05-11 05:17:20 EDT
(In reply to Arun Thondapu from comment #5)

> 3. I was trying to debug but I don't see the problem when running a
> self-hosted eclipse application. I noticed that in the original eclipse
> launch, the projects with changes are highlighted in blue along with the
> addition of a > symbol to the icons, but in the self-hosted eclipse, I don't
> see the blue highlighting. Lars, any idea why this could be happening? I
> suspect that might have something to do with the problem not appearing when
> I run the self-hosted eclipse application.

I think we are seeing the EGit decoration for changed files. You your runtime Eclipse must include EGit and the target workspace should have projects with are under version control and files which are changed.
Comment 7 Arun Thondapu CLA 2015-05-11 09:03:45 EDT
(In reply to Lars Vogel from comment #6)
> (In reply to Arun Thondapu from comment #5)
> 
> > 3. I was trying to debug but I don't see the problem when running a
> > self-hosted eclipse application. I noticed that in the original eclipse
> > launch, the projects with changes are highlighted in blue along with the
> > addition of a > symbol to the icons, but in the self-hosted eclipse, I don't
> > see the blue highlighting. Lars, any idea why this could be happening? I
> > suspect that might have something to do with the problem not appearing when
> > I run the self-hosted eclipse application.
> 
> I think we are seeing the EGit decoration for changed files. You your
> runtime Eclipse must include EGit and the target workspace should have
> projects with are under version control and files which are changed.

All of this is true in my case, see bug 466515 comment 6.
Comment 8 Arun Thondapu CLA 2015-05-13 16:08:24 EDT
I suspect this is a different manifestation of bug 459117 as mentioned in comment 3. I've suggested a change in Tree.java which will most probably fix this bug and the change has been merged as part of the fix for bug 465309. Will test in tonight's I-build and verify whether it gets fixed or not...
Comment 9 Arun Thondapu CLA 2015-05-14 09:12:56 EDT
(In reply to Arun Thondapu from comment #8)
> I suspect this is a different manifestation of bug 459117 as mentioned in
> comment 3. I've suggested a change in Tree.java which will most probably fix
> this bug and the change has been merged as part of the fix for bug 465309.
> Will test in tonight's I-build and verify whether it gets fixed or not...

The problem is still there in the latest I-build, will try to investigate a fix for RC2.
Comment 10 Arun Thondapu CLA 2015-05-18 14:56:55 EDT
Adding Snjezana as this is similar to the problem in bug 459117 but the fix for that one does not fix this problem, this one is specific to the dark theme though, it cannot be reproduced in the normal GTK theme.
Comment 11 Sravan Kumar Lakkimsetti CLA 2015-08-18 05:49:22 EDT
Could not complete in time for 4.5.1. It requires some more effort. Will target for M3
Comment 12 Snjezana Peco CLA 2015-08-27 11:16:15 EDT
I can't reproduce the issue on Mars.
Comment 13 Sravan Kumar Lakkimsetti CLA 2015-08-28 07:56:48 EDT
(In reply to Snjezana Peco from comment #12)
> I can't reproduce the issue on Mars.

Hi,

It is reproducible. I am using ubuntu 14, GTK3.10, dark theme with egit. 
1. Import project from egit. 
2. Modify some files in the project so that the modified decoration comes up on the project.
3. Expand the modified project in project explorer
4. select any other project
5. Switch focus to editor by clicking on the editor pane
6. click close all button on the project explorer. 

Now you should be able to see the problem.

Please note this problem does not appear in runtime workbench

-Sravan
Comment 14 Eclipse Genie CLA 2015-08-30 14:56:47 EDT
New Gerrit change created: https://git.eclipse.org/r/54854
Comment 15 Snjezana Peco CLA 2015-08-30 15:00:24 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #13)
> Hi,
> 
> It is reproducible. I am using ubuntu 14, GTK3.10, dark theme with egit. 
> 1. Import project from egit. 
> 2. Modify some files in the project so that the modified decoration comes up
> on the project.
> 3. Expand the modified project in project explorer
> 4. select any other project
> 5. Switch focus to editor by clicking on the editor pane
> 6. click close all button on the project explorer. 
> 
> Now you should be able to see the problem.
> 
> Please note this problem does not appear in runtime workbench
> 
> -Sravan


Finaly I have succeeded to reproduce the issue in the following way:

- select Window>Preferences>General>Appearance>Colors and Fonts, expand the Git tree item and change the "Uncommitted Change (Background)" preference. 

After that, it is easy to reproduce the issue if you have a git repository with some uncommitted changes.

It can be reproduced in GTK3 > 3.9.0 and <= 3.14.12 when using any themes including GTK.
It can also be reproduced in runtime workbench.

I suppose this is a GTK bug fixed in GTK >= 3.14.12
I have created a workaround (https://git.eclipse.org/r/54854) that works so that it ignores the colour of the item background for GTK3 > 3.9.0 and <= 3.14.12.
This way, the issue can't be reproduced in GTK2 and GTK3 >= 3.14.12. Eclipse SWT won't paint the colour of the item background on GTK 3.10 and GTK 3.12, but the issue won't happen when using the default preferences settings.

The issue still happens on GTK >= 3.14.0 and < 3.14.12 when the background is changed. Not sure if we can do anything for those versions, but, since most newer distributions use GTK >= 3.14.12 it doesn't matter, in my opinion.
Comment 16 Pradeep Balachandran CLA 2015-11-09 03:02:16 EST
I observed this in the package explorer - the Git repo info alongside the projects are shown on top of the editor area, spilling over from the package explorer. 
I am seeing this in the Mars.1 JEE package, while using it out of the box - that is, just the default theme, in a brand new workspace. In fact, this is observed on a new VM was recently built. 

Here are the details:
Linux: 64-bit Ubuntu 3.19.0-15-generic
Eclipse: Mars.1 JEE package, Linux 64-bit
GTK+ Version: 3.14.13-0ubuntu1
Eclipse SWT internal variable: org.eclipse.swt.internal.gtk.version=3.14.13
Comment 17 Sravan Kumar Lakkimsetti CLA 2015-11-09 04:12:21 EST
(In reply to Pradeep Balachandran from comment #16)
> I observed this in the package explorer - the Git repo info alongside the
> projects are shown on top of the editor area, spilling over from the package
> explorer. 
> I am seeing this in the Mars.1 JEE package, while using it out of the box -
> that is, just the default theme, in a brand new workspace. In fact, this is
> observed on a new VM was recently built. 
> 
> Here are the details:
> Linux: 64-bit Ubuntu 3.19.0-15-generic
> Eclipse: Mars.1 JEE package, Linux 64-bit
> GTK+ Version: 3.14.13-0ubuntu1
> Eclipse SWT internal variable: org.eclipse.swt.internal.gtk.version=3.14.13

The desktop environment used here is gnome not unity connected through VNC
Comment 18 Eric Williams CLA 2015-12-02 15:31:38 EST
I have been unable to reproduce this bug, both using Lars' or Snjezana's steps to reproduce. I've tried on GTK3.14.9 all the way to GTK3.18.2. I suspect this was a GTK bug that was fixed awhile ago upstream.
Comment 19 Lars Vogel CLA 2015-12-02 15:34:42 EST
I also have not seen that issue in a very long time. Sorry I forgot that this bug is still open. I suggest to close it as worksforme.
Comment 20 Eric Williams CLA 2015-12-02 15:51:41 EST
(In reply to Lars Vogel from comment #19)
> I also have not seen that issue in a very long time. Sorry I forgot that
> this bug is still open. I suggest to close it as worksforme.

Sure, I'll mark it as closed. If anyone objects please feel free to re-open.
Comment 21 Sravan Kumar Lakkimsetti CLA 2015-12-03 03:58:42 EST
Created attachment 258428 [details]
Leaking text on labels

The Bug is still reproducible on 
OS: Ubuntu 15.04
GTK: 3.14.13
Java: Oracle Java 1.8 update 66
Desktop: Gnome
Connection: VNC
Eclipse build: I20151201-1100

Please refer to attached screen shot
Comment 22 Sravan Kumar Lakkimsetti CLA 2015-12-03 04:00:16 EST
Reopening as it is still reproducible on Ubuntu 15.04
Comment 23 Alexander Kurtakov CLA 2016-04-01 05:40:35 EDT
What is the status of this one? I haven't experienced it in long time and the changes are significant since last comment onthebug.
Comment 24 Lars Vogel CLA 2016-04-01 05:49:04 EDT
(In reply to Alexander Kurtakov from comment #23)
> What is the status of this one? I haven't experienced it in long time and
> the changes are significant since last comment onthebug.

Same here, I have not seen then in a long time. IMHO this can be marked as closed.
Comment 25 Sravan Kumar Lakkimsetti CLA 2016-04-25 07:51:46 EDT
Closing it based on Lars comments
Comment 26 Johannes Degler CLA 2019-06-25 04:36:22 EDT
Created attachment 279063 [details]
Screenshot overdrawn labels
Comment 27 Johannes Degler CLA 2019-06-25 04:45:04 EDT
I'm experiencing the exact same bug on two separate machines with an up to date GTK 3 version. As I only switched to Linux recently, I don't know if this is a regression in GTK or if this bug was never really fixed.

If you need any further details, Ill gladly provide them.
Comment 28 Alexander Kurtakov CLA 2019-06-25 04:47:12 EDT
(In reply to Johannes Degler from comment #27)
> I'm experiencing the exact same bug on two separate machines with an up to
> date GTK 3 version. As I only switched to Linux recently, I don't know if
> this is a regression in GTK or if this bug was never really fixed.
> 
> If you need any further details, Ill gladly provide them.

I assume you run with Gtk 3.24.9, I've experienced the same issue yesterday after updating my machine. Everything was fine up to 3.24.8 - Eric is investigating it.
Comment 29 Eric Williams CLA 2019-06-25 09:29:17 EDT
(In reply to Johannes Degler from comment #27)
> I'm experiencing the exact same bug on two separate machines with an up to
> date GTK 3 version. As I only switched to Linux recently, I don't know if
> this is a regression in GTK or if this bug was never really fixed.
> 
> If you need any further details, Ill gladly provide them.

Please see bug 548629 if you are running GTK3.24.9.