Bug 690683 - two ps files are giving errors when using GS 8.64, but are successfully transformed when using GS 8.54
Summary: two ps files are giving errors when using GS 8.64, but are successfully trans...
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Interpreter (show other bugs)
Version: 8.64
Hardware: Other AIX
: P4 normal
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-04 01:36 UTC by Horiana Costea
Modified: 2011-09-18 21:46 UTC (History)
0 users

See Also:
Customer: 460
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Horiana Costea 2009-08-04 01:36:21 UTC
There is a ps file - PocketFin2 - that used to work with GhostScript 8.54, but 
with GhostScript 8.64 is crashing with the following error:
Error: /stackunderflow in --astore--

Also, another ps file - tcpip.ps - also used to work with GhostScript 8.54,
and now with GhostScript 8.64 is giving the following error:
Error: /typecheck in --setcachedevice--

Could you please take a look on these two files and let us know what you'll 
find?

Thanks
Comment 1 Horiana Costea 2009-08-04 01:44:59 UTC
Created attachment 5269 [details]
PocketFin2.ps
Comment 2 Horiana Costea 2009-08-04 01:45:19 UTC
Created attachment 5270 [details]
tcpip.ps
Comment 3 Alex Cherepanov 2009-08-04 05:12:38 UTC
The 2nd file, tcpip.ps expects that /FontBBox attribute is an executable array.
There's no such requirement in the Type 1 font spec and current version of
Ghostscript comes with the fonts that have literal /FontBBox.

I see 3 possible ways to fix the problem.
1. change our fonts
2. write /IdiomSet resource to patch the source automatically
3. redefine setcachedevice operator as:
  /setcachedevice { dup type /arraytype eq { aload pop } if setcachedevice
  } bind def
Comment 4 Alex Cherepanov 2009-08-04 05:44:38 UTC
The 1st file also fails because of literal /FontBBox .

Possible fixes are:
1. change our fonts
2. write a different /IdiomSet resource

I think we have to change the fonts. BTW, the files run fine on Distiller,
which means that Adobe has executable /FontBBox.
Comment 5 Masaki Ushizaka 2009-08-04 05:54:48 UTC
This is from Red Book Table 5.3:
In many Type 1 fonts, the FontBBox array is executable, though there is no good reason for this to be so. 
Programs that access FontBBox sould invoke an explicit get or load to avoid unintended execution.

I thought Adobe's type 1 font always had executable FontBBox.
Comment 6 Alex Cherepanov 2009-08-13 17:39:16 UTC
Change literal /FontBBox array into executable one for better compatibility
with legacy software. QuarkXPress 3.31, idraw, and some versions of dvips
assume that /FontBBox is executable.

New fonts that that have '{}' instead of '[]' around FontBBox values
have been committed as a rev. 9990.
Regression testing shows no differences.

A test file that requires executable FontBBox fill be added to the public
test suite.
Comment 7 Horiana Costea 2009-08-14 04:46:05 UTC
Is this patch applicable to GS 8.64 too? Since the patch I need is for GS 8.64.

Thanks
Comment 8 Alex Cherepanov 2009-08-14 04:59:52 UTC
Yes, updated fonts can be used in v. 8.64.
Comment 9 Horiana Costea 2009-08-20 00:00:10 UTC
Thanks, the fix worked.
Comment 10 Marcos H. Woehrmann 2011-09-18 21:46:19 UTC
Changing customer bugs that have been resolved more than a year ago to closed.