[Fontconfig] another type of broken ~/.fonts.cache-2 file
Mike FABIAN
mfabian at suse.de
Tue Jan 31 11:47:51 PST 2006
http://lisa.goe.net/~mfabian/.fonts.cache-2.bad
http://lisa.goe.net/~mfabian/.fonts.cache-2.good
Both have the same size:
mfabian at lisa:~/public_html$ ll .fonts.cache-2.*
-rw-r--r-- 1 mfabian users 4902913 2006-01-31 20:37 .fonts.cache-2.bad
-rw-r--r-- 1 mfabian users 4902913 2006-01-31 20:37 .fonts.cache-2.good
mfabian at lisa:~/public_html$
and the fc-cat output for both of them is identical.
If I copy .fonts.cache-2.good to ~/.fonts.cache-2, it works.
If I copy .fonts.cache-2.bad to ~/.fonts.cache-2,
"fc-match sans" seems to loop endlessly, eating up system
resources until it finally dumps core.
The strace shows that it loops over the same font directories
again and again.
Locking with "hex" into ~/.fonts.cache-2.bad reveals that
it contains a list of all the font directories again,
which probably leads to the endless recursion (from offset 0x1000):
1000 2f 68 6f 6d 65 2f 6d 66 61 62 69 61 6e 2f 2e 66 /home/mf abian/.f
1010 6f 6e 74 73 00 2f 75 73 72 2f 73 68 61 72 65 2f onts./us r/share/
1020 66 6f 6e 74 73 00 2f 75 73 72 2f 58 31 31 52 36 fonts./u sr/X11R6
1030 2f 6c 69 62 2f 58 31 31 2f 66 6f 6e 74 73 00 2f /lib/X11 /fonts./
1040 6f 70 74 2f 6b 64 65 33 2f 73 68 61 72 65 2f 66 opt/kde3 /share/f
1050 6f 6e 74 73 00 2f 75 73 72 2f 6c 69 62 2f 6f 6f onts./us r/lib/oo
1060 6f 2d 32 2e 30 2f 73 68 61 72 65 2f 66 6f 6e 74 o-2.0/sh are/font
1070 73 00 2f 75 73 72 2f 6c 69 62 2f 6f 6f 6f 2d 31 s./usr/l ib/ooo-1
1080 2e 31 2f 73 68 61 72 65 2f 66 6f 6e 74 73 00 2f .1/share /fonts./
1090 6f 70 74 2f 4f 70 65 6e 4f 66 66 69 63 65 2e 6f opt/Open Office.o
10a0 72 67 2f 73 68 61 72 65 2f 66 6f 6e 74 73 00 2f rg/share /fonts./
10b0 6f 70 74 2f 73 74 61 72 6f 66 66 69 63 65 36 2e opt/star office6.
10c0 30 2f 73 68 61 72 65 2f 66 6f 6e 74 73 00 2f 75 0/share/ fonts./u
10d0 73 72 2f 6c 69 62 36 34 2f 6a 76 6d 2f 6a 61 76 sr/lib64 /jvm/jav
10e0 61 2d 31 2e 35 2e 30 2d 73 75 6e 2d 31 2e 35 2e a-1.5.0- sun-1.5.
10f0 30 5f 30 31 2f 6a 72 65 2f 6c 69 62 2f 66 6f 6e 0_01/jre /lib/fon
1100 74 73 00 2f 75 73 72 2f 6c 69 62 2f 6a 76 6d 2f ts./usr/ lib/jvm/
1110 6a 61 76 61 2d 31 2e 35 2e 30 2d 73 75 6e 2d 31 java-1.5 .0-sun-1
1120 2e 35 2e 30 5f 30 31 2f 6a 72 65 2f 6c 69 62 2f .5.0_01/ jre/lib/
1130 66 6f 6e 74 73 00 2f 75 73 72 2f 6c 69 62 2f 6a fonts./u sr/lib/j
1140 76 6d 2f 6a 61 76 61 2d 31 2e 34 2e 32 2d 73 75 vm/java- 1.4.2-su
1150 6e 2d 31 2e 34 2e 32 2e 30 36 2f 6a 72 65 2f 6c n-1.4.2. 06/jre/l
1160 69 62 2f 66 6f 6e 74 73 00 2f 75 73 72 2f 6c 69 ib/fonts ./usr/li
1170 62 2f 6a 76 6d 2f 6a 61 76 61 2d 31 5f 34 5f 32 b/jvm/ja va-1_4_2
1180 2d 73 75 6e 2d 31 2e 34 2e 32 2e 31 30 2f 6a 72 -sun-1.4 .2.10/jr
1190 65 2f 6c 69 62 2f 66 6f 6e 74 73 00 2f 75 73 72 e/lib/fo nts./usr
11a0 2f 58 31 31 52 36 2f 6c 69 62 2f 41 63 72 6f 62 /X11R6/l ib/Acrob
11b0 61 74 37 2f 52 65 73 6f 75 72 63 65 2f 46 6f 6e at7/Reso urce/Fon
11c0 74 00 2f 75 73 72 2f 6c 6f 63 61 6c 2f 73 68 61 t./usr/l ocal/sha
11d0 72 65 2f 66 6f 6e 74 73 2f 00 2f 68 6f 6d 65 2f re/fonts /./home/
11e0 6d 66 61 62 69 61 6e 2f 2e 66 6f 6e 74 73 00 2f mfabian/ .fonts./
11f0 75 73 72 2f 73 68 61 72 65 2f 66 6f 6e 74 73 2f usr/shar e/fonts/
~/.fonts.cache-2.good only contains the directories
"/home/mfabian/.fonts" and "/home/mfabian/.fonts/kde-override" at
offset 0x1000:
1000 2f 68 6f 6d 65 2f 6d 66 61 62 69 61 6e 2f 2e 66 /home/mf abian/.f
1010 6f 6e 74 73 00 2f 68 6f 6d 65 2f 6d 66 61 62 69 onts./ho me/mfabi
1020 61 6e 2f 2e 66 6f 6e 74 73 2f 6b 64 65 2d 6f 76 an/.font s/kde-ov
1030 65 72 72 69 64 65 00 00 02 fc 02 fc a1 52 03 00 erride.. .....R..
1040 01 10 f9 26 41 00 00 00 0c 04 00 00 be 04 00 00 ...&A... ........
1050 52 0a 00 00 41 00 00 00 41 00 00 00 7c 0f 00 00 R...A... A...|...
1060 7c 0f 00 00 41 00 00 00 00 00 00 00 00 00 00 00 |...A... ........
1070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
1080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
I have no idea how ~/.fonts.cache-2.bad was created.
--
Mike FABIAN <mfabian at suse.de> http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。
More information about the Fontconfig
mailing list