--- Please enter the report below this line. --- Test program: Debian Release: 4.0 500 testing shadbolt 500 testing mirror 100 unstable mirror --- Package information. --- Depends (Version) | Installed ============================-+-============= libc6 (>= 2.3.6-6) | 2.3.6.ds1-13 libxau6 | 1:1.0.1-2 libxdmcp6 | 1:1.0.1-2 libx11-data | 2:1.0.3-7
tags 421025 +unreproducible moreinfo
thank you
Ben Hutchings wrote:
$ LC_CTYPE=fr_FR ./prout '-*-fixed-*-*-*-*-13-*-*-*-*-*-*-*'
default:
$ LC_CTYPE=fr_FR.utf8 ./prout '-*-fixed-*-*-*-*-13-*-*-*-*-*-*-*'
missing: KSC5601.1987-0
missing: GB2312.1980-0
default:
(the other cases get either the first or the second output from above).
Could you try to debug a little bit and see while it fails?
Brice
Was the fr_FR.utf8 locale actually installed on the test system? I found that the test passes for UTF-8 locales that aren't actually installed. I don't know where to look. strace shows no system call failures, but it can dump the X protocol conversation (-e read=3 -e write=3). Would that be useful? Ben.
Ben Hutchings wrote: Yes (I am french actually): $ locale -a C POSIX en_US en_US.iso88591 en_US.iso885915 en_US.utf8 fr_FR fr_FR.iso88591 fr_FR.iso885915@euro fr_FR.utf8 fr_FR@euro français french I was rather thinking of locating where this assertion is (I don't see it in libx11, strace/gdb might help to locate the library or binary where it comes from). And then try to understand where the error comes from by either reading the corresponding code, or adding some debug printf. Not very easy... Brice
Brice Goglin wrote: your program, not in fontset.c in a lib :) Now we have to understand why the code at the URL below returns NULL: http://git.debian.org/?p=pkg-xorg/lib/libx11.git;a=blob;f=src/FSWrap.c;h=10634ceecae26eab5306507cadda2181019ae2be;hb=HEAD#l167 That would be either XOpenOM returning NULL, or XCreateOC returning NULL, or list->charset_list && *missing_charset_list == NULL... Brice
Doesn't depend on the font name. It's got to be that one. If list->charset_list != NULL and list->charset_count == 0, the Xmalloc call in copy_string_list might return NULL (I don't know whether it supports a size of 0), causing copy_string_list and XCreateFontSet() to return NULL. This seems unlikely to be triggered only by the exact font pattern lists I identified though. Ben.
Ben Hutchings wrote: By the way, did you try with libx11-6 2:1.1.3-1 currently in experimental? Brice
I have tried this now, and the assertion still fails.
I traced through the call with gdb and symbols from the libx11-dbg
package. Most of the interesting code is in omGeneric.c; XCreateFontSet
indirectly calls create_oc in this file. This gets some configuration
from files in /usr/share/X11/locale. The "locale.dir" file specifies
that most UTF-8 locales should get font set configuration from
"en_US.UTF-8/XLC_LOCALE". That specifies that it should look for fonts
covering the following character sets:
0. ISO8859-1
1. ISO8859-1 (again)
2. JISX0208.1983-0
3. KSC5601.1987-0
4. GB2312.1980-0
5. JISX0201.1976-0
6. ISO10646-1
parse_fontname somehow comes up with the following font names for these,
respectively:
0. -misc-fixed-bold-r-normal--13-100-100-100-c-70-iso8859-1
1. -misc-fixed-bold-r-normal--13-100-100-100-c-70-iso8859-1
2. -jis-fixed-medium-r-normal--13-94-100-100-c-0-jisx0208.1983-0
3. (nothing)
4. (nothing)
5. -misc-fixed-medium-r-normal--13-94-100-100-c-0-jisx0201.1976-0
6. -misc-fixed-bold-r-normal--13-120-75-75-c-70-iso10646-1
Then load_font_info calls XListFontsWithInfo for each of these names.
This fails for
"-jis-fixed-medium-r-normal--13-94-100-100-c-0-jisx0208.1983-0", and the
error propagates up to the caller of XCreateFontSet. It would also fail
for "-misc-fixed-medium-r-normal--13-94-100-100-c-0-jisx0201.1976-0".
parse_fontname is calling parse_omit_name, which combines the font
name(s) originally passed to XCreateFontSet with a given character set
and then calls get_font_name, which calls XListFonts. And XListFonts
for "-*-fixed-*-*-*-*-13-*-*-*-*-*-JISX0208.1983-0" returns
"-jis-fixed-medium-r-normal--13-94-100-100-c-0-jisx0208.1983-0".
XListFonts does little other than making a request to the server. So I
guess this is really a server bug.
Here's a new test program:
#include <assert.h>
#include <stdio.h>
#include <X11/Xlib.h>
int main(int argc, char ** argv)
{
Display * display;
char **name_list, **name_list_2;
int count, count_2, i;
XFontStruct *info;
assert(argc >= 2);
display = XOpenDisplay(0);
assert(display);
name_list = XListFonts(display, argv[1], 10, &count);
assert(name_list);
for (i = 0; i != count; ++i)
{
name_list_2 = XListFontsWithInfo(display, name_list[i], 1, &count_2,
&info);
if (name_list_2)
{
printf("%s exists\n", name_list[i]);
XFreeFontInfo(name_list_2, info, count_2);
}
else
{
printf("%s doesn't exist!\n", name_list[i]);
}
}
XFreeFontNames(name_list);
return 0;
}
Run this with the argument
"-*-fixed-*-*-*-*-*-*-*-*-*-*-JISX0208.1983-0" and you should see the
bug (or not).
Ben.
On Sun, 2007-09-23 at 06:29 +0100, Ben Hutchings wrote: <snip> I suspect you won't see it. With my normal X server I get: $ ./listfonts -*-fixed-*-*-*-*-13-*-*-*-*-*-JISX0208.1983-0 -jis-fixed-medium-r-normal--13-94-100-100-c-0-jisx0208.1983-0 doesn't exist! -misc-fixed-medium-r-normal--13-94-100-100-c-0-jisx0208.1983-0 doesn't exist! With an Xvfb server in a clean etch chroot I get: $ DISPLAY=:1 ,/listfonts -*-fixed-*-*-*-*-13-*-*-*-*-*-JISX0208.1983-0 -jis-fixed-medium-r-normal--13-94-100-100-c-0-jisx0208.1983-0 exists -misc-fixed-medium-r-normal--13-94-100-100-c-0-jisx0208.1983-0 exists However: $ xlsfonts | grep jisx0208 -jis-fixed-medium-r-normal--0-0-75-75-c-0-jisx0208.1983-0 -jis-fixed-medium-r-normal--16-110-100-100-c-160-jisx0208.1983-0 -jis-fixed-medium-r-normal--16-150-75-75-c-160-jisx0208.1983-0 -jis-fixed-medium-r-normal--24-170-100-100-c-240-jisx0208.1983-0 -jis-fixed-medium-r-normal--24-230-75-75-c-240-jisx0208.1983-0 -misc-fixed-medium-r-normal--0-0-75-75-c-0-jisx0208.1983-0 -misc-fixed-medium-r-normal--14-130-75-75-c-140-jisx0208.1983-0 $ diff <(xlsfonts | grep jisx0208) <(DISPLAY=:1 xlsfonts | grep jisx0208) && echo same same And: $ ./listfonts -jis-fixed-medium-r-normal--0-0-75-75-c-0-jisx0208.1983-0 -jis-fixed-medium-r-normal--0-0-75-75-c-0-jisx0208.1983-0 doesn't exist! $ DISPLAY=:1 ./listfonts -jis-fixed-medium-r-normal--0-0-75-75-c-0-jisx0208.1983-0 -jis-fixed-medium-r-normal--0-0-75-75-c-0-jisx0208.1983-0 exists It seems like the servers are offering (in XListFonts) to make 13-pixel fixed for JISX0208 by scaling the 14-pixel or 16-pixel bitmap (ugh!), but my normal X server then disavows that in XListFontsWithInfo. Where do we go from here? Ben.
Hello, I encounter this bug on the one of my lenny systems. I can't track this down, but I seem to find a working solution. After 'xset +fp /usr/share/fonts/X11/misc/:unscaled' command the xserver starts to return the same list of fonts for XListFonts and XListFontsWithInfo calls. Moreover, deleting this item from font path by 'xset -fp ...' or even 'xset fp default' leaves the expected behavior.
Hi, Ben Hutchings wrote (23 Sep 2007 14:37:10 GMT) : In case it helps, on my up-to-date sid system: $ listfonts "-*-fixed-*-*-*-*-*-*-*-*-*-*-JISX0208.1983-0" -jis-fixed-medium-r-normal--16-110-100-100-c-160-jisx0208.1983-0 exists -jis-fixed-medium-r-normal--16-150-75-75-c-160-jisx0208.1983-0 exists -jis-fixed-medium-r-normal--24-170-100-100-c-240-jisx0208.1983-0 exists -jis-fixed-medium-r-normal--24-230-75-75-c-240-jisx0208.1983-0 exists -misc-fixed-medium-r-normal--14-130-75-75-c-140-jisx0208.1983-0 exists -jis-fixed-medium-r-normal--17-120-100-100-c-0-jisx0208.1983-0 exists -jis-fixed-medium-r-normal--0-0-75-75-c-0-jisx0208.1983-0 exists -misc-fixed-medium-r-normal--17-120-100-100-c-0-jisx0208.1983-0 exists -misc-fixed-medium-r-normal--0-0-75-75-c-0-jisx0208.1983-0 exists Cheers, -- intrigeri | GnuPG key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc | OTR fingerprint @ https://gaffer.ptitcanardnoir.org/intrigeri/otr.asc