Bug 690837

Summary: Error creating jpeg preview from PDF file. Error: /undefined in --run--
Product: Ghostscript Reporter: demetrio.vitani
Component: PDF InterpreterAssignee: Alex Cherepanov <alex>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: 8.70   
Hardware: Sun   
OS: Solaris   
Customer: Word Size: ---
Attachments: 3218164.pdf
3208581.pdf
patch

Description demetrio.vitani 2009-10-22 05:49:42 UTC
When we try to create the jpeg preview of pdf file with the command:
gs -r20 -q -dNOPAUSE -dBATCH -sDEVICE=jpeg -sOutputFile=3218164_low.jpg 3218164.pdf

we receive the error 

Error: /undefined in --run--
Operand stack:
   --dict:8/17(L)--   F25   4   FontObject   --dict:10/19(L)--  
--dict:10/19(L)--   135580   --dict:10/19(L)--   glyphencoding   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--  
--nostringval--   false   1   %stopped_push   1862   1   3   %oparray_pop   1861
  1   3   %oparray_pop   1845   1   3   %oparray_pop   --nostringval--  
--nostringval--   2   1   1   --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--
Dictionary stack:
   --dict:1150/1684(ro)(G)--   --dict:1/20(G)--   --dict:75/200(L)--  
--dict:75/200(L)--   --dict:106/127(ro)(G)--   --dict:285/300(ro)(G)--  
--dict:22/25(L)--   --dict:4/6(L)--   --dict:21/40(L)--   --dict:14/15(L)--  
--dict:14/15(L)--   --dict:40/50(ro)(G)--   --dict:34/40(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.70: Unrecoverable error, exit code 1

Platform: SunOS SM-SUN-D3 5.10 Generic_141414-02 sun4u sparc SUNW,Sun-Fire-V240
Comment 1 demetrio.vitani 2009-10-22 05:52:32 UTC
Created attachment 5522 [details]
3218164.pdf

I have attached a PDF file for reproduce the problem.
Comment 2 demetrio.vitani 2009-10-22 06:02:42 UTC
Created attachment 5523 [details]
3208581.pdf

I have attached a PDF file for reproduce the problem
Comment 3 Alex Cherepanov 2009-11-01 15:07:48 UTC
The error happens during embedded TTF processing. I don't yet know
whether it is a Ghostscript bug or the font is malformed.
Comment 4 Alex Cherepanov 2010-01-02 17:12:40 UTC
Created attachment 5840 [details]
patch

Fix error recovery code that messed up operand stack trying to break out
of post table processing when the offset to the glyph name is beyond the
table length.

The patch has been committed as a rev. 10577.
Regression testing shows no differences.

This patch depends on the previous changes to gs_ttf.ps
and pdf_font.ps and won't help by itself.
Please get the whole development snapshot.