Postscript delegate failed - regression bug

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
jploski

Postscript delegate failed - regression bug

Post by jploski »

Short story: conversion of a PS to JPG (or other formats). ImageMagick-6.2.5 works, ImageMagick-6.3.5 and ImageMagick-6.4.2 fail with the infamous useless "Postscript delegate failed ...: No such file or directory" message.

Having both a working and a failing version available, I nailed it down to a difference in behavior of ImageMagick. This is not dependent on the version of Ghostscript (I tried both with 8.15.4 and with the newest 8.63). The working, older version of ImageMagick invokes gs twice, like that:

Code: Select all

gs -q -dBATCH -dSAFER -dMaxBitmap=500000000 -dNOPAUSE -dAlignToPixels=0 -sDEVICE=pnmraw -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -g612x792 -r72x72 -sOutputFile=/tmp/magick-XXEgyteI -f/tmp/magick-XXjKAqoW -f/tmp/magicpnVw4t
gs -q -dBATCH -dSAFER -dMaxBitmap=500000000 -dNOPAUSE -dAlignToPixels=0 -sDEVICE=pnmraw -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -g612x792 -r72x72 -sOutputFile=/tmp/magick-XXEgyteI -f/tmp/magick-XXjKAqoW -f/tmp/magicpnVw4t -c showpage
On the other hand, the failing, newer versions only make the first gs invocation and then terminate with an error message. However, this first invocation produces a zero-sized output file for some reason (regardless of the ImageMagick version used). Only the second gs produces the desired output.

It seems that it does not happen with all Postscript files. An example input file which does cause trouble can be downloaded from here: https://bi.offis.de/imagemagick_bug/frame_001.ps
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Postscript delegate failed - regression bug

Post by magick »

We can reproduce the problem with your example Postscript file. We will have a patch in the Subversion trunk by sometime tomorrow. Thanks.
rweaver

Re: Postscript delegate failed - regression bug

Post by rweaver »

I have been experiencing the same problem. How can I obtain and install the patch?
-R
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Postscript delegate failed - regression bug

Post by magick »

The patch is available now in the Subversion trunk. Grab the latest coders/ps.c source file.
rweaver

Re: Postscript delegate failed - regression bug

Post by rweaver »

Can you help me understand how to implement the fix...I need to grab the coders/ps.c file from the subversion trunk and then rebuild Imagemagick on my local machines (I have both linux and windows). Also, I will be notifying the administrator of our Unix machines that they need to update their latest version of Imagemagick by downloading the patch and giving details of how to install the patch as well. (We have at least 4 machines that are running the newer version with the bug). Are there any special details I should be passing along?

-R
jploski

Re: Postscript delegate failed - regression bug

Post by jploski »

magick wrote:The patch is available now in the Subversion trunk. Grab the latest coders/ps.c source file.
I checked out and installed the development version. The bug is fixed. Thanks!
Post Reply