Bug 689673 - /invalidaccess in --run-- when converting PDF to TIFFs
Summary: /invalidaccess in --run-- when converting PDF to TIFFs
Status: RESOLVED DUPLICATE of bug 689691
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 8.61
Hardware: Macintosh MacOS X
: P4 normal
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-30 06:54 UTC by Carol Chou
Modified: 2008-03-29 19:33 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
a PDF to reproduce the ghopstscript crash (1.15 MB, application/pdf)
2008-01-30 06:55 UTC, Carol Chou
Details
689673b.pdf (132.63 KB, application/pdf)
2008-01-31 08:44 UTC, Marcos H. Woehrmann
Details
hack7i.pdf - simplified sample file (20.20 KB, application/pdf)
2008-02-05 20:19 UTC, Alex Cherepanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carol Chou 2008-01-30 06:54:38 UTC
When converting the attached PDF to TIFFs via this command, gs -sDEVICE=tiff12nc -
sOutputFile=page%d.tiff -r150 -dBATCH -dNOPAUSE thesis.pdf, ghostscript crash with this following 
error

GPL Ghostscript 8.61 (2007-11-21)
Copyright (C) 2007 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 60.
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Error: /invalidaccess in --run--
Operand stack:
   --nostringval--   --dict:8/17(L)--   F26   11.96   --dict:7/7(L)--   --dict:7/7(L)--   55876   --
dict:7/7(L)--   --dict:8/11(L)--   --dict:8/11(L)--   Private   --dict:15/15(L)--   --dict:8/11(L)--   
CharStrings   --dict:60/60(L)--   -string-
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   -
-nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1905   1   3   
%oparray_pop   1904   1   3   %oparray_pop   1888   1   3   %oparray_pop   --nostringval--   --
nostringval--   8   1   60   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--   
--nostringval--   --nostringval--   %array_continue   --nostringval--   false   1   %stopped_push   --
nostringval--   %loop_continue   --nostringval--   --nostringval--   --nostringval--   --nostringval--   
--nostringval--   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   --
nostringval--
Dictionary stack:
   --dict:1145/1684(ro)(G)--   --dict:2/20(G)--   --dict:75/200(L)--   --dict:75/200(L)--   --
dict:107/127(ro)(G)--   --dict:275/300(ro)(G)--   --dict:22/25(L)--   --dict:4/6(L)--   --
dict:26/40(L)--   --dict:1145/1684(ro)(G)--   --dict:5/5(L)--   --dict:6/6(ro)(G)--   --dict:75/200(L)-
-   --dict:1145/1684(ro)(G)--   --dict:5/5(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.61: Unrecoverable error, exit code 1


This command was issued on leopard.  It also fail in linux ubuntu and redhat.
Comment 1 Carol Chou 2008-01-30 06:55:59 UTC
Created attachment 3744 [details]
a PDF to reproduce the ghopstscript crash
Comment 2 Marcos H. Woehrmann 2008-01-31 08:44:45 UTC
Created attachment 3760 [details]
689673b.pdf

I've verified that the problem occurs on other platforms (including amd64 on
linux) and with gshead.  I've attached a simplified version of original file,
689673b.pdf, which contains only the page that produces the error.

Both Acrobat and Apple Preview open the file without error.
Comment 3 Ray Johnston 2008-02-05 10:51:11 UTC
I get the invalidaccess on object 4017

The PDFDEBUG output shows:

%Resolving: [4017 0]
/DSTLPE+CMTI12 endobj
Error: /invalidaccess in --readonly--
Comment 4 Alex Cherepanov 2008-02-05 20:17:04 UTC
The PDF file embeds a Type 1 font that cannot be read by a PostScript
interpreter. The charstring for /j looks as:

  e/j 160 RD ...

The name e resolves to a charstring that was defined earlier and smashes
the stack.

I don't see any way to wix this quickly. We need to develop an ATM-style
interpreter to parse embedded Type 1 fonts.
Comment 5 Alex Cherepanov 2008-02-05 20:19:52 UTC
Created attachment 3769 [details]
hack7i.pdf - simplified sample file
Comment 6 Alex Cherepanov 2008-03-29 19:33:49 UTC
Although Type1 font is mangled differently, ATM-style parser should
fix both cases.


*** This bug has been marked as a duplicate of 689691 ***