[MacPorts] #42408: pdftocairo (part of poppler) gives Bus Error: 10
MacPorts
noreply at macports.org
Sat Feb 8 22:43:02 PST 2014
#42408: pdftocairo (part of poppler) gives Bus Error: 10
------------------------+----------------------
Reporter: gdasnon@… | Owner: devans@…
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.2.1
Resolution: | Keywords:
Port: poppler |
------------------------+----------------------
Comment (by devans@…):
I can reproduce the error you describe on 10.8 as well so probably not a
Mavericks specific issue. So far, I can only reproduce it using the file
that you provided and the error occurs when trying to convert it to any
pixel based format (png, jpeg, tiff). Converting to ps, pdf or svg works
OK.
Interestingly, using pdftocairo to first (re-)convert to an intermediate
pdf file and then convert that file to jpeg works fine.
{{{
pdftocairo -pdf Languedoc_001A047_XP8_FP_p17.pdf test.pdf
pdftocairo -jpeg test.pdf test.jpg
}}}
creates a good jpeg of the original. So perhaps this can be used as a
work around.
I note that according to pdfinfo the original file is in PDF 1.3,
optimized format, while the regenerated pdf file is in PDF 1.5, not
optimized.
Running the command in gdb produces the following error and backtrace:
{{{
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000001006f94d0
0x00000001005e63d5 in _cairo_clip_intersect_rectangle_box
(clip=0x1006f94a0, r=0x7fff5fbfe2e8, box=0x7fff5fbfe34c) at cairo-clip-
boxes.c:179
179 clip->is_region = _cairo_box_is_pixel_aligned (box);
(gdb) bt
#0 0x00000001005e63d5 in _cairo_clip_intersect_rectangle_box
(clip=0x1006f94a0, r=0x7fff5fbfe2e8, box=0x7fff5fbfe34c) at cairo-clip-
boxes.c:179
#1 0x00000001005e62ad in _cairo_clip_intersect_box (clip=0x10102f8d0,
box=0x7fff5fbfe34c) at cairo-clip-boxes.c:265
#2 0x000000010065291c in _cairo_spans_compositor_stroke
(_compositor=0x1007292d8, extents=0x7fff5fbfe9d8, path=0x101814d68,
style=0x7fff5fbfeeb0, ctm=0x1010476c0, ctm_inverse=0x1010476f0,
tolerance=0.10000000000000001, antialias=CAIRO_ANTIALIAS_DEFAULT) at
cairo-spans-compositor.c:1070
#3 0x00000001005e990f in _cairo_compositor_stroke
(compositor=0x1007292d8, surface=0x101023b00, op=CAIRO_OPERATOR_OVER,
source=0x7fff5fbfeee0, path=0x101814d68, style=0x7fff5fbfeeb0,
ctm=0x1010476c0, ctm_inverse=0x1010476f0, tolerance=0.10000000000000001,
antialias=CAIRO_ANTIALIAS_DEFAULT, clip=0x10102c390) at cairo-
compositor.c:157
#4 0x0000000100606660 in _cairo_image_surface_stroke
(abstract_surface=0x101023b00, op=CAIRO_OPERATOR_OVER,
source=0x7fff5fbfeee0, path=0x101814d68, style=0x7fff5fbfeeb0,
ctm=0x1010476c0, ctm_inverse=0x1010476f0, tolerance=0.10000000000000001,
antialias=CAIRO_ANTIALIAS_DEFAULT, clip=0x10102c390) at cairo-image-
surface.c:961
#5 0x000000010065bcd1 in _cairo_surface_stroke (surface=0x101023b00,
op=CAIRO_OPERATOR_OVER, source=0x7fff5fbfeee0, path=0x101814d68,
stroke_style=0x7fff5fbfeeb0, ctm=0x1010476c0, ctm_inverse=0x1010476f0,
tolerance=0.10000000000000001, antialias=CAIRO_ANTIALIAS_DEFAULT,
clip=0x10102c390) at cairo-surface.c:2210
#6 0x00000001005f5165 in _cairo_gstate_stroke (gstate=0x1010475d0,
path=0x101814d68) at cairo-gstate.c:1185
#7 0x00000001005edeae in _cairo_default_context_stroke
(abstract_cr=0x101814a00) at cairo-default-context.c:1013
#8 0x00000001005e0f0a in cairo_stroke (cr=0x101814a00) at cairo.c:2146
#9 0x000000010000db84 in CairoOutputDev::stroke (this=0x101021240,
state=0x101048000) at CairoOutputDev.cc:776
#10 0x00000001000a2fae in Gfx::opStroke (this=0x101023c80,
args=0x7fff5fbff290, numArgs=0) at Gfx.cc:1801
#11 0x00000001000aa100 in Gfx::execOp (this=0x101023c80,
cmd=0x7fff5fbff4a8, args=0x7fff5fbff290, numArgs=0) at Gfx.cc:853
#12 0x00000001000a993c in Gfx::go (this=0x101023c80, topLevel=true) at
Gfx.cc:712
#13 0x00000001000a96cc in Gfx::display (this=0x101023c80,
obj=0x7fff5fbff638, topLevel=true) at Gfx.cc:678
#14 0x000000010010cf29 in Page::displaySlice (this=0x101023600,
out=0x101021240, hDPI=72, vDPI=72, rotate=0, useMediaBox=true, crop=false,
sliceX=-1, sliceY=-1, sliceW=-1, sliceH=-1, printing=false,
abortCheckCbk=0, abortCheckCbkData=0x0, annotDisplayDecideCbk=0,
annotDisplayDecideCbkData=0x0, copyXRef=false) at Page.cc:584
#15 0x0000000100111dd2 in PDFDoc::displayPageSlice (this=0x101020610,
out=0x101021240, page=1, hDPI=72, vDPI=72, rotate=0, useMediaBox=true,
crop=false, printing=false, sliceX=-1, sliceY=-1, sliceW=-1, sliceH=-1,
abortCheckCbk=0, abortCheckCbkData=0x0, annotDisplayDecideCbk=0,
annotDisplayDecideCbkData=0x0, copyXRef=false) at PDFDoc.cc:493
#16 0x00000001000079a8 in renderPage (doc=0x101020610,
cairoOut=0x101021240, pg=1, page_w=1105.51, page_h=765.35399999999993,
output_w=2304, output_h=1595) at pdftocairo.cc:581
#17 0x00000001000068d3 in main (argc=3, argv=0x7fff5fbffae0) at
pdftocairo.cc:1046
}}}
Setting a breakpoint at CairoOutputDev::stroke shows that it hits this
breakpoint many, many times before the final error but I haven't been able
to track it down to the specific element in the pdf file that triggers it.
My guess based on all of this is that the problem is the result of some
combination of a specific element instance in the original file format and
way poppler parses that when creating (via cairo) a pixel based output
format and that this occurs very rarely. I don't see any indication so far
that it has anything to do with MacPorts per se.
Hopefully the work around that I described above will help you get done
what you need to do. Do you have other pdf files where this occurs?
--
Ticket URL: <https://trac.macports.org/ticket/42408#comment:5>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list