Evince crashes with certain pdf file. In this case the problem is font
related. The poppler library assumed the font structure it received is
always valid. Though the particular pdf file contains fonts triggered
this bug. The patch is obvious,
$diff -u TextOutputDev.cc.orig TextOutputDev.cc
--- TextOutputDev.cc.orig 2010-01-14 15:21:00.179176017 +0000
+++ TextOutputDev.cc 2010-01-14 15:51:53.363952966 +0000
@@ -233,9 +233,11 @@
font = fontA;
fontSize = fontSizeA;
state->transform(x0, y0, &x, &y);
- if ((gfxFont = font->gfxFont)) {
- ascent = gfxFont->getAscent() * fontSize;
- descent = gfxFont->getDescent() * fontSize;
+ if (font) {
+ if ((gfxFont = font->gfxFont)!= NULL) {
+ ascent = gfxFont->getAscent() * fontSize;
+ descent = gfxFont->getDescent() * fontSize;
+ }
} else {
// this means that the PDF file draws text without a current font,
// which should never happen
-Ghee