Bug 25 - bug in function XftCharIndex
Summary: bug in function XftCharIndex
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xft (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Keith Packard
QA Contact:
Depends on:
Reported: 2003-02-12 07:06 UTC by Dmitry Labutcky
Modified: 2011-10-15 17:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Dmitry Labutcky 2003-02-12 07:06:44 UTC
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-slackware-linux"...
(gdb) r
Starting program: /usr/bin/gtk-demo 

** (gtk-demo:31720): WARNING **: Cannot open font file for font Arial 10

Program received signal SIGSEGV, Segmentation fault.
0x4063fc28 in XftCharIndex (dpy=0x0, pub=0x811b948, ucs4=82) at xftglyphs.c:716
716         while (font->hash_table[ent].ucs4 != ucs4)
Comment 1 Keith Packard 2003-02-12 07:58:45 UTC
Can you print out *font and ent?  I'm hoping the trouble is just a NULL
hash table, which can easily be fixed.
Comment 2 Dmitry Labutcky 2003-02-13 00:18:13 UTC
I'm thing, that the bug in the following line in this function:
XftFontInt  *font = (XftFontInt *) pub;
pub is pointer to XftFont structure and after this line font actual point to
XftFont structure in memory which, fistly, smaller then ОXftFontInt, and,
secondary, not include hash_table member
Comment 3 Keith Packard 2003-02-13 08:11:08 UTC
> I'm thing, that the bug in the following line in this function:
> XftFontInt  *font = (XftFontInt *) pub;

No, that line is quite correct.  Xft "hides" the internals of the XftFont
datatype by always returning a pointer to the 'public' version which
contains only a few elements of the structure.  The rest of the structure is
always present, but not visible to the application.  This permits changes in the
XftFontInt datatype without affecting binary or source compatibility.

Can you print out *font and ent when it crashes?
Comment 4 Keith Packard 2003-02-26 08:29:55 UTC
I'm not able to reproduce this problem here, and haven't heard back in over a
week.  If this issue is still a problem, please add a comment including the
content of *font and ent when the crash occurs or I'll be forced to resolve this
Comment 5 Jeremy Huddleston Sequoia 2011-10-01 14:11:38 UTC
Mass update: Close all bugs resolved over one year ago.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.