Bug 689272 - Error reading PostScript file: /undefined in --get--
Summary: Error reading PostScript file: /undefined in --get--
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Interpreter (show other bugs)
Version: master
Hardware: PC Linux
: P2 normal
Assignee: Alex Cherepanov
URL:
Keywords:
: 689287 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-12 10:45 UTC by Marcos H. Woehrmann
Modified: 2008-12-19 08:31 UTC (History)
1 user (show)

See Also:
Customer: 411
Word Size: ---


Attachments
Acrobat7_systemparams.pbm (36.34 KB, application/octet-stream)
2007-06-19 12:37 UTC, Ray Johnston
Details
CPSI_systemparams.png (67.85 KB, image/png)
2007-06-19 12:38 UTC, Ray Johnston
Details
Tek360_systemparams.png (320.60 KB, image/png)
2007-06-19 12:40 UTC, Ray Johnston
Details
patch (1.03 KB, patch)
2007-07-12 06:36 UTC, Alex Cherepanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2007-06-12 10:45:20 UTC
Customer reports and I've verified that Ghostscript produces an error,
"/undefined in --get--", when reading the attached PostScript file.  The command
line I used:

  bin/gs -sDEVICE=ppmraw -sOutputFile=test.ppm ./Example.ps

The error is the same with gs8.50 through gshead (r8044).

Adobe Photoshop and Mac OS X Preview both open the file without error.
Comment 1 Marcos H. Woehrmann 2007-06-12 10:45:47 UTC
Created attachment 3014 [details]
Example.ps
Comment 2 Alex Cherepanov 2007-06-12 14:12:56 UTC
The sample file includes the following fragment without a stopped context
or any other means to avoid errors.

currentsystemparams /MaxImageBuffer get 4194304 lt
  { << /MaxImageBuffer 4194304 >> setsystemparams
  } if
currentsystemparams /JobTimeout get 0 ne
  { << /JobTimeout 0 >> setsystemparams
  } if
currentuserparams /MaxSuperScreen get 4194304 lt
  { << /MaxSuperScreen 4194304 >> setuserparams
  } if

We don't have /MaxImageBuffer or /JobTimeout parameters.
Comment 3 Ray Johnston 2007-06-19 09:21:21 UTC
*** Bug 689287 has been marked as a duplicate of this bug. ***
Comment 4 Ray Johnston 2007-06-19 09:31:48 UTC
The problem is that the PPD used to make this file on the Mac with
the LaserWriter 8 driver appears to be flawed because it does not
protect some of the "Feature" setup by putting it in a 'stopped'
context as is customary with PPD options. The offending section is:

%%BeginFeature: *JobPatchFile 0
    currentsystemparams/MaxImageBuffer get 4194304 lt{
    << /MaxImageBuffer 4194304 >> setsystemparams}if
    currentsystemparams/JobTimeout get 0 ne{
    << /JobTimeout 0 >> setsystemparams}if
    currentuserparams/MaxSuperScreen get 4194304 lt{
    << /MaxSuperScreen 4194304 >> setuserparams}if
%%EndFeature

This gets an error on Ghostscript since we don't have the system
param "MaxImageBuffer", thus throwing an 'undefined' error.

I recommend that we investigate Adobe implementations and add any
systemparams that are 'standard' in Adobe RIP products and distiller.

Comment 5 Ray Johnston 2007-06-19 12:37:42 UTC
Created attachment 3041 [details]
Acrobat7_systemparams.pbm
Comment 6 Ray Johnston 2007-06-19 12:38:23 UTC
Created attachment 3042 [details]
CPSI_systemparams.png
Comment 7 Ray Johnston 2007-06-19 12:40:12 UTC
Created attachment 3043 [details]
Tek360_systemparams.png
Comment 8 Alex Cherepanov 2007-07-12 06:36:24 UTC
Created attachment 3181 [details]
patch

Add dummy system parameters for compatibility with Adobe products.
Comment 9 Alex Cherepanov 2007-07-12 06:38:04 UTC
The patch is committed as a rev. 8119.

There's no differences in Comparefiles collection. Cases 8-4-3, 27-4-1, 27-09-2
of the CET suite shows differences in the files that enumerate or test system
parameters. Cases 27-7c-2, 29-7c-4 depend on the directory enumeration
order in the page device processing. This is a bug in the page device code.