Bug 478838 - [GTK3] StyledCellLabelProvider draws incorrectly on GTK3 when inages are not set or null
Summary: [GTK3] StyledCellLabelProvider draws incorrectly on GTK3 when inages are not ...
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4.2   Edit
Hardware: PC Linux
: P3 normal with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-01 13:15 EDT by Kris De Volder CLA
Modified: 2018-03-21 09:55 EDT (History)
5 users (show)

See Also:


Attachments
Copy of Snippet049StyledCellLabelProvider with 'setImage' calls commented out. (6.55 KB, text/plain)
2015-10-01 13:15 EDT, Kris De Volder CLA
no flags Details
screenshot showing the problem (13.39 KB, image/png)
2015-10-01 14:08 EDT, Kris De Volder CLA
no flags Details
Snippet049 with setImage commented out, Neon nightly 20151001 F22 (22.07 KB, image/png)
2015-10-02 09:55 EDT, Eric Williams CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kris De Volder CLA 2015-10-01 13:15:34 EDT
Created attachment 256976 [details]
Copy of Snippet049StyledCellLabelProvider with 'setImage' calls commented out.

Several people have reported that one of our dialogs is unusable on some versions of Linux using GTK3. 

See 
   https://issuetracker.springsource.com/browse/STS-4159
   https://issuetracker.springsource.com/browse/STS-4221

The problem goes away when setting SWT_GTK3=0.

Problem may also be subject to what kind of OS themes the user has selected.

