Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 162897

Summary: ps2pdf Unrecoverable error
Product: [Fedora] Fedora Reporter: John Reiser <jreiser>
Component: ghostscriptAssignee: Tim Waugh <twaugh>
Status: CLOSED NOTABUG QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-11 16:00:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
PostScript input file 1.6KB none

Description John Reiser 2005-07-11 14:59:22 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
ps2pdf fails to convert this simple input which produces one page with 4 copies of the C,D scales of a sliderule.

Version-Release number of selected component (if applicable):
ghostscript-7.07-40

How reproducible:
Always

Steps to Reproduce:
1. ps2pdf --verbose sliderule.ps >/tmp/foo.pdf
2.
3.
  

Actual Results:  $ ps2pdf --verbose sliderule.ps >/tmp/foo.pdf
GNU Ghostscript 7.07: Unrecoverable error, exit code 1
$ 


Expected Results:  Generate /tmp/foo.pdf

Additional info:

A careful reading of "man ps2pdf" suggests that the commandline syntax should be
"ps2pdf sliderule.ps - >/tmp/foo.pdf".  If so, then the actual behavior "Unrecoverable error" is a gross usability bug because the message is not related to the error, and gives the user no clue as to what to change in order to obtain the obviously-desired functionality.  A message such as "ps2pdf requires exactly two [non-optional] commandline arguments" is required.

Comment 1 John Reiser 2005-07-11 15:00:52 UTC
Created attachment 116604 [details]
PostScript input file 1.6KB

Comment 2 Tim Waugh 2005-07-11 15:15:36 UTC
There is no such option '--verbose'.

Comment 3 John Reiser 2005-07-11 15:51:35 UTC
Yes there is such an option '--verbose'.  This transcript shows that --verbose
exists, and its use alters the behavior of ps2pdf, mostly in an expected way. 
--verbose gives a diagnostic message on stderr instead of just an exit status
code.  --verbose also changes the exit code from fail [1] to success [0], while
the usually-expected behavior would be to leave the exit code the same.
-----
$ ps2pdf sliderule.ps >/tmp/foo.pdf
$ echo $?
1  ## ps2pdf failed
$ ps2pdf --verbose sliderule.ps >/tmp/foo.pdf
GNU Ghostscript 7.07: Unrecoverable error, exit code 1
$ echo $?
0  ## ps2pdf "succeeded"
$ ls -l /tmp/foo.pdf
-rw-rw-r--  1 jreiser jreiser 50 Jul 11 08:40 /tmp/foo.pdf
$ cat /tmp/foo.pdf   ## intended output is ghostscript error traceback
Copyright (C) 2003 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefinedfilename in (-q)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--  
--nostringval--   false   1   %stopped_push   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1058/1123(ro)(G)--   --dict:0/20(G)--   --dict:69/200(L)--
Current allocation mode is local
Last OS error: 2
$ 
-----

Please re-open this bug.

Comment 4 Tim Waugh 2005-07-11 16:00:40 UTC
No, there is no such option as '--verbose'.  You are using ps2pdf incorrectly.