Bug 694607

Summary: Error: /undefined in .
Product: Ghostscript Reporter: Mark <mpictor>
Component: PS InterpreterAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P4    
Version: 9.10   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: ps2pdf fails on this file

Description Mark 2013-09-20 11:02:31 UTC
Created attachment 10217 [details]
ps2pdf fails on this file

64-bit gentoo, gs 9.10 compiled with http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-9.10.ebuild?view=markup

$ ps2pdf part1-bad.ps 
Error: /undefined in .
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1900   1   3   %oparray_pop   1899   1   3   %oparray_pop   1883   1   3   %oparray_pop   1771   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1175/1684(ro)(G)--   --dict:0/20(G)--   --dict:78/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 149747
GPL Ghostscript 9.10: Unrecoverable error, exit code 1
Comment 1 Ray Johnston 2013-09-20 11:07:51 UTC
The file has a bogus last line. Delete that and all is OK.

GS reports the error info with:
Current file position is 149747

and a hex dump shows the last line is .<cr><cr><lf>

000248E0: 77 6E 7B 65 6E 64 2D 68 6F 6F 6B 7D 69 66 0D 0D  |wn{end-hook}if..|
000248F0: 0A 2E 0D 0D 0A  |.....