Bug 690325 - Regression: Several PostScript CET files hang pdfwrite
Summary: Regression: Several PostScript CET files hang pdfwrite
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: master
Hardware: Macintosh MacOS X
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-11 17:10 UTC by Marcos H. Woehrmann
Modified: 2010-08-06 13:48 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2009-03-11 17:10:22 UTC
Several of the PostScript CET files cause Ghostscript to hang when using -sDEVICE=pdfwrite.  This 
occurs with head (r9545) and older versions.

The command line I'm using for testing:

  bin/gs -sDEVICE=pdfwrite -o 13-10.PS.pdf ./13-10.PS

Including gs_cet.ps before the file does not change anything, nor does using "- <". 

This is the list of files that cause gs to hang:
13-10.PS
13-13.PS
13-15.PS
13-24.PS

This file does not cause gs to hang, but generates an invalid PDF file:
13-18.PS
Comment 1 Marcos H. Woehrmann 2009-03-11 17:10:54 UTC
Created attachment 4836 [details]
13-10.PS
Comment 2 Marcos H. Woehrmann 2009-08-05 12:28:55 UTC
I've disabled the files listed in comment #0 from the nightly regression by
renaming them in the ps3cet repository; please re-enable them when this issue is
fixed.
Comment 3 Ray Johnston 2009-08-05 12:48:37 UTC
Note that several CET file read from stdin, thus they MUST be run with input
from stdin and with -dJOBSERVER as with:

bin/gs -sDEVICE=pdfwrite -o 13-10.PS.pdf -dJOBSERVER - < ./13-10.PS

I didn't look at these files, but do know that some will hang waiting for stdin.
Comment 4 Marcos H. Woehrmann 2009-11-09 10:15:40 UTC
Comment #3 is not correct for two reasons:

1.  The files work with -sDEVICE=ppmraw

2.  Specifying -dJOBSERVER and redirecting from stdin still causes the files to hang with -
sDEVICE=pdfwrite



Comment 5 Ken Sharp 2010-08-05 15:28:43 UTC
I have a local fix for 13-10.ps but it seems to cause a serious XPS regression, I need to look into it.

13-13.ps is fixed locally as well, as far as a 'hang' goes. It produces a file with a broken font though.

One of those changes also fixes 13-15.ps, but like 13-13.ps it produces a file with a broken font.

With both these changes in place 13-24.ps now works fully correctly as apparently, does 13-18.ps.
Comment 6 Ken Sharp 2010-08-06 13:48:03 UTC
(In reply to comment #5)
> I have a local fix for 13-10.ps but it seems to cause a serious XPS regression,
> I need to look into it.
> 
> 13-13.ps is fixed locally as well, as far as a 'hang' goes. It produces a file
> with a broken font though.
> 
> One of those changes also fixes 13-15.ps, but like 13-13.ps it produces a file
> with a broken font.
> 
> With both these changes in place 13-24.ps now works fully correctly as
> apparently, does 13-18.ps.

revisions 11608 and 11609 fix the 'hanging' problem with these files. 

The files which error out due to invalid Type 3 fonts are a specific QL error test, it creates fonts with a FontMatrix of [0 0 0 0 0 0] and traps the resulting error with 'stopped'.

pdfwrite maintains the font as created, and writes it into the output file. There is no equivalent of 'stopped' in PDF, so the PDF file provokes an error.

This seems to me to be correct behaviour, the original PostScript file was broken (and would have produced an error if it wasn't being specifically trapped) so the output PDF file has the same error. I don't propose to try and address this.