this applies to current gs 8.30 cvs HEAD on RedHat Linux various versions (7.3 -- 9.0 -- FC2). ps2pdf1(2|3|4) segfaults on the example file at the second invocation of the DocumentSuppliedFont /_ArialUnicodeMS gs 7.05 converts the sample file to valid pdf. Cheers T.
Please attach a sample file to the bug report.
Created attachment 769 [details] gzipped eps file which causes ps2pdf to segfault sample file from http://lanl.arXiv.org/ftp/exports/fig_5.eps attached as requested
Please ignore my previous comment. I didn't notice the URL entry. The file has type 3 font that maintains a state and assumes that BuildChar is executed for every character in the show string. This assumption is correct bacause the characters use setcharwidth. The bug can be easily verified by redefining "show" and adding debug print to BuildChar /show (dup == show} bind def /BuildChar { dup 16 4 string cvrs == ... } def PDF writer caches the character anyway and messes up the state.
Please specify exact command line to reproduce the segfault. Raph with Linuh and me with Windows got "undefined in --get--". Please try the _current_ cvs HEAD. In the last month pdfwrite in HEAD was patched with a proper handling of BuildChar/setcharwidth. It must execute for each glyph occurance, recognize glyph variations, and convert to multiple fonts in glyph variatipns appear.
I meant that the last statement in the Comment #3 is obsolete.
Hmm, I can see that with pdfwrite it doesn't execute BuildChar for the second occurance of '0'. Something is wrong in there.
I use the script ps2pdf13 as provided with gs. With current cvs HEAD of 7/1/04 on RedHat 9.0 and Fedora Core 2 with gcc 3.3.3 and gcc 3.4 I get $ ps2pdf13 fig_5.eps Error: /undefined in --get-- Operand stack: 32 --dict:9/9(L)-- KBE20 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- (0.03) --nostringval-- %string_continue --nostringval-- --nostringval-- %finish_show --nostringval-- --nostringval-- 7 11 1 --nostringval-- (pdf_text_enum_t) %op_show_continue --nostringval-- Dictionary stack: --dict:1116/1686(ro)(G)-- --dict:0/20(G)-- --dict:93/200(L)-- --dict:8/26(L)-- --dict:11/14(ro)(L)-- --dict:64/68(ro)(L)-- --dict:15/20(ro)(L)-- --dict:20/29(L)-- --dict:47/50(L)-- --dict:95/95(L)-- --dict:98/107(L)-- Current allocation mode is local Last OS error: 2 Current file position is 432923 AFPL Ghostscript BETA RELEASE 8.30: Unrecoverable error, exit code 1 Cheers Thorsten
Created attachment 781 [details] patch.txt Attaching a suggested patch. It passed related tests (687044, 687472, 687489, 687546) and is being tested for regressions now.
Comment on attachment 781 [details] patch.txt Oops, it's a wrong patch. Will attach another one.
Created attachment 782 [details] patch.txt Attaching a suggested patch. It passed related tests (687044, 687472, 687489, 687546) and is being tested for regressions now.
Changed the bug title because it was not represeb=ntative.
Patch to HEAD: http://www.ghostscript.com/pipermail/gs-cvs/2004-July/004602.html Patch to GX_8_1X : http://www.ghostscript.com/pipermail/gs-cvs/2004-July/004603.html