gs 9.06 segfaults when converting to png, bmp, tiff, etc.

Bug #1050602 reported by Jeremy Bicha on 2012-09-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GS-GPL
Fix Released
Critical
ghostscript (Ubuntu)
High
Unassigned

Bug Description

Using gs to convert a PDF to png works with gs 9.05, but not with 9.06.

Works
https://launchpad.net/ubuntu/+source/ghostscript/9.05~dfsg-6ubuntu4
=====
gs -sDEVICE=pngalpha -o command-line-1012.png command-line-101.pdf
GPL Ghostscript 9.05 (2012-02-08)
Copyright (C) 2010 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

Segfaults
https://launchpad.net/ubuntu/+source/ghostscript/9.06~dfsg~20120802-0ubuntu2 and newer
=========
gs -sDEVICE=pngalpha -o command-line-1012.png command-line-101.pdf
GPL Ghostscript Release Candidate 1 9.06 (2012-07-31)
Copyright (C) 2012 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
Segmentation fault

Original bug description
========================
Using imagemagick to convert PDFs doesn't work in Quantal, but it does in Precise.

$ convert command-line-101.pdf command-line-101.jpg
convert.im6: `%s' (%d) "gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=/tmp/magick-uaQSxHzp--0000001" "-f/tmp/magick-jxmo1che" "-f/tmp/magick-xjqLrMY2" @ error/utility.c/SystemCommand/1890.
convert.im6: Postscript delegate failed `command-line-101.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/677.
convert.im6: no images defined `command-line-101.jpg' @ error/convert.c/ConvertImageCommand/3044.
---
ApportVersion: 2.5.2-0ubuntu4
Architecture: amd64
CupsErrorLog:
 E [20/Sep/2012:20:26:48 -0400] [cups-driverd] Bad driver information file "/usr/share/cups/drv/cupsfilters.drv"!
 E [20/Sep/2012:20:30:15 -0400] [cups-driverd] Bad driver information file "/usr/share/cups/drv/cupsfilters.drv"!
 E [20/Sep/2012:20:41:55 -0400] [cups-driverd] Bad driver information file "/usr/share/cups/drv/cupsfilters.drv"!
DistroRelease: Ubuntu 12.10
Lpstat: Error: command ['lpstat', '-v'] failed with exit code 1: lpstat: No destinations added.
MachineType: TOSHIBA Satellite L745
Package: ghostscript 9.05~dfsg-6ubuntu4
PackageArchitecture: amd64
Papersize: letter
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.5.0-15-generic root=UUID=da074346-bf87-4cf5-a9ec-8589cb501c4e ro quiet splash usbcore.autosuspend=-1 vt.handoff=7
ProcVersionSignature: Ubuntu 3.5.0-15.22-generic 3.5.4
Tags: quantal running-unity
Uname: Linux 3.5.0-15-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip libvirtd lpadmin plugdev sambashare sbuild sudo
dmi.bios.date: 06/26/2012
dmi.bios.vendor: INSYDE
dmi.bios.version: 2.60
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: Base Board Product Name
dmi.board.vendor: Intel Corp.
dmi.board.version: Base Board Version
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: OEM Chassis Manufacturer
dmi.chassis.version: OEM Chassis Version
dmi.modalias: dmi:bvnINSYDE:bvr2.60:bd06/26/2012:svnTOSHIBA:pnSatelliteL745:pvrPSK0YU-05R02G:rvnIntelCorp.:rnBaseBoardProductName:rvrBaseBoardVersion:cvnOEMChassisManufacturer:ct10:cvrOEMChassisVersion:
dmi.product.name: Satellite L745
dmi.product.version: PSK0YU-05R02G
dmi.sys.vendor: TOSHIBA

run

gs -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=/tmp/magick-uaQSxHzp--0000001"
command-line-101.pdf

and report the error.

It is a gs error not an imagemagick problem

Jeremy Bicha (jbicha) on 2012-09-21
description: updated
summary: - PDF convert
+ Using imagemagick for PDF converting fails with gs 9.06

apport information

affects: imagemagick (Ubuntu) → ghostscript (Ubuntu)
description: updated
tags: added: apport-collected running-unity
description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

summary: - Using imagemagick for PDF converting fails with gs 9.06
+ gs 9.06 fails to convert to png

apport information

Jeremy Bicha (jbicha) wrote :

I also tried with jpg, bmp, psd, tiff by substituting different devices listed at http://www.ghostscript.com/doc/9.06/Devices.htm

All failed with gs 9.06 but work with gs 9.05. It looks like we ought to revert to gs 9.05 unless we can figure this out.

summary: - gs 9.06 fails to convert to png
+ gs 9.06 segfaults when converting to png, bmp, tiff, etc.
tags: added: rls-mgr-q-incoming

Can you please attach command-line-101.pdf. Thanks.

Changed in ghostscript (Ubuntu):
status: New → Incomplete
Jeremy Bicha (jbicha) wrote :

Oh, I see. gs 9.06 works fine with some PDFs, just not the ones I was trying to convert. I guess that explains why this bug wasn't reported sooner.

Jerem

Jeremy, thank you very much, I can reproduce the bug now. I will forward it upstream and them we will probably get a patch in some days.

Changed in ghostscript (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → High
milestone: none → ubuntu-12.10

Problem is already fixed upstream, we will apply the patch to the next Ghostscript package in Quantal.

Changed in ghostscript (Ubuntu):
status: Confirmed → Triaged

Fixed package committed to Quantal and waiting for approval.

Changed in ghostscript (Ubuntu):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 9.06~dfsg-0ubuntu3

---------------
ghostscript (9.06~dfsg-0ubuntu3) quantal; urgency=low

  * debian/patches/020120921-d527ead-fix-segfault-on-pdf-to-image-conversion.patch:
    Fixed crash on conversion from PDF to image formats like PNG, JPG, ...
    (LP: #1050602).
 -- Till Kamppeter <email address hidden> Fri, 21 Sep 2012 17:22:27 +0200

Changed in ghostscript (Ubuntu):
status: Fix Committed → Fix Released
Changed in gs-gpl:
importance: Unknown → Critical
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.