<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - pdftocairo crashes on converting big images in PDFs"
href="https://bugs.freedesktop.org/show_bug.cgi?id=100056">100056</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>pdftocairo crashes on converting big images in PDFs
</td>
</tr>
<tr>
<th>Product</th>
<td>cairo
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Assignee</th>
<td>chris@chris-wilson.co.uk
</td>
</tr>
<tr>
<th>Reporter</th>
<td>korobkin+lpad@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>cairo-bugs@cairographics.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=130054" name="attach_130054" title="onepager.pdf">attachment 130054</a> <a href="attachment.cgi?id=130054&action=edit" title="onepager.pdf">[details]</a></span>
onepager.pdf
When converting the PDFs that contain just a single image (large grayscale
image, seems like a scan), pdftocairo segfaults.
Tested on Ubuntu 14.04 x64,
cairo 1.14.8
poppler 0.49.0
$ /usr/bin/pdftocairo -ps -level3 onepager.pdf out.ps
Segmentation fault
Yes, the file contains large image inside: PNG image data, 19833 x 28067,
8-bit/color RGBA, non-interlaced, but pdftops converts the file instantly.
Here is the output from gdb:
(gdb) file /usr/bin/pdftocairo
Reading symbols from /usr/bin/pdftocairo...Reading symbols from
/usr/lib/debug/.build-id/06/b55d5ad8a0410ac56bafe79e17dca8d917b612.debug...done.
Unable to determine compiler version.
done.
(gdb) set args -ps -level3 onepager.pdf out.ps
(gdb) run
Starting program: /usr/bin/pdftocairo -ps -level3 onepager.pdf out.ps
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6575034 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff6575034 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff736b594 in _cairo_image_surface_snapshot
(abstract_surface=0x5555557b9a40) at
/tmp/build-debs.brV892/build/src/cairo-image-surface.c:792
#2 0x00007ffff73c0516 in _cairo_surface_snapshot_copy_on_write
(surface=0x5555557ba390) at
/tmp/build-debs.brV892/build/src/cairo-surface-snapshot.c:189
#3 0x00007ffff73b62ef in _cairo_surface_detach_snapshot
(snapshot=0x5555557ba390) at
/tmp/build-debs.brV892/build/src/cairo-surface.c:348
#4 0x00007ffff73b625d in _cairo_surface_detach_snapshots
(surface=0x5555557b9a40) at
/tmp/build-debs.brV892/build/src/cairo-surface.c:333
#5 0x00007ffff73b7d29 in _cairo_surface_flush (surface=0x5555557b9a40,
flags=0) at /tmp/build-debs.brV892/build/src/cairo-surface.c:1545
#6 0x00007ffff73b7481 in _cairo_surface_finish_snapshots
(surface=0x5555557b9a40) at
/tmp/build-debs.brV892/build/src/cairo-surface.c:1017
#7 0x00007ffff73b72f1 in INT_cairo_surface_destroy (surface=0x5555557b9a40) at
/tmp/build-debs.brV892/build/src/cairo-surface.c:961
#8 0x00007ffff738f51c in _cairo_pattern_fini (pattern=0x5555557b98a0) at
/tmp/build-debs.brV892/build/src/cairo-pattern.c:443
#9 0x00007ffff738feea in INT_cairo_pattern_destroy (pattern=0x5555557b98a0) at
/tmp/build-debs.brV892/build/src/cairo-pattern.c:1131
#10 0x000055555556950a in CairoOutputDev::drawImage (this=<optimized out>,
state=0x5555557bcd70, ref=0x7fffffffd960, str=0x5555557bb9a0, widthA=<optimized
out>,
heightA=<optimized out>, colorMap=0x5555558012b0, interpolate=false,
maskColors=0x0, inlineImg=false) at CairoOutputDev.cc:3265
#11 0x00007ffff7a618cd in Gfx::doImage (this=this@entry=0x5555557af5a0,
ref=ref@entry=0x7fffffffd960, str=0x5555557bb9a0,
inlineImg=inlineImg@entry=false) at Gfx.cc:4709
#12 0x00007ffff7a62ed9 in Gfx::opXObject (this=0x5555557af5a0, args=<optimized
out>, numArgs=<optimized out>) at Gfx.cc:4208
#13 0x00007ffff7a5cd79 in Gfx::go (this=this@entry=0x5555557af5a0,
topLevel=topLevel@entry=true) at Gfx.cc:763
#14 0x00007ffff7a5d18d in Gfx::display (this=this@entry=0x5555557af5a0,
obj=obj@entry=0x7fffffffdd40, topLevel=topLevel@entry=true) at Gfx.cc:729
#15 0x00007ffff7aa5128 in Page::displaySlice (this=0x5555557a93e0,
out=0x5555557a9d70, hDPI=72, vDPI=72, rotate=<optimized out>,
useMediaBox=<optimized out>,
crop=<optimized out>, sliceX=<optimized out>, sliceY=-1, sliceW=-1,
sliceH=-1, printing=true, abortCheckCbk=0x0, abortCheckCbkData=0x0,
annotDisplayDecideCbk=0x0,
annotDisplayDecideCbkData=0x0, copyXRef=false) at Page.cc:601
#16 0x000055555555fb61 in renderPage (output_h=842, output_w=595,
page_h=<optimized out>, page_w=<optimized out>, pg=1, cairoOut=0x5555557a9d70,
doc=0x5555557b0050)
at pdftocairo.cc:673
#17 main (argc=3, argv=<optimized out>) at pdftocairo.cc:1197
(gdb)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>