Comment 12 for bug 1845286

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I succeeded to reproduce the crash on the command line. For the tests shown here I am in the source directory of the current cups-filters, having run "autogen.sh", "./configure", and "make" already.

After downloading the attached PPD file (comment #11) and the attached PDF file (comment #7) I have passed the input PDF file through pdftopdf first, with the following command line:

cat Lauf\ gegen\ Krebs\ 2019.pdf | FINAL_CONTENT_TYPE=application/pdf PPD=hp_officejet_pro_8620_794b2d_.ppd DEVICE_URI=implicitclass://hp_officejet_pro_8620_794b2d_/ PRINTER=hp_officejet_pro_8620_794b2d_ ./pdftopdf 1 1 1 1 "print-content-optimize=auto print-rendering-intent=auto ColorModel=DeviceGray Duplex=DuplexNoTumble MediaType=Stationery number-up=1 PageSize=A4 print-scaling=auto noCollate cupsPrintQuality=4 job-uuid=urn:uuid:239f990b-2e91-324e-43dc-529fedd50b88 cups-browsed job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1569426096 time-at-processing=1569426096 print-quality=4 output-format=apple-raster Resolution=300dpi media-class=pwg page-logging=on" > out.pdf

I am attaching out.pdf. Note that the duplex setting makes pdftopdf add a blank page to the beginning of the file.

Now I allow core files to be written with

ulimit -c unlimited

and feed out.pdf through pdftoraster using the following command line:

cat out.pdf | FINAL_CONTENT_TYPE=application/pdf PPD=hp_officejet_pro_8620_794b2d_.ppd DEVICE_URI=implicitclass://hp_officejet_pro_8620_794b2d_/ PRINTER=hp_officejet_pro_8620_794b2d_ ./pdftoraster 1 1 1 1 "print-content-optimize=auto print-rendering-intent=auto ColorModel=DeviceGray Duplex=DuplexNoTumble MediaType=Stationery number-up=1 PageSize=A4 print-scaling=auto noCollate cupsPrintQuality=4 job-uuid=urn:uuid:239f990b-2e91-324e-43dc-529fedd50b88 cups-browsed job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1569426096 time-at-processing=1569426096 print-quality=4 output-format=apple-raster Resolution=300dpi media-class=pwg page-logging=on" > out.ras

I open the resulting core file with gdb:

gdb -c core .libs/pdftoraster

Running the "bt" command within gdb gives the following backtrace:

#0 0x00005585f7910b9b in convert8to16 (
    src=0x7f7bb17aba85 <error: Cannot access memory at address 0x7f7bb17aba85>, dst=0x7ffc890ea660 "", x=<optimized out>, y=<optimized out>)
    at filter/pdftoraster.cxx:1012
#1 0x00005585f7910eb9 in convertLineChunkedSwap (
    src=src@entry=0x7f7bb17aa7c1 <error: Cannot access memory at address 0x7f7bb17aa7c1>, dst=dst@entry=0x5585f955a520 '\377' <repeats 200 times>...,
    row=row@entry=6859, plane=plane@entry=0, pixels=4805, size=<optimized out>)
    at filter/pdftoraster.cxx:1170
#2 0x00005585f790f757 in writePageImage (pageNo=2, doc=0x5585f954df10,
    raster=0x5585f954dff0) at filter/pdftoraster.cxx:1626
#3 outPage (raster=<optimized out>, pageNo=<optimized out>,
    doc=<optimized out>) at filter/pdftoraster.cxx:1884
#4 main (argc=<optimized out>, argv=<optimized out>)
    at filter/pdftoraster.cxx:2121