Summary: | Segfault in GS 9.26 with certain PDFs with -dLastPage=1 | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Bheeshmar Redheendran <bheeshmar> |
Component: | PDF Interpreter | Assignee: | Ken Sharp <ken.sharp> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | anis.moubarik, laurent |
Priority: | P4 | ||
Version: | master | ||
Hardware: | Macintosh | ||
OS: | MacOS X | ||
Customer: | Word Size: | --- | |
Attachments: | PDF which causes segfault in 9.26 |
Description
Bheeshmar Redheendran
2018-12-03 16:48:43 UTC
I have the same issue on multiple servers running ubuntu 16.04 or 18.04 since the 9.26 upgrade. In order to convert a PDF file in PNG I use the command: » convert "myfile.pdf[0]" test.png Which gives this error: convert-im6.q16: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -dFirstPage=1 -dLastPage=1 '-sOutputFile=/tmp/magick-11774WIkYdVETEs9I%d' '-f/tmp/magick-11774JZhknqCDhkN0' '-f/tmp/magick-11774twGtf-JFihri'' (-1) @ error/delegate.c/ExternalDelegateCommand/462. convert-im6.q16: no images defined `test.png' @ error/convert.c/ConvertImageCommand/3258. So I tried using ghostscript directly: » ghostscript -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=pngalpha -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r72x72 -dFirstPage=1 -dLastPage=1 '-sOutputFile=test.png' '-fmyfile.pdf' Which gives an error: GPL Ghostscript 9.26 (2018-11-20) Copyright (C) 2018 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 1. Page 1 [1] 10954 segmentation fault (core dumped) ghostscript -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 If I omit -dFirstPage=1 -dLastPage=1 it works properly: » ghostscript -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=pngalpha -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r72x72 '-sOutputFile=test.png' '-fmyfile.pdf' GPL Ghostscript 9.26 (2018-11-20) Copyright (C) 2018 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 2. Page 1 Page 2 Please note that it also affects imagemagick convert command and PHP readimage command. *** This bug has been marked as a duplicate of bug 700315 *** |