I have confirmed the bug with "Linux Mint 17.2 Rafaela" using a Linux VirtualBox VM one of the reporters provided (you can download that VM from here: 

   https://dl.dropboxusercontent.com/u/55072601/Linux%20Mint%20Test%20STS.7z

Login: sts
Password: ststest

Description of the problem:

The labels of the table viewer are drawn incorrectly. It seems like one of the labels is drawn repeatedly on every cell, making it appear as if each cell contains the same text (even though the actual data in each cell is different).

The problem appears to happen specifically when a StyledCellLabelProvider is used without setting explicit images (or setting images to null). In other words a table that only uses text labels and no images is subject to this bug.

It can be reproduced using this snippet:
   https://wiki.eclipse.org/JFaceSnippets#Snippet049StyledCellLabelProvider

... and commenting out the code in the labelprovider that sets the images, as done in a snippet I will attach shortly.
Comment 1 Kris De Volder CLA 2015-10-01 13:19:37 EDT
At least one user has reported the problem on Ubuntu 15.04. 

I have tried Ubuntu 12.04 and 14.04, both of which seem to be not affected by this bug, at least not in default theming using Unity interface. I have not tried switching themes or using the KDE-based Ubuntu distro.
Comment 2 Kris De Volder CLA 2015-10-01 14:08:21 EDT
Created attachment 256978 [details]
screenshot showing the problem

Attaching a screenshot taken when running the snippet. It shows how all cells appear to contain the same content.
Comment 3 Eric Williams CLA 2015-10-02 09:55:18 EDT
Created attachment 256999 [details]
Snippet049 with setImage commented out, Neon nightly 20151001 F22

I cannot reproduce the issue on Fedora 22, Eclipse Neon (nightly 20151001) and Gtk3.16.6. 

I have attached a screenshot showing what Snippet049 looks like for me with the setImage() calls commented out.
Comment 4 Alexander Kurtakov CLA 2015-10-15 08:29:11 EDT
Kris, would you please check whether latest nightly build fixes the issue for you?
Comment 5 Kris De Volder CLA 2015-10-15 17:19:20 EDT
Using the Mint VM... I downloaded nightly neon SDK and tried to run the 'Copy of Snippet...' thing I attached here and it still misbehaves.

So I think latest nightly does *not* address the issue.
Comment 6 Eric Williams CLA 2015-10-30 10:14:10 EDT
(In reply to Kris De Volder from comment #5)
> Using the Mint VM... I downloaded nightly neon SDK and tried to run the
> 'Copy of Snippet...' thing I attached here and it still misbehaves.
> 
> So I think latest nightly does *not* address the issue.

What version of GTK3 is running on your system?
Comment 7 Kris De Volder CLA 2015-10-30 12:22:38 EDT
I'm not sure what version, I just verified the bug with the VM the original reporter provided. You could probably download the VM and find out, but since I still have a copy of that VM on my machine I can do it for you. Do you have a command I can paste/type in a terminal to find out the information that you want)?
Comment 8 Eric Williams CLA 2015-10-30 12:34:07 EDT
(In reply to Kris De Volder from comment #7)
> I'm not sure what version, I just verified the bug with the VM the original
> reporter provided. You could probably download the VM and find out, but
> since I still have a copy of that VM on my machine I can do it for you. Do
> you have a command I can paste/type in a terminal to find out the
> information that you want)?

Since you are running Linux Mint I believe it would be something like this:
dpkg -s libgtk-3-0|grep '^Version'
Comment 9 Kris De Volder CLA 2015-10-30 12:41:02 EDT
It tells me this:

Version: 3.10.8~8+qiana
Comment 10 Eric Williams CLA 2015-10-30 14:37:06 EDT
(In reply to Kris De Volder from comment #9)
> It tells me this:
> 
> Version: 3.10.8~8+qiana

I tried running the snippet again on GTK3.10 but the issue still does not reproduce for me.
Comment 11 Kris De Volder CLA 2015-10-30 14:43:07 EDT
The conditions that bring about the bug aren't exactly known yet but...

 - we do know multiple people are hitting it and...
 - the problem is reproducible in attached VM.

So perhaps your best chance to nail down exactly what's going on is using the provided VM image.
Comment 12 Mauro Molinari CLA 2015-10-30 18:41:35 EDT
The problem happens as soon as you use ANY GTK3 theme for KDE. If you set it to use no theme, it does not happen, but the UI then looks ugly and even.becomes hardly usable. No problems when using GTK2, even if themes are in use.
Comment 13 Kris De Volder CLA 2016-05-25 11:21:16 EDT
Received another bug report from a Mint user which I think is caused by this STS_GTK3 drawing glitch.

https://issuetracker.springsource.com/browse/STS-4370
Comment 14 Kris De Volder CLA 2016-05-25 11:22:41 EDT
Why does bugzilla not have a 'edit' button :-(

I meant 'SWT_GTK3' not 'STS_GTK3', in case that wasn't clear.
Comment 15 Mark Leone CLA 2016-07-04 15:15:20 EDT
I see this bug using CentOS 7/GTK3. The SWT_GTK3=0 workaround works.
Comment 16 Eric Williams CLA 2018-03-20 11:38:46 EDT
I still cannot reproduce this issue.

(In reply to Mark Leone from comment #15)
> I see this bug using CentOS 7/GTK3. The SWT_GTK3=0 workaround works.

Please provide GTK3 version as well as GTK theme and desktop environment.
Comment 17 Mark Leone CLA 2018-03-20 19:00:13 EDT
I haven't worked on the app for a while where I encountered this bug. I just tried it again without the SWT_GTK3=0 workaround, and I do not see the bug. Unfortunately, I can't say what precise version I was running when I had the problem or when it went away. FWIW, my gtk3 package is gtk3-3.22.10-5.el7_4.x86_64, and my desktop package is gnome-desktop3-3.22.2-2.el7.x86_64. I'm not sure how to tell what gnome them I'm using. If you still need that, please let me know how to check it, and I'll let you know.
Comment 18 Eric Williams CLA 2018-03-21 09:55:36 EDT
(In reply to Mark Leone from comment #17)
> I haven't worked on the app for a while where I encountered this bug. I just
> tried it again without the SWT_GTK3=0 workaround, and I do not see the bug.
> Unfortunately, I can't say what precise version I was running when I had the
> problem or when it went away. FWIW, my gtk3 package is
> gtk3-3.22.10-5.el7_4.x86_64, and my desktop package is
> gnome-desktop3-3.22.2-2.el7.x86_64. I'm not sure how to tell what gnome them
> I'm using. If you still need that, please let me know how to check it, and
> I'll let you know.

If you're on CentOS using GNOME without any modifications then you are using the default Adwaita theme.

That said, if you don't see the bug I'm going to close this ticket as I haven't been able to reproduce the bug at all. Please re-open if the issue occurs again, thanks.