Created attachment 67194 [details]
PDF test case
This bug was reported in Ubuntu Launchpad against Evince, then to GNOME Bugzilla, but it seems the problem is in poppler.
Steps to reproduce it:
- Open the file with poppler-glib-demo (I tried with master b72c02d1)
- Render the first page
- Print to a file (PDF).
Created attachment 67195 [details]
This is the backtrace I got after trying to print.
Works for me with poppler master and cairo 1.12.6 using the command:
pdftocairo -pdf bug54950.pdf out.pdf
According to your stack trace you are using cairo 1.10.2. Looks like a bug that has been fixed in cairo. Please re-open if you can reproduce the bug with cairo master.
(In reply to comment #2)
> Works for me with poppler master and cairo 1.12.6 using the command:
> pdftocairo -pdf bug54950.pdf out.pdf
This command also works with previous versions of cairo.
> According to your stack trace you are using cairo 1.10.2. Looks like a bug
> that has been fixed in cairo. Please re-open if you can reproduce the bug
> with cairo master.
I can reproduce it with cairo master from Nov 3 (cf07bd866dc).
Created attachment 69496 [details]
backtrace full (cairo master cf07bd866dc3fd )
Updated backtrace with cairo master cf07bd866dc3fd
Looks a cairo deadlock bug when destroying fonts.
Created attachment 69507 [details] [review]
cairo test code
Attached is a minimal cairo program to reproduce the bug. It needs to be run with the PDF file attached to this bug.
The macros at the top allow any combination of PNG PS, or PDF output. It works fine for any single output or for PS and PDF output. But when PNG and at least one of PS/PDF is included it hangs during the PS/PDF output somewhere in scaled_font_destroy.
I'm not sure why this particular PDF file triggers the bug but it does contain over 100 fonts which may have something to do with it.
Author: Chris Wilson <firstname.lastname@example.org>
Date: Tue Jan 8 14:56:07 2013 +0000
scaled-font: Free the cached glyphs from the font before taking the global lock
In the case of a recording surface we may recurse into the global glyph
cache so we need to be careful and stage the ordering of how we free the
glyphs. So first we finish any information and surfaces from the scaled
font glyph cache (and so triggering recursion into other scaled fonts)
and then take the global cache and remove our pages.
Signed-off-by: Chris Wilson <email@example.com>