|
Bugzilla – Full Text Bug Listing |
| Summary: | libXft uses new fontconfig objects without registering | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE Linux 10.1 | Reporter: | Mike Fabian <mfabian> |
| Component: | X.Org | Assignee: | Stefan Dirsch <sndirsch> |
| Status: | RESOLVED FIXED | QA Contact: | Stefan Dirsch <sndirsch> |
| Severity: | Normal | ||
| Priority: | P2 - High | CC: | dmueller, eich |
| Version: | Alpha 1 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Found By: | Development | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
p_xft_bugzilla_141216.diff
fontconfig-test.c fontconfig-test.c |
||
|
Description
Mike Fabian
2006-01-03 10:56:00 UTC
in libXft, xftdpy.c, around line 547:
if (FcPatternGet (pattern, XFT_MAX_GLYPH_MEMORY, 0, &v) == FcResultNoMatch)
{
FcPatternAddInteger (pattern, XFT_MAX_GLYPH_MEMORY,
XftDefaultGetInteger (dpy, XFT_MAX_GLYPH_MEMORY,
screen,
XFT_FONT_MAX_GLYPH_MEMORY));
}
libXft adds a custom fontconfig object which has not been registered
with fontconfig, i.e. FcNameRegisterObjectTypes has not been called
for this object.
This leads to a crash in rxvt-unicode when starting rxvt-unicode like
this:
urxvt -fn "fixed,xft:courier"
and then displaying Japanese:
LC_ALL=ja_JP.UTF-8 date
Created attachment 61879 [details]
p_xft_bugzilla_141216.diff
Patch to fix the problem.
patch by Dirk Müller <dmueller@suse.de> and me. After fixing the problem with the bitmap fonts mentioned in bug #137145, urxvt still crashed often, but this fix for libXft finally seems to avoid all remaining fontconfig related crashes of urxvt. Added Jan Blunck <jblunck@suse.de> to CC: because he suffered from the urxvt crashes. Jan, you can try the xorg-x11 packages from the following mbuild jobs (for STABLE): magellan-mfabian-23 xorg-x11: finished - succeeded: 1 magellan-mfabian-24 xorg-x11: finished - succeeded: 1 They should fix the problem for you. Reassigning to sndirsch@suse.de to add the patch to our xorg-x11 package. Created attachment 61886 [details]
fontconfig-test.c
Test program to demonstrate the problem.
Compiling and running the test program:
mfabian@magellan:~/c$ make fontconfig-test
gcc -g -O0 -Wall -o fontconfig-test fontconfig-test.c -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/X11R6/include -L/usr/X11R6/lib64 -lXft -lX11 -lfreetype -lfontconfig -L/usr/X11R6/lib64 -lXrender -lX11
fontconfig-test.c: In function ‘main’:
fontconfig-test.c:41: warning: pointer targets in passing argument 1 of ‘FcNameParse’ differ in signedness
fontconfig-test.c:42: warning: pointer targets in assignment differ in signedness
fontconfig-test.c:46: warning: pointer targets in assignment differ in signedness
fontconfig-test.c:38: warning: unused variable ‘p’
mfabian@magellan:~/c$ ./fontconfig-test courier
1: courier
1: courier:maxglyphmemory=1048576:\_\_DUMMY\_\_=1048576
mfabian@magellan:~/c$
Note the weird __DUMMY__ which has been added to the pattern after
FcPatternAddInteger (pattern, XFT_MAX_GLYPH_MEMORY, 1048576);
Created attachment 61887 [details]
fontconfig-test.c
"fixed" test program which adds
{ XFT_MAX_GLYPH_MEMORY, FcTypeInteger, },
to _XftObjectTypes[].
Compiling and running the "fixed" test-program: mfabian@magellan:~/c$ make fontconfig-test gcc -g -O0 -Wall -o fontconfig-test fontconfig-test.c -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/X11R6/include -L/usr/X11R6/lib64 -lXft -lX11 -lfreetype -lfontconfig -L/usr/X11R6/lib64 -lXrender -lX11 fontconfig-test.c: In function ‘main’: fontconfig-test.c:41: warning: pointer targets in passing argument 1 of ‘FcNameParse’ differ in signedness fontconfig-test.c:42: warning: pointer targets in assignment differ in signedness fontconfig-test.c:46: warning: pointer targets in assignment differ in signedness fontconfig-test.c:38: warning: unused variable ‘p’ mfabian@magellan:~/c$ ./fontconfig-test courier 1: courier 1: courier:maxglyphmemory=1048576 mfabian@magellan:~/c$ The fixed test-program shows that after properly registering the new fontconfig object the weird __DUMMY__ element is not added to the pattern anymore. probably this should be committed upstream as an obvious bugfix. fixed for STABLE, i.e. 10.1 Beta1. Reported upstream: https://bugs.freedesktop.org/show_bug.cgi?id=5491 |