[Fontconfig] Re: confused about semantics of $HOME/.fonts.cache-2
Behdad Esfahbod
behdad at cs.toronto.edu
Thu Jan 26 05:40:24 PST 2006
On Thu, 26 Jan 2006, Mike FABIAN wrote:
> Behdad Esfahbod <behdad at cs.toronto.edu> =A4=B5=A4=F3=A4=CF=BD=F1=A4=AD=A4=
=DE=A4=B7=A4=BF:
>
> > I can reproduce this consistently:
> >
> > [behdad at home ~]$ rm .fonts.cache-2* -f
> > [behdad at home ~]$ \time fc-list | wc -l
> > 2.49user 0.09system 0:02.59elapsed 99%CPU (0avgtext+0avgdata 0maxreside=
nt)k
> > 0inputs+0outputs (0major+29969minor)pagefaults 0swaps
> > 198
> > [behdad at home ~]$ ll .fonts.cache-2*
> > -rw------- 1 behdad behdad 286721 Jan 25 13:27 .fonts.cache-2
> > [behdad at home ~]$ sudo touch /usr/share/fonts/bitstream-vera
> > [behdad at home ~]$ fc-list
> > Segmentation fault
>
> I cannot reproduce that crash with the current CVS.
Note that I have installed fc-branch in my home user and not
created global -2 caches. And I got random apps crashing
randomly all the time after yesterday's cvs up, so had to
uninstall it.
behdad
> (with my patch improve-normalization-of-font-path-add-subdirs.patch,
> see
>
> http://lists.freedesktop.org/archives/fontconfig/2006-January/001939.html
>
> but I doubt this makes a difference).
>
> > [behdad at home ~]$ ll .fonts.cache-2*
> > -rw------- 1 behdad behdad 286721 Jan 25 13:27 .fonts.cache-2
> > -rw------- 1 behdad behdad 6 Jan 25 13:27 .fonts.cache-2.LCK
> > -rw------- 1 behdad behdad 14522 Jan 25 13:27 .fonts.cache-2.NEW
> > [behdad at home ~]$ \time fc-list | wc -l
> > 0.03user 0.01system 0:00.05elapsed 84%CPU (0avgtext+0avgdata 0maxreside=
nt)k
> > 0inputs+0outputs (0major+806minor)pagefaults 0swaps
> > 198
> > [behdad at home ~]$ ll .fonts.cache-2*
> > -rw------- 1 behdad behdad 286721 Jan 25 13:27 .fonts.cache-2
> > -rw------- 1 behdad behdad 6 Jan 25 13:27 .fonts.cache-2.LCK
> > -rw------- 1 behdad behdad 14522 Jan 25 13:27 .fonts.cache-2.NEW
> >
> >
> >
> > And the backtrace:
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread -1209092416 (LWP 28257)]
> > 0x004d4d42 in FcGlobalCacheSave (cache=3D0x9b4cad0,
> > cache_file=3D0x9b440e8 "/home/behdad/.fonts.cache-2", config=3D0x9b=
44008)
> > at fccache.c:152
> > 152 if (write (fd, chars, strlen(chars)+1) !=3D strlen(chars)+1=
)
> > (gdb) bt
> > #0 0x004d4d42 in FcGlobalCacheSave (cache=3D0x9b4cad0,
> > cache_file=3D0x9b440e8 "/home/behdad/.fonts.cache-2", config=3D0x9b=
44008)
> > at fccache.c:152
> > #1 0x004d8910 in FcConfigBuildFonts (config=3D0x9b44008) at fccfg.c:32=
8
> > #2 0x004e19cd in FcInitLoadConfigAndFonts () at fcinit.c:85
> > #3 0x004e1c66 in FcInit () at fcinit.c:103
> > #4 0x08048b16 in main (argc=3D1, argv=3D0xbfd03b84) at fc-list.c:119
> > (gdb)
> >
> >
> > (gdb) p cache->dirs[0]
> > $4 =3D {next =3D 0x9b46538, name =3D 0x9b5ba88
> > "/usr/share/fonts/bitstream-vera",
> > metadata =3D {magic =3D -66913278, count =3D 10361, bank =3D 77890432=
2,
> > pattern_count =3D 10, patternelt_count =3D 164, valuelist_count =3D=
164,
> > str_count =3D 238, langset_count =3D 10, charset_count =3D 10,
> > charset_numbers_count =3D 90, charset_leaf_count =3D 90,
> > charset_leaf_idx_count =3D 10}, offset =3D 0, ent =3D 0x9b54998}
> >
> >
> > I cannot do p chars, because of inlining I guess.
> >
> >
> > --behdad
> > http://behdad.org/
> >
> > "Commandment Three says Do Not Kill, Amendment Two says Blood Will Spil=
l"
> > =09-- Dan Bern, "New American Language"
> > _______________________________________________
> > Fontconfig mailing list
> > Fontconfig at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/fontconfig
> >
>
>
--behdad
http://behdad.org/
"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
=09-- Dan Bern, "New American Language"
More information about the Fontconfig
mailing list