Bug 447551 - RHEL4: ghostscript error: /undefinedresource Default, typo in gs_res.ps
RHEL4: ghostscript error: /undefinedresource Default, typo in gs_res.ps
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: ghostscript (Show other bugs)
4.0
All Linux
low Severity low
: rc
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-20 10:33 EDT by Issue Tracker
Modified: 2010-10-22 21:11 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
* gs_res.ps, one of the library files that Ghostscript uses to handle CRDs (Color Rendering Dictionaries), contained a flaw that prevented Ghostscript from rendering certain PDFs. This updated package contains a corrected version of gs_res.ps that will not prevent Ghostscript from rendering these PDFs.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-18 16:03:57 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)
patched srpm (11.38 MB, application/x-rpm)
2008-05-23 11:00 EDT, James M. Leddy
no flags Details

  None (edit)
Description Issue Tracker 2008-05-20 10:33:35 EDT
Escalated to Bugzilla from IssueTracker
Comment 1 Issue Tracker 2008-05-20 10:33:37 EDT
Description of problem:

We have come across a problem where certain PDFs would not print at all for a user with a nonstandard printer (foo2zjs driver), ghostscript backtrace is something (since recovered only from strace) like

Error: /undefinedresource
 in --findresource--
Operand stack:
   DefaultColorRendering   ColorRendering   DefaultColorRendering

 This has been traced to a (known) error in one of ghostscript's ps files for handling CRDs (Color Rendering Dictionary), and the issue could affect other setups, e.g. the "-dUseCIEColor" setting (apparently recommended for some devices to improve color management).

"Upstream" one-line patch/commit is at 
http://www.ghostscript.com/pipermail/gs-code-review/2003-February/003645.html

