Bug 418051 - ps2pdf fails with some ps files
ps2pdf fails with some ps files
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: ghostscript (Show other bugs)
4.8
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks: 465960
  Show dependency treegraph
 
Reported: 2007-12-10 08:34 EST by Jose Plans
Modified: 2010-10-22 17:04 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
* The ps2pdf program could fail with an invalidfont error in some circumstances. This was due to the package being built with strict variable aliasing optimizations in place. The version of ps2pdf provided with this advisory is built without these optimizations and does not fail under these circumstances.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-18 16:03:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test case (17.81 KB, patch)
2007-12-10 08:34 EST, Jose Plans
no flags Details | Diff

  None (edit)
Description Jose Plans 2007-12-10 08:34:14 EST
Description of problem:

When using ps2pdf to convert ps files generated with Oracle Toolkit 2 for Motif
6.0.8.24.0 to pdf, this one fails with
the following error:

---
Error: /invalidfont in --show--
Operand stack:
  --nostringval--   --nostringval--
Execution stack:
  %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--
  2   %stopped_push   --nostringval--   --nostringval--   --nostringval--  
false   1   %stopped_push   1   3   %oparray_pop   1   3   %oparray_pop   1   3
  %oparray_pop   1   3   %oparray_pop   .runexec2   --nostringval--  
--nostringval--   --nostringval--   2   %stopped_push   --nostringval--  
--nostringval--   --nostringval--
Dictionary stack:
  --dict:1063/1123(ro)(G)--   --dict:0/20(G)--   --dict:198/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 57249
GNU Ghostscript 7.07: Unrecoverable error, exit code 1
---

This instruction show fails if used with embedded fonts defined within the
postcript document and when trying to show a
character non-defined. The failing postscript instruction is then "()SH" being
SH defined to "show".

Two workarounds have been provided:

cat file.ps | sed -e 's/()SH//' > new.file.ps

or

cat file.ps | sed -e 's/()SH/save ()SH/' > new.file.ps

Also this seems to work correctly on version >8 of ghostscript.


Version-Release number of selected component (if applicable):
7.0.7

How reproducible:
Always.

Steps to Reproduce:
1. Use Oracle Toolkit 2 -or- this document attached.
2. run ps2pdf against the ps file
  
Actual results:
---
Error: /invalidfont in --show--
Operand stack:
  --nostringval--   --nostringval--
Execution stack:
  %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--
  2   %stopped_push   --nostringval--   --nostringval--   --nostringval--  
false   1   %stopped_push   1   3   %oparray_pop   1   3   %oparray_pop   1   3
  %oparray_pop   1   3   %oparray_pop   .runexec2   --nostringval--  
--nostringval--   --nostringval--   2   %stopped_push   --nostringval--  
--nostringval--   --nostringval--
Dictionary stack:
  --dict:1063/1123(ro)(G)--   --dict:0/20(G)--   --dict:198/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 57249
GNU Ghostscript 7.07: Unrecoverable error, exit code 1
---

Expected results:
After a while, prompt is back and we can print.

Additional info:
I couldn't get any deeper. There are many theories I followed in the font stack
code but without the expertise I cannot
decide whether this is a bug on the application or ghostscript or if a change
upstream made this disappear.

Attached is a test case that reproduces the issue.
Let me know if you need more informations.
Comment 1 Jose Plans 2007-12-10 08:34:15 EST
Created attachment 282761 [details]
test case
Comment 3 RHEL Product and Program Management 2008-09-05 13:07:27 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 14 Ruediger Landmann 2009-01-14 01:45:04 EST
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
* The ps2pdf program could fail with an invalidfont error in some circumstances.  This was due to the package being built with strict variable aliasing optimizations in place. The version of ps2pdf provided with this advisory is built without these optimizations and does not fail under these circumstances.
Comment 15 errata-xmlrpc 2009-05-18 16:03:47 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0949.html

Note You need to log in before you can comment on or make changes to this bug.