Bug 67 - 2.1.94 segfaults when caching .fon fonts
Summary: 2.1.94 segfaults when caching .fon fonts
Status: RESOLVED FIXED
Alias: None
Product: fontconfig
Classification: Unclassified
Component: fc-cache (show other bugs)
Version: 2.1
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Keith Packard
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 3450
  Show dependency treegraph
 
Reported: 2003-04-17 19:10 UTC by Marcus Furlong
Modified: 2003-04-17 15:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Marcus Furlong 2003-04-17 19:10:41 UTC
[root@collins ~]# fc-cache -f -v
fc-cache: "/usr/X11R6/lib/X11/fonts": caching, 0 fonts, 11 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/CID": caching, 0 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/TTF": caching, 18 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/misc": caching, 51 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/util": caching, 0 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/75dpi": caching, 348 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/Type1": caching, 29 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/local": caching, 0 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/Speedo": caching, 0 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/encodings": caching, 0 fonts, 1 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/encodings/large": caching, 0 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/100dpi": caching, 358 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/cyrillic": caching, 0 fonts, 0 dirs
fc-cache: "/usr/share/fonts": caching, 19 fonts, 3 dirs
fc-cache: "/usr/share/fonts/TTF": caching, 39 fonts, 0 dirs
fc-cache: "/usr/share/fonts/Type1": caching, 35 fonts, 0 dirs
fc-cache: "/usr/share/fonts/windows": Segmentation fault

the /usr/share/fonts/windows directory contains *.fon fonts copied from windows.
worked perfectly and cached the fonts without crashing in versions up to and
including 2.1.92, didn't try 2.1.93.
Comment 1 Keith Packard 2003-04-17 22:02:46 UTC
Can you run this with FC_DEBUG set to 128 and under gdb so that you can post a
stack trace?

# export FC_DEBUG=128
# gdb fc-cache
...
(gdb) run -f -v
...
(gdb) where
Comment 2 furlongm 2003-04-18 00:40:04 UTC
/usr/X11R6/bin/fc-cache: "/usr/share/fonts/windows":
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) where
#0  0x00000000 in ?? ()
#1  0x400568ba in FT_Get_BDF_Property (face=0x8090b50, prop_name=0x400942b3
"get_bdf_property", aproperty=0xbffff6b0)
    at /usr/src/blfs/x/libs/freetype-2.1.4/src/base/ftbdf.c:88
#2  0x40026d9f in FcFreeTypeQuery (file=0x8072e50
"/usr/share/fonts/windows/85f874.fon", id=0, blanks=0x400942b3,
    count=0x400942b3) at fcfreetype.c:784
#3  0x40025dbd in FcFileScan (set=0x809b768, dirs=0x8074d18, cache=0x0,
blanks=0x8053088,
    file=0x8072e50 "/usr/share/fonts/windows/85f874.fon", force=1) at fcdir.c:113
#4  0x4002611b in FcDirScan (set=0x809b768, dirs=0x8074d18, cache=0x0,
blanks=0x8053088,
    dir=0x8074090 "/usr/share/fonts/windows", force=1) at fcdir.c:221
#5  0x08048db5 in scanDirs (list=0x80a0170, config=0x804a910, program=0xbffffa97
"/usr/X11R6/bin/fc-cache", force=1,
    verbose=1) at fc-cache.c:166
#6  0x08048e1f in scanDirs (list=0x804e328, config=0x804a910, program=0xbffffa97
"/usr/X11R6/bin/fc-cache", force=1,
    verbose=1) at fc-cache.c:197
#7  0x0804914c in main (argc=134538024, argv=0xbffff994) at fc-cache.c:278
#8  0x400ea572 in __libc_start_main () from /lib/libc.so.6
Comment 3 Keith Packard 2003-04-18 08:59:20 UTC
Good work -- easy to fix with that trace.  The bug is in FreeType, but I've
placed a workaround in fontconfig.  Fetch a new version of src/fcfreetype.c from
CVS if you want to give it a try.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.