Bug 690071 - Error reading PDF file: /typecheck in --run--
Summary: Error reading PDF file: /typecheck in --run--
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: master
Hardware: Macintosh MacOS X
: P2 normal
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-14 19:13 UTC by Marcos H. Woehrmann
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer: 384
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2008-09-14 19:13:31 UTC
The attached PDF file gives a typecheck in run error when opened with gshead (r9086), gs8.54, os 
gs8.63.  Acrobat 8.0 and Apple Preview open this file without problem.

The command line I'm using:

  bin/gs -sDEVICE=tiff24nc -o test.tif ./3979782.PDF

The output from PDFDEBUG:

marcos@imac:[17]% gsheadtiff -dPDFDEBUG 3979782.PDF
GPL Ghostscript SVN PRE-RELEASE 8.64 (2008-08-02)
Copyright (C) 2008 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
   **** Warning: File has a corrupted %%EOF marker, or garbage after %%EOF.
<<
/Linearized 1 /O 6 /H [
593 152 ]
/L 6927 /E 5491 /N 1 /T 6730 >>
   **** Warning:  An error occurred while reading an XREF table.
   **** The file has been damaged.  This may have been caused
   **** by a problem while converting or transfering the file.
   **** Ghostscript will attempt to recover the data.
<<
/Size 13 /Info 2 0 R
/Root 5 0 R
/Prev 6721 /ID [
(\004p'\311\353\323\321Vo\000\3149\253\036\t\201) 
(w*\231LdX$\321\355>3\346\301\210\377\223) ]
>>
%Resolving: [5 0]
<<
/Type /Catalog /Pages 1 0 R
/Metadata 3 0 R
>>
endobj
%Resolving: [1 0]
Error: /typecheck in --run--
Operand stack:
   --nostringval--   --nostringval--   1
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   -
-nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1830   1   3   
%oparray_pop   1829   1   3   %oparray_pop   1813   1   3   %oparray_pop   --nostringval--   --
nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1142/1684(ro)(G)--   --dict:1/20(G)--   --dict:74/200(L)--   --dict:74/200(L)--   --
dict:106/127(ro)(G)--   --dict:277/300(ro)(G)--   --dict:20/25(L)--   --dict:1/10(L)--
Current allocation mode is local
GPL Ghostscript SVN PRE-RELEASE 8.64: Unrecoverable error, exit code 1
marcos@imac:[18]%
Comment 1 Marcos H. Woehrmann 2008-09-14 19:14:12 UTC
Created attachment 4395 [details]
3979782.PDF
Comment 2 Alex Cherepanov 2008-10-17 11:12:31 UTC
The PDF file is incorrect. It ends in %%E instead of %%EOF .
We need a more robust PDF recovery routine because Acrobat can
display PDF files even without %%EOF .
Comment 3 Alex Cherepanov 2008-10-19 13:34:43 UTC
Search for 'startxref' instead of '%%EOF' in PDF recovery code because
'%%EOF' is mangled more ofthen than 'startxref'.

The following patch is committed as a rev. 9175.
http://ghostscript.com/pipermail/gs-cvs/2008-October/008749.html
Regression testing shows no differences.