I was testing fc-cache regeneration time, and did rm -rf .fonts/fonts when I reran fc-cache, it segfaulted.. brk(0x1472000) = 0x1472000 stat("/home/davej/.fonts/fonts", 0x7fffffd35460) = -1 ENOENT (No such file or directory) --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV (core dumped) +++ gdb says.. at fccache.c:310 310 if (strncmp (d->name, dir, strlen(dir)) == 0) backtrace: #0 0x000000367c30ff6e in FcGlobalCacheReadDir (set=0x50ac20, dirs=Variable "dirs" is not available. ) at fccache.c:310 #1 0x000000367c317179 in FcDirScanConfig (set=0x50ac20, dirs=0x5030e0, cache=0x507fd0, blanks=0x50a350, dir=0x507910 "/home/davej/.fonts/fonts", force=0, config=0x503010) at fcdir.c:142 #2 0x000000367c3128b7 in FcConfigBuildFonts (config=0x503010) at fccfg.c:304 #3 0x000000367c31a54d in FcInitLoadConfigAndFonts () at fcinit.c:85 #4 0x000000000040178d in main (argc=1, argv=0x7fffffd35778) at fc-cache.c:278 #5 0x0000003c3b91cde4 in __libc_start_main () from /lib64/libc.so.6 #6 0x00000000004010f9 in _start () #7 0x00007fffffd35768 in ?? () #8 0x0000000000000000 in ?? ()
I can confirm this as well. While the font cache problems seems to have been resolved this one cast me an hour to discover today. In KDE it was segfaulting things at the start which hang the entire login process. Just building an empty .fonts directory and running mkfondir inside solves the problem. Hopefully this is the last one!
mkfontdir has nothing to do with fontconfig caches. I'm not sure I understand how exactly this problem occurs. Are you removing ~/.fonts _while_ fc-cache is running , or do you remove it before running fc-cache ? And do you still see this problem with todays fontconfig ?
seems to run to completion with latest rawhide.