[poppler] Interesting poppler/cairo Bugs

Michael Vrable mvrable at cs.ucsd.edu
Wed Feb 20 20:42:23 PST 2008


In my continuing saga of attempting to fill in tax forms in evince...

The PDF causing trouble now is this one:
     http://www.ftb.ca.gov/forms/07_forms/07_540.pdf

It loads in evince just fine.  When going to print it out, I run into 
trouble.  Printing to PostScript results in something that gives the
Ghostscript interpreter errors.  Printing to PDF and then attempting to 
load the PDF printout back into evince yields this:

evince: CairoOutputDev.cc:1155: void 
CairoOutputDev::drawImageMaskPrescaled(GfxState*, Object*, Stream*, int, 
int, GBool, GBool): Assertion `0 && "over run\n"' failed.

The printed PDF has
     Creator:        cairo 1.4.14 (http://cairographics.org)
Investigating in a bit more detail, it turns out that the generated PDF 
includes a Type 3 font, one of whose characters includes a 0x0 bitmap.  
This is what leads to the assertion above.  I can send a copy of the 
(probably invalid) generated PDF if anyone is interested.

I haven't figured out what causes an invalid PDF to be generated when 
printing, and building against a newer version of cairo seems to fix the 
problem.  So, this looks like it could be a cairo bug (now fixed), and 
not anything in poppler.  Still, the attached patch might be useful--if 
poppler encounters a bitmap with invalid dimensions, cause it to bail 
out early instead of trying to display it.

With a new version of cairo and this patch, I'm now getting "cairo 
context error: invalid matrix (not invertible)" errors and a 
partially-rendered page instead of a crash on the bad PDF.  Not 
completely sure what parts are due to the cairo update and what to this 
patch, but the patch at least shouldn't hurt...

--Michael Vrable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: invalid-bitmap.patch
Type: text/x-diff
Size: 514 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20080220/5a10d904/attachment.patch 


More information about the poppler mailing list