--- /usr/share/ghostscript/7.07/lib/gs_res.ps.orig	2008-05-08 21:31:15.000000000 +0200
+++ /usr/share/ghostscript/7.07/lib/gs_res.ps	2008-05-08 21:32:06.000000000 +0200
@@ -883,7 +883,7 @@
   systemdict /ColorRendering .knownget {
     /ColorRendering exch /ProcSet defineresource pop
     systemdict /ColorRendering undef
-    /Default currentcolorrendering /ColorRendering defineresource pop
+    /DefaultColorRendering currentcolorrendering /ColorRendering defineresource pop
   } if
 	% ColorSpace resources
   systemdict /CIEsRGB .knownget {


Issue is fixed in RHEL5, by the way.
Regards
Jan
This event sent from IssueTracker by jleddy  [Support Engineering Group]
 issue 179392
Comment 2 Issue Tracker 2008-05-20 10:33:38 EDT
1. Provide time and date of the problem
Problem can be reproduced easily.

2. Provide clear and concise problem description as it is understood at
the time of escalation

We have come across a problem where certain PDFs would not print at all
for a user with a nonstandard printer (foo2zjs driver), ghostscript
backtrace is something (since recovered only from strace) like

Error: /undefinedresource
in --findresource--
Operand stack:
  DefaultColorRendering   ColorRendering   DefaultColorRendering

This has been traced to a (known) error in one of ghostscript's ps files
for handling CRDs (Color Rendering Dictionary), and the issue could affect
other setups, e.g. the "-dUseCIEColor" setting (apparently recommended
for some devices to improve color management).

"Upstream" one-line patch/commit is at
http://www.ghostscript.com/pipermail/gs-code-review/2003-February/003645.html

--- /usr/share/ghostscript/7.07/lib/gs_res.ps.orig 2008-05-08
21:31:15.000000000 +0200
+++ /usr/share/ghostscript/7.07/lib/gs_res.ps 2008-05-08
21:32:06.000000000 +0200
@@ -883,7 +883,7 @@
  systemdict /ColorRendering .knownget {
    /ColorRendering exch /ProcSet defineresource pop
    systemdict /ColorRendering undef
-    /Default currentcolorrendering /ColorRendering defineresource pop
+    /DefaultColorRendering currentcolorrendering /ColorRendering
defineresource pop
  } if
% ColorSpace resources
  systemdict /CIEsRGB .knownget {


Issue is fixed in RHEL5.

* Observed behavior
PDF will not print.
* Desired behavior
PDF should print.

3. State specific action requested of SEG
Please confirm the bug and escalate to bugzilla.


4. State whether or not a defect in the product is suspected
Defect suspected. Reported upstream at
http://bugs.ghostscript.com/show_bug.cgi?id=667351

5. If there is a proposed patch, make sure it is in unified diff format
(diff -pruN)
See summary.

1. State other actions already taken in working the problem:
Upstream bug report discovered.

2. Attach sosreport
Sosreport from local test report attached.

3. Attach other supporting data
Test ps file attached to recreate problem.

4. Provide issue repro information:
Reproducer (using the attached PS file):

cat /tmp/test-cups.ps| /usr/bin/gs -q -dBATCH -dSAFER -dQUIET -dNOPAUSE
-sPAPERSIZE=a4  -g9920x7016 -r1200x600 -sDEVICE=pbmraw -dCOLORSCREEN
-sOutputFile=/tmp/foo.pbm -

Gives:
Error: /undefinedresource in --findresource--
Operand stack:
  DefaultColorRendering   ColorRendering   DefaultColorRendering
Execution stack:
[..]

The attached PostScript is result of Adobe acroread-8, on
http://www.fernuni.de/imperia/md/content/studium/infomaterial/h3a.pdf. The
PostScript file may have other issues, ghostview later complains about some
fonts..


5. List any known hot-fix packages on the system
-

6. List any customer applied changes from the last 30 days
-



Issue escalated to Support Engineering Group by: sprabhu.
Internal Status set to 'Waiting on SEG'

This event sent from IssueTracker by jleddy  [Support Engineering Group]
 issue 179392
Comment 3 James M. Leddy 2008-05-20 12:49:35 EDT
provided patch failed to fix the problem. 

$ cat test-cups.ps| /usr/bin/gs -q -dBATCH -dSAFER -dQUIET -dNOPAUSE
-sPAPERSIZE=a4  -g9920x7016 -r1200x600 -sDEVICE=pbmraw -dCOLORSCREEN
-sOutputFile=/tmp/foo.pbm -
Error: /undefined in VTOJAN+Frutiger-Light*1
Operand stack:

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:1068/1123(ro)(G)--   --dict:1/20(G)--   --dict:99/200(L)--  
--dict:57/75(L)--   --dict:212/315(L)--   --dict:72/107(L)--   --dict:0/10(G)--
  --dict:0/10(L)--   --dict:478/587(G)--   --dict:56/71(L)--
Current allocation mode is local
Last OS error: 2
GNU Ghostscript 7.07: Unrecoverable error, exit code 1
Comment 4 Issue Tracker 2008-05-20 14:31:47 EDT
James,

Those appear to look like problems related to fonts which was described in
the reproducer.

--
The PostScript file may have other issues, ghostview later complains about
some fonts
..

Sachin Prabhu


This event sent from IssueTracker by sprabhu 
 issue 179392
Comment 6 James M. Leddy 2008-05-21 17:32:18 EDT
Sachin,

I tried the file in fedora and it worked in fedora 8.  However, I googled
frutiger_light and came up with a typeface, so indeed that probably is the issue
they mean.  

I'm assuming they went ahead and compiled with this patch themselves, is that
correct?
Comment 7 Issue Tracker 2008-05-22 08:49:23 EDT
James,

Yes. The patch has been used by the customer and is working for them. This
fix is included in RHEL 5 where the issue is not seen.

Sachin Prabhu


This event sent from IssueTracker by sprabhu 
 issue 179392
Comment 8 James M. Leddy 2008-05-23 11:00:52 EDT
Created attachment 306508 [details]
patched srpm
Comment 9 RHEL Product and Program Management 2008-09-05 13:04:46 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 13 Ruediger Landmann 2009-01-14 01:45:48 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:
* gs_res.ps, one of the library files that Ghostscript uses to handle CRDs (Color Rendering Dictionaries), contained a flaw that prevented Ghostscript from rendering certain PDFs. This updated package contains a corrected version of gs_res.ps that will not prevent Ghostscript from rendering these PDFs.
Comment 15 errata-xmlrpc 2009-05-18 16:03:57 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.