Subject: reproduced and fixed on x86_64: patch included :-) Followup-For: Bug #559142 Package: xfstt Version: 1.7-5
*** Please type your report below this line *** I get xfstt[3155]: segfault at 4 ip 4085e4 sp 7fffbe604f50 error 4 in xfstt[400000+19000] on start-up. RandomAccessFile::RandomAccessFile(char * filename)'s error path, on failure to open file, neglects to set absbase; this leads to openError() failing to report that open failed, so instances think they're OK and try to use methods that should only be used if open succeeded - boom ! Have a trivial <patch> diff -u /root/xfstt/xfstt-1.7/libfstt/rafile.cc.orig /root/xfstt/xfstt-1.7/libfstt/rafile.cc --- /root/xfstt/xfstt-1.7/libfstt/rafile.cc.orig 2010-01-24 06:14:53.000000000 +0100 +++ /root/xfstt/xfstt-1.7/libfstt/rafile.cc 2010-01-24 06:10:55.000000000 +0100 @@ -176,7 +176,7 @@ int fd = open(fileName, O_RDONLY); if (fd <= 0) { debug("Cannot open \"%s\"\n", fileName); - ptr = base = 0; + ptr = absbase = base = 0; return; } struct stat st; Diff finished. Sun Jan 24 06:15:47 2010 </patch> which has fixed the problem for me. Incidentally, as I initially followed your instructions: <quote src="console"> vortex:~# xfstt corrupt font database! opening TTF database failed, while reading "/usr/share/fonts/truetype" to build it. Sync in directory "/usr/share/fonts/truetype/.". Sync in directory "/usr/share/fonts/truetype/ttf-lucida". [49632.125872] xfstt[11488]: segfault at 0 ip 40b29d sp 7fff5de31680 error 4 in xfstt[400000+21000] Segmentation fault (core dumped) vortex:~# list notes notes.old old/ xfstt/ </quote> have you any idea where the core dump went ? I need to find it to tidy it away ! I don't know what's allegedly corrupt about /usr/share/fonts/truetype/; it looks like a perfectly sensible directory to me, with Isabella.ttf and a bunch of subdirectories in it. For the record, here's my gdb session: <gdb> Current directory is /usr/bin/ GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu"... (gdb) run Starting program: /usr/bin/xfstt corrupt font database! opening TTF database failed, while reading "/usr/share/fonts/truetype" to build it. Sync in directory "/usr/share/fonts/truetype/.". Sync in directory "/usr/share/fonts/truetype/ttf-lucida". Program received signal SIGSEGV, Segmentation fault. 0x000000000040b29d in RandomAccessFile::readUInt (this=0x12bdd00) at ttf.h:132 (gdb) p ptr $1 = (u8_t *) 0x0 (gdb) up #1 0x000000000040c68e in TTFont (this=0x12bdd00, fileName=0x12bcd3b "LucidaSansOblique.ttf", infoOnly=1) at ttfont.cc:45 (gdb) down #0 0x000000000040b29d in RandomAccessFile::readUInt (this=0x12bdd00) at ttf.h:132 (gdb) bt #0 0x000000000040b29d in RandomAccessFile::readUInt (this=0x12bdd00) at ttf.h:132 #1 0x000000000040c68e in TTFont (this=0x12bdd00, fileName=0x12bcd3b "LucidaSansOblique.ttf", infoOnly=1) at ttfont.cc:45 #2 0x0000000000405197 in ttSyncDir (infoFile=0x12bc850, nameFile=0x12bca90, ttdir=0x12bb85b "ttf-lucida", gslist=0) at xfstt.cc:198 #3 0x000000000040582c in ttSyncAll (gslist=0) at xfstt.cc:328 #4 0x00000000004078e9 in main (argc=1, argv=0x7fff6a154438) at xfstt.cc:2039 (gdb) up #1 0x000000000040c68e in TTFont (this=0x12bdd00, fileName=0x12bcd3b "LucidaSansOblique.ttf", infoOnly=1) at ttfont.cc:45 (gdb) p *this $2 = {<RandomAccessFile> = {ptr = 0x0, base = 0x0, absbase = 0x7f10bc3d8000 <Address 0x7f10bc3d8000 out of bounds>, length = 140028}, nameTable = 0x0, headTable = 0x0, maxpTable = 0x0, cmapTable = 0x0, locaTable = 0x0, glyphTable = 0x0, fpgmTable = 0x0, prepTable = 0x0, cvtTable = 0x0, hheaTable = 0x0, hmtxTable = 0x0, os2Table = 0x0, ltshTable = 0x0, hdmxTable = 0x0, vdmxTable = 0x0, gaspTable = 0x0, kernTable = 0x0, ebdtTable = 0x0, eblcTable = 0x0, mortTable = 0x0, vheaTable = 0x0, endPoints = 0x0, points = 0x0} (gdb) up #2 0x0000000000405197 in ttSyncDir (infoFile=0x12bc850, nameFile=0x12bca90, ttdir=0x12bb85b "ttf-lucida", gslist=0) at xfstt.cc:198 (gdb) down #1 0x000000000040c68e in TTFont (this=0x12bdd00, fileName=0x12bcd3b "LucidaSansOblique.ttf", infoOnly=1) at ttfont.cc:45 (gdb) #0 0x000000000040b29d in RandomAccessFile::readUInt (this=0x12bdd00) at ttf.h:132 (gdb) up #1 0x000000000040c68e in TTFont (this=0x12bdd00, fileName=0x12bcd3b "LucidaSansOblique.ttf", infoOnly=1) at ttfont.cc:45 (gdb) down #0 0x000000000040b29d in RandomAccessFile::readUInt (this=0x12bdd00) at ttf.h:132 Breakpoint 1 at 0x40b084: file rafile.cc, line 179. (2 locations) (gdb) down Bottom (innermost) frame selected; you cannot go down. (gdb) up #1 0x000000000040c68e in TTFont (this=0x12bdd00, fileName=0x12bcd3b "LucidaSansOblique.ttf", infoOnly=1) at ttfont.cc:45 (gdb) down #0 0x000000000040b29d in RandomAccessFile::readUInt (this=0x12bdd00) at ttf.h:132 (gdb) p absbase $3 = (u8_t *) 0x7f10bc3d8000 <Address 0x7f10bc3d8000 out of bounds> (gdb) kill Kill the program being debugged? (y or n) y (gdb) quit Debugger finished </gdb> -- System Information: Debian Release: 5.0.3 APT prefers oldstable APT policy: (500, 'oldstable'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.ISO-8859-15, LC_CTYPE=en_GB.ISO-8859-15 (charmap=ISO-8859-15) Shell: /bin/sh linked to /bin/bash Versions of packages xfstt depends on: ii debconf [debconf-2.0] 1.5.24 Debian configuration management sy ii libc6 2.7-18lenny2 GNU C Library: Shared libraries ii libgcc1 1:4.3.2-1.1 GCC support library ii libstdc++6 4.3.2-1.1 The GNU Standard C++ Library v3 ii lsb-base 3.2-20 Linux Standard Base 3.2 init scrip xfstt recommends no packages. xfstt suggests no packages. -- debconf information: xfstt/listen_tcp: false -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org