Segmentation Fault using pdftocairo to convert a single page to png
Unfortunately I cannot share the exact PDF for this, my apologies. Here is the bt from the core dump:
Reading symbols from /usr/bin/pdftocairo...Reading symbols from /usr/lib/debug/usr/bin/pdftocairo.debug...done.
done.
[New LWP 23631]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `pdftocairo -png -f 1 -l 1 -singlefile input/segfault_original.pdf output/segfau'.
Program terminated with signal 11, Segmentation fault.
#0 JPXStream::init (this=0x13234c0) at JPEG2000Stream.cc:101
101 r += sgndcorr;
(gdb) bt
#0 JPXStream::init (this=0x13234c0) at JPEG2000Stream.cc:101
#1 0x00007f117c44b7ee in JPXStream::getImageParams (this=0x13234c0, bitsPerComponent=0x7ffe02e07828, csMode=0x7ffe02e0782c)
at JPEG2000Stream.cc:191
#2 0x00007f117c493bc6 in Gfx::doImage (this=this@entry=0x12baf00, ref=ref@entry=0x7ffe02e07a20, str=0x13234c0, inlineImg=inlineImg@entry=false)
at Gfx.cc:4248
#3 0x00007f117c495ac9 in Gfx::opXObject (this=0x12baf00, args=<optimized out>, numArgs=<optimized out>) at Gfx.cc:4180
#4 0x00007f117c48fb41 in Gfx::go (this=this@entry=0x12baf00, topLevel=topLevel@entry=true) at Gfx.cc:763
#5 0x00007f117c48ff9d in Gfx::display (this=this@entry=0x12baf00, obj=obj@entry=0x7ffe02e07e40, topLevel=topLevel@entry=true) at Gfx.cc:729
#6 0x00007f117c4d7395 in Page::displaySlice (this=0x12b9f10, out=0x12a8100, out@entry=0x4052000000000000, hDPI=72,
hDPI@entry=4.9406564584124654e-324, vDPI=72, vDPI@entry=9.6617501438130809e-317, rotate=rotate@entry=0, useMediaBox=true,
useMediaBox@entry=8, crop=crop@entry=false, sliceX=sliceX@entry=0, sliceY=-1, sliceW=-1, sliceH=-1, printing=false, abortCheckCbk=0x0,
abortCheckCbkData=0x0, annotDisplayDecideCbk=0x0, annotDisplayDecideCbkData=0x0, copyXRef=false) at Page.cc:585
#7 0x00007f117c4deaa9 in PDFDoc::displayPageSlice (this=this@entry=0x12a62c0, out=0x4052000000000000, out@entry=0x12a8100, page=-696495114,
page@entry=1, hDPI=4.9406564584124654e-324, vDPI=9.6617501438130809e-317, rotate=rotate@entry=0, useMediaBox=<optimized out>,
crop=crop@entry=false, printing=255, sliceX=sliceX@entry=-1, sliceY=sliceY@entry=-1, sliceW=0, sliceW@entry=-1, sliceH=0, sliceH@entry=-1,
abortCheckCbk=abortCheckCbk@entry=0x0, abortCheckCbkData=abortCheckCbkData@entry=0x0, annotDisplayDecideCbk=annotDisplayDecideCbk@entry=0x0,
annotDisplayDecideCbkData=annotDisplayDecideCbkData@entry=0x0, copyXRef=copyXRef@entry=false) at PDFDoc.cc:503
#8 0x00000000004086dc in renderPage (output_h=1155, output_w=893, page_h=<optimized out>, page_w=<optimized out>, pg=1, cairoOut=0x12a8100,
doc=0x12a62c0) at pdftocairo.cc:588
#9 main (argc=3, argv=<optimized out>) at pdftocairo.cc:1056
OS: Centos 7
command: pdftocairo -png -f 1 -l 1 -singlefile input/segfault_original.pdf output/segfault.png
What I find peculiar from the stack trace is the reference to JPEG and then the line in question, on the source I found on https://fossies.org/linux/poppler/utils/pdftocairo.cc seems to indicate eps.
Are you able to point me in the right direction to identify the cause and fix?
Thanks