| Summary: | [GTK3] [GTK 3.10] Garbled bold text when used with icons | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Marc-André Laperle <malaperle> |
| Component: | SWT | Assignee: | Snjezana Peco <snjezana.peco> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | critical | ||
| Priority: | P3 | CC: | akurtakov, alkazako, andreas.blochberger, arunkumar.thondapu, daniel_megert, dkwakkel, eclipse, haftsteind, jal, jonah, jonny.lamb, juan.jimenez, kirenpillay1, Lars.Vogel, loskutov, lufimtse, mario.curcija, markus.kell.r, mistria, paul.riou, robert.munteanu, robert.roth.off, simon.scholz, snjezana.peco, udo.walker, woskimi |
| Version: | 4.5 | ||
| Target Milestone: | 4.5 M7 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://git.eclipse.org/r/44286 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=01234cea8bf0b04b381a8eb47a28ba41d0fd4c3e https://bugs.eclipse.org/bugs/show_bug.cgi?id=482230 |
||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 441566, 489383 | ||
| Attachments: | |||
I have bisected the gtk+ git repo to see when this issue "disappeared" but it's not entirely conclusive. I found this commit: commit b4e1e01accb353c9b83b2a96ae0140173e14ec1c Author: Matthias Clasen <mclasen@redhat.com> Date: Fri Jun 13 10:32:44 2014 -0400 Include the Adwaita theme ... But that doesn't explain what in the Adwaita theme fixes the issue and if the problem will still occur with other themes. (In reply to Marc-Andre Laperle from comment #1) > I have bisected the gtk+ git repo to see when this issue "disappeared" but > it's not entirely conclusive. I found this commit: > > commit b4e1e01accb353c9b83b2a96ae0140173e14ec1c > Author: Matthias Clasen <mclasen@redhat.com> > Date: Fri Jun 13 10:32:44 2014 -0400 > > Include the Adwaita theme > ... > > > But that doesn't explain what in the Adwaita theme fixes the issue and if > the problem will still occur with other themes. I confirm that I see it on Fedora 20 but Fedora 21 is good. So there is benefit of merging Adwaita into GTK itself. I also bisected the other way around to find the first bad commit. Interestingly, just a version bump introduced this bug commit 3bc8b2dea4afb0a66093bfb30c3ee0529fdd4632 Author: Matthias Clasen <mclasen@redhat.com> Date: Sun Mar 17 03:07:25 2013 -0400 Bump version to 3.9.0 ... There must be some version check in the code that affects the behavior. It looks like the fix for bug 427480 introduced this bug. If I comment out this code it works: if (OS.GTK_VERSION >= OS.VERSION(3, 9, 0)) { drawState |= SWT.FOREGROUND; } But it reintroduces bug 427480 of course. Ironically, I contributed this code! *** Bug 454439 has been marked as a duplicate of this bug. *** *** Bug 456296 has been marked as a duplicate of this bug. *** Same issue with libgtk-3 3.12.2-0ubuntu15.1 on Kubuntu 14.10 (dpkg -l | grep libgtk) on latest 4.5 head build. I don't think this is related to icons, I think it is related to broken table rendering introduced via bug 427480 fix. *** Bug 457204 has been marked as a duplicate of this bug. *** I think that is a critical bug, as the text in Eclipse is not readable in several cases. *** Bug 458165 has been marked as a duplicate of this bug. *** *** Bug 455234 has been marked as a duplicate of this bug. *** *** Bug 455234 has been marked as a duplicate of this bug. *** Marc-Andre, can you see the same issue as in the screenshots from bug 457909? Might this be related? *** Bug 460126 has been marked as a duplicate of this bug. *** *** Bug 460245 has been marked as a duplicate of this bug. *** Created attachment 251141 [details]
Garbled autocompletion in Java editor
Still seeing this with Mars M5, attached screenshot for how it appears in the Java editor.
(In reply to Robert Munteanu from comment #16) > Created attachment 251141 [details] > Garbled autocompletion in Java editor > > Still seeing this with Mars M5, attached screenshot for how it appears in > the Java editor. Robert, what theme engine do you use? Is it maybe oxygen-gtk3? Because I think switching back to a native gtk3 theme solved the problem for me. However, I'm not 100% sure, because I since returned to gtk2 rendering again, gtk3 was simply unworkable in the end. Otherwise, what you show is exactly what I saw, when I had this problem. I get this problem with GTK 3.14.5. Since 3.13.something GTK stopped using theme engines. I'll look into this. Does anyone have a smaller test case for this bug handy? (In reply to Jonny Lamb from comment #18) > I get this problem with GTK 3.14.5. Since 3.13.something GTK stopped using ^^^^^^^^^^^^^^ sorry, I meant 3.15 here > theme engines. I can reproduce this in Eclipse but I can't get a small SWT case to fail with either the bold text or the renderering problem from bug #427480... If anyone can help me out with a small SWT program that exhibits the same problem shown in Eclipse it would be immensely useful. Created attachment 251228 [details] Small SWT + Jface program (In reply to Jonny Lamb from comment #20) > I can reproduce this in Eclipse but I can't get a small SWT case to fail > with either the bold text or the renderering problem from bug #427480... > > If anyone can help me out with a small SWT program that exhibits the same > problem shown in Eclipse it would be immensely useful. Hi Jonny. I created a small program but it also depends on JFace. I think the most promising approach is probably remove the code in comment 4 and investigate a proper fix for bug 427480. Can this be addressed in M7? IMHO this is currently the most annoying issue with GTK3. (In reply to Lars Vogel from comment #22) > Can this be addressed in M7? IMHO this is currently the most annoying issue > with GTK3. Not the most annoying IMO, but definitely the most visible! (In reply to Lars Vogel from comment #22) > Can this be addressed in M7? IMHO this is currently the most annoying issue > with GTK3. +100! *** Bug 462669 has been marked as a duplicate of this bug. *** New Gerrit change created: https://git.eclipse.org/r/44286 The https://git.eclipse.org/r/44286 patch fixes the issue without using native painting. I suppose the patch also fixes the issue described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=457909 The patch also fixes the issues described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=435773 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=458629 Wow, I didn't try it, but that really seems to be an awesome patch! Created attachment 251813 [details]
Clipping problem screenshot
The patch looks promising! There seems to be a remaining clipping issue though, see attached screenshot.
I expanded the JRE sub-tree then resized the view horizontally a bit.
(In reply to Marc-Andre Laperle from comment #30) > Created attachment 251813 [details] > Clipping problem screenshot > > The patch looks promising! There seems to be a remaining clipping issue > though, see attached screenshot. > > I expanded the JRE sub-tree then resized the view horizontally a bit. The issue happens when calling GC.setClipping(Rectangle rect) which isn't allowed in GTK3. I have updated the patch. Created attachment 251840 [details]
Additional clipping problem screenshot (EGit)
(In reply to Marc-Andre Laperle from comment #32) > Created attachment 251840 [details] > Additional clipping problem screenshot (EGit) This issue seems to be related to GTK. I can reproduce it in GTK 3.10.8 (Ubuntu 14.04), but can't in GTK 3.14.9 (compiled from source). Will try to find what are changes between these versions. (In reply to Snjezana Peco from comment #33) > (In reply to Marc-Andre Laperle from comment #32) > > Created attachment 251840 [details] > > Additional clipping problem screenshot (EGit) > > This issue seems to be related to GTK. > I can reproduce it in GTK 3.10.8 (Ubuntu 14.04), but can't in GTK 3.14.9 > (compiled from source). > Will try to find what are changes between these versions. Interesting! I'm running 3.12.2 (Ubuntu 14.10) so it must be some time after that. The issue can also be reproduced in GTK 3.14.8. I have fixed it so that native painting is used for GTK <= 3.14.8. I have tested this and the issues described in bug 435773 and bug 458629 with GTK 3.10.8, GTK 3.14.8, GTK 3.14.9. Please, review the updated patch. I did some tests with the patch: Gtk 3.8.8 on RHEL 7 -> The issue doesn't occur to begin with. (issue occurs only in Gtk3.10+). Patch has no effect. Gtk 3.10.8 On Fedora -> Reproduced. Patch fixes the issue. +1 Gtk 3.12.3 On Fedora -> Reproduced. Patch fixes the issue. +1 +1 from this end. Gerrit change https://git.eclipse.org/r/44286 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=01234cea8bf0b04b381a8eb47a28ba41d0fd4c3e *** Bug 435773 has been marked as a duplicate of this bug. *** *** Bug 458629 has been marked as a duplicate of this bug. *** In master now. *** Bug 463137 has been marked as a duplicate of this bug. *** Verified in 4.5.0.I20150318-2000. Thanks everyone and especially Snjezana for the patch. IMO, this should be eligible as a "greatfix" (In reply to Mickael Istria from comment #43) > IMO, this should be eligible as a "greatfix" +1 *** Bug 463543 has been marked as a duplicate of this bug. *** *** Bug 457828 has been marked as a duplicate of this bug. *** *** Bug 458633 has been marked as a duplicate of this bug. *** Could the fix described above also be a fix for 462514 ? (In reply to Juan Jimenez from comment #48) > Could the fix described above also be a fix for 462514 ? I think so. *** Bug 462514 has been marked as a duplicate of this bug. *** (In reply to Lars Vogel from comment #50) > *** Bug 462514 has been marked as a duplicate of this bug. *** (In reply to Lars Vogel from comment #49) > (In reply to Juan Jimenez from comment #48) > > Could the fix described above also be a fix for 462514 ? > > I think so. Ok, that is very encouraging. Now, could someone please point me to concise instructions on how I can install the patched gtk alongside the ones I already have so I can test it too without compromising the rest of my system? This is what I did to discover what I already have on my Mint 17.1 setup: Mercury # dpkg -l libgtk* | grep -e '^i' | grep -e 'libgtk-*[0-9]' ii libgtk-3-0:amd64 3.10.8~8+qiana amd64 GTK+ graphical user interface library ii libgtk-3-bin 3.10.8~8+qiana amd64 programs for the GTK+ graphical user interface library ii libgtk-3-common 3.10.8~8+qiana all common files for the GTK+ graphical user interface library ii libgtk2-perl 2:1.249-2 amd64 Perl interface to the 2.x series of the Gimp Toolkit library ii libgtk2.0-0:amd64 2.24.23-0ubuntu1.1 amd64 GTK+ graphical user interface library ii libgtk2.0-0:i386 2.24.23-0ubuntu1.1 i386 GTK+ graphical user interface library ii libgtk2.0-bin 2.24.23-0ubuntu1.1 amd64 programs for the GTK+ graphical user interface library ii libgtk2.0-cil 2.12.10-5 amd64 CLI binding for the GTK+ toolkit 2.12 ii libgtk2.0-common 2.24.23-0ubuntu1.1 all common files for the GTK+ graphical user interface library Apologies for the misunderstanding. I don't need a new GTK 3 but a new Eclipse build. I now have 4.5.0M6 20150326-0744 running on GTK 3.10.8. Bug 462514 is still present. What have I missed this time? (In reply to Juan Jimenez from comment #52) > Apologies for the misunderstanding. I don't need a new GTK 3 but a new > Eclipse build. I now have 4.5.0M6 20150326-0744 running on GTK 3.10.8. > > Bug 462514 is still present. What have I missed this time? You have to use a newer Eclipse build, http://download.eclipse.org/eclipse/downloads/drops4/N20150419-2000/, for instance. Created attachment 252557 [details]
Screen rendering problem in Version: Mars (4.5) Build id: N20150419-2000
Perhaps 462514 is not a duplicate of this bug afterall. I have one of the latest builds, Mars (4.5) Build id: N20150419-2000, but when I scroll the editing window I get huge patches of darkness as seen in the attachment. Please see 462514 for more screenshots and a fuller description.
I am happy to provide any further details. Just let me know what is useful. I don't want to bloat these entries unnecessarily.
(In reply to Juan Jimenez from comment #54) > Created attachment 252557 [details] > Screen rendering problem in Version: Mars (4.5) Build id: N20150419-2000 > > Perhaps 462514 is not a duplicate of this bug afterall. I have one of the > latest builds, Mars (4.5) Build id: N20150419-2000, but when I scroll the > editing window I get huge patches of darkness as seen in the attachment. > Please see 462514 for more screenshots and a fuller description. > > I am happy to provide any further details. Just let me know what is useful. > I don't want to bloat these entries unnecessarily. At least the first issue from Bug 462514 seems to be solved, but the black area not. Please add more details to Bug 462514. (In reply to Juan Jimenez from comment #54) > Created attachment 252557 [details] > Screen rendering problem in Version: Mars (4.5) Build id: N20150419-2000 > > Perhaps 462514 is not a duplicate of this bug afterall. I have one of the > latest builds, Mars (4.5) Build id: N20150419-2000, but when I scroll the > editing window I get huge patches of darkness as seen in the attachment. > Please see 462514 for more screenshots and a fuller description. > > I am happy to provide any further details. Just let me know what is useful. > I don't want to bloat these entries unnecessarily. Try to disable the overlay-scrollbars using export LIBOVERLAY_SCROLLBAR=0 (In reply to Snjezana Peco from comment #56) > Try to disable the overlay-scrollbars using > > export LIBOVERLAY_SCROLLBAR=0 I think they are disabled by default. Has that changed? (In reply to Snjezana Peco from comment #56) > (In reply to Juan Jimenez from comment #54) > > Created attachment 252557 [details] > > Screen rendering problem in Version: Mars (4.5) Build id: N20150419-2000 > > > > Perhaps 462514 is not a duplicate of this bug afterall. I have one of the > > latest builds, Mars (4.5) Build id: N20150419-2000, but when I scroll the > > editing window I get huge patches of darkness as seen in the attachment. > > Please see 462514 for more screenshots and a fuller description. > > > > I am happy to provide any further details. Just let me know what is useful. > > I don't want to bloat these entries unnecessarily. > > Try to disable the overlay-scrollbars using > > export LIBOVERLAY_SCROLLBAR=0 Moving to 462514 as this one is closed. Please change over. (In reply to Lars Vogel from comment #57) > (In reply to Snjezana Peco from comment #56) > > > Try to disable the overlay-scrollbars using > > > > export LIBOVERLAY_SCROLLBAR=0 > > I think they are disabled by default. Has that changed? I don't use Mint, but can reproduce the issue with the black area when enabling the overlay-scrollbars on Ubuntu. *** Bug 462881 has been marked as a duplicate of this bug. *** Since the commit http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=01234cea8bf0b04b381a8eb47a28ba41d0fd4c3e the method GC.setClipping(Rectangle) does not work anymore in GTK >= 3.9.0 This can't be intended? (In reply to Andreas Blochberger from comment #61) > Since the commit > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=01234cea8bf0b04b381a8eb47a28ba41d0fd4c3e the method > GC.setClipping(Rectangle) does not work anymore in GTK >= 3.9.0 > > This can't be intended? It is intented because we haven't properly fixed a painting styled tree/table. It could be removed when bug 466499 is fixed. (In reply to Snjezana Peco from comment #62) > It is intented because we haven't properly fixed a painting styled > tree/table. It could be removed when bug 466499 is fixed. Looking at the Table/Tree code of the commit, none of them is calling GC.setClipping(Rectangle). How can this affect this bug then? For me this method also only looks like a convenience method for a Rectangle parameter. But now it is basically doing nothing. This breaks existing code. (In reply to Andreas Blochberger from comment #63) > (In reply to Snjezana Peco from comment #62) > > It is intented because we haven't properly fixed a painting styled > > tree/table. It could be removed when bug 466499 is fixed. > Looking at the Table/Tree code of the commit, none of them is calling > GC.setClipping(Rectangle). How can this affect this bug then? For me this > method also only looks like a convenience method for a Rectangle parameter. > But now it is basically doing nothing. This breaks existing code. The method is called from StyledCellLabelProvider, CTabRendering, StyledText ... Created attachment 254963 [details]
Project Explorer "blurred/bold" text
On Fedora 21/22, with a recent GTK, we can still see in Project Explorer some text that seens to be drawn twice with some offset, resulting in blurred bold text.
Is this part of this story, or should it be reported separately?
(In reply to Mickael Istria from comment #65) > Created attachment 254963 [details] > Project Explorer "blurred/bold" text > > On Fedora 21/22, with a recent GTK, we can still see in Project Explorer > some text that seens to be drawn twice with some offset, resulting in > blurred bold text. > Is this part of this story, or should it be reported separately? See bug 465054 (In reply to Mickael Istria from comment #65) > Created attachment 254963 [details] > Project Explorer "blurred/bold" text > > On Fedora 21/22, with a recent GTK, we can still see in Project Explorer > some text that seens to be drawn twice with some offset, resulting in > blurred bold text. > Is this part of this story, or should it be reported separately? This is a separate issue that can be reproduced with GTK >= 3.14. *** Bug 457909 has been marked as a duplicate of this bug. *** (In reply to Andreas Blochberger from comment #61) > Since the commit > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=01234cea8bf0b04b381a8eb47a28ba41d0fd4c3e > the method GC.setClipping(Rectangle) does not work anymore in GTK >= 3.9.0 > > This can't be intended? Sure not! This atrocity cost me a day of debugging. First of all, the hack was completely undocumented in the code. Second, it unnecessarily broke all Drawables (although it's only applicable to Table/Tree). Example: Try to set clipping in Snippet245. I've opened bug 489383 to fix this cleanly. Note that this commit in the slakkimsetti/HighDPIChangesforNeon branch has already fixed GC#setClipping(Rectangle) for all widgets other than Table and Tree, and has added explanatory comments that refer to this bug: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=4ff972b78809d2996835d862e322900e0334ebc9 |
Created attachment 247650 [details] Screenshot Eclipse 4.5-I20140916-0800 Using Fedora 20 with GTK 3.10.9-2.fc20 Ubuntu 14.04 with GTK 3.10.8-0ubuntu1.2 1. Start Eclipse with SWT_GTK3=1 2. Open the quick access (Ctrl-3) 3. Start typing "Navigator" without the quotes. The bold text strangely overlaps with itself. It looks like might be related to the icon size not being taken into consideration when offsetting the text.