Community
Participate
Working Groups
I20060110-1026, GTK+ 2.8.8, KDE 3.4.3, X.org 6.8.2, Linux 2.6.14 I'll attach a screenshot. There seems to be "gaps" in the selection in StyledText widgets.
Created attachment 32838 [details] StyledText with weird selection
A festival for carets perhaps?
Just a FYI, I can also see this with eclipe 3.2 M4, GTK+ 2.8.9, X.org 7.0 and Linux 2.6.15.
After mentioning this on IRC, I suspect this is GTK+ version specific. It is likely not a recent change in our code base. Talk to tashiro or ijuma on irc.freenode.net#eclipse-dev for more information (or me, for that matter).
pango 1.10.2
The pango version may be the most critical (and whether pango-cairo is used). There have been some bugs found recently with zero-width characters under pango-cairo. Just a guess though really.
From the discussions on IRC, this happens with two versions of pango, 1.10.2 and 1.11.1.
*** Bug 123935 has been marked as a duplicate of this bug. ***
*** Bug 127786 has been marked as a duplicate of this bug. ***
*** Bug 128028 has been marked as a duplicate of this bug. ***
same problem here gtk+ 2.8.8 pango 1.10.3 cairo 1.0.2
*** Bug 125220 has been marked as a duplicate of this bug. ***
Billy: I wrote a test code for this problem in C and it worked just fine, I got the same c code and I pasted it in a JNI method and compiled it as library, from java I only load the library and call the jni method and the problem happens. SSQ told me that the some c library load by the java vm has a bug with float point math that causes this problem to happen. Billy, do you know anything about this ?
If you see this it is likely a floating point precision problem in cairo. Let me find the magic code.
Use this template at the start of your test application: #include <gtk/gtk.h> #include <fpu_control.h> int main (int argc, char **argv) { fpu_control_t fpu_control; _FPU_GETCW (fpu_control); fpu_control &= ~_FPU_EXTENDED; fpu_control |= _FPU_DOUBLE; _FPU_SETCW (fpu_control); And see this cairo bug: https://bugs.freedesktop.org/show_bug.cgi?id=5200
Thanks billy, you the man! I verified that in extended fpu it works fine. The problem here is in gdk_pango_layout_get_clip_region(), this func returns a region that is one pixel to short when the planets are not aligned properly (so far they are: font, text, pango version, and last but not least: FPU mode). The trivial fix is to flip the FPU to extended before calling gdk_pango_layout_get_clip_region() and restore it after. But that doesn't work, the metrics are computed by the pango layout and cached, I don't know when it gets computed, sometime during pango_draw or pango_size_get, etc. Set extended right when the app start fixes the problem, but the VM probably has a reason to FPU to double mode. Not sure I can fix this.
I've posted to https://bugs.freedesktop.org/show_bug.cgi?id=5200 -- mentioning that their current suggested patch does not work, and asking for a workaround.
*** Bug 132447 has been marked as a duplicate of this bug. ***
this item is on the polish list for 3.2, will it be fixed for 3.2?
I can't get this to work with Eclipse, I change the code to flip the mpu mode to extended but (I think) the VM keeps flipping it back to double precision. The fix worked for the simple testcase but with eclipse.
Note that the upstream bug is now fixed in pango CVS.
Billy, we need to put in a work around for this but guard it with a version check and only run the code when we have to. Can you help us determine which versions have the bug and which do not?
*** Bug 137910 has been marked as a duplicate of this bug. ***
I just had my machine updated to Fedora Core 5 and I have the bug now: -sh-3.1$ rpm -q gtk2 glib2 pango cairo gtk2-2.8.17-1.fc5.1 glib2-2.10.2-1.fc5.1 pango-1.12.1-1.fc5.1 cairo-1.0.4-1 Past week I was running gtk-2.8.17, glib-2.10.2, cairo-1.0.4, and pango-1.13.0 in my old Fedora Core 3 and it was all working fine. I think this bug got fixed between pango 1.12.1 and pango 1.13.0. I verify it and report back.
(In reply to comment #24) > I think this bug got fixed between pango 1.12.1 and pango 1.13.0. I verify it > and report back. I think you're right - at least that's what the changelog says :) http://cvs.gnome.org/viewcvs/pango/ChangeLog?view=markup
I verified it works on pango 1.13.0
closing
*** Bug 112858 has been marked as a duplicate of this bug. ***