As reported on http://bugs.debian.org/505482 using gnome-font-viewer on a certain ttf file causes the program to spin indefinitely with 100% CPU usage.
The backtrace is
#0 0x00007fa218b51cff in XftCharIndex () from /usr/lib/libXft.so.2
#1 0x00007fa218b4f97a in XftTextExtentsUtf8 () from /usr/lib/libXft.so.2
#2 0x0000000000403484 in create_text_pixmap (drawing_area=0x268b960,
face=0x2426d60) at font-view.c:169
#3 0x00000000004045c6 in main (argc=2, argv=0x7fff20f73828)
The file in question can be downloaded from
The file is probably broken or otherwise strange, so the severity is low, but the library should nevertheless handle it more gracefully.
Yeah, it looks like XftCharIndex does not handle errors well. We're stuck
while (font->hash_table[ent].ucs4 != ucs4)
if (font->hash_table[ent].ucs4 == (FcChar32) ~0)
if (!XftCharExists (dpy, pub, ucs4))
face = XftLockFace (pub);
font->hash_table[ent].ucs4 = ucs4;
font->hash_table[ent].glyph = FcFreeTypeCharIndex (face, ucs4);
offset = ucs4 % font->rehash_value;
offset = 1;
ent = ent + offset;
if (ent >= font->hash_value)
ent -= font->hash_value;
Mass closure: This bug has been untouched for more than six years, and is not
obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.