Ghostscript can't handle graphics with the longest filename allowed by Windows. To reproduce this I attached such a graphic file and an postscript-file where it is embedded. If you open the postscript file with gsview you can see that the image isn't displayed. To check if it is really ghostscript 8.51, I tried to convert the graphic to pdf using Imagemagic's convert.exe as this uses the ghostscript libraries for the conversion of eps and pdf files. I get the following error: ----------------------------------------------------------- F:\lyxdokumente>convert aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaatiger.eps testtiger.pdf Error: /undefinedfilename in (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...) Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval- - 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fa lse 1 %stopped_push Dictionary stack: --dict:1126/1686(ro)(G)-- --dict:0/20(G)-- --dict:71/200(L)-- Current allocation mode is local AFPL Ghostscript 8.51: Unrecoverable error, exit code 1 Error: /undefinedfilename in (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...) Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval- - 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fa lse 1 %stopped_push Dictionary stack: --dict:1126/1686(ro)(G)-- --dict:0/20(G)-- --dict:71/200(L)-- Current allocation mode is local AFPL Ghostscript 8.51: Unrecoverable error, exit code 1 convert: no decode delegate for this image format `aaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaatiger.eps'. ----------------------------------------
Created attachment 1515 [details] postscript test file
Created attachment 1516 [details] test graphic
This bug affects also gsview as you can't open attachment 1516 [details] with gsview 4.7.
On my copy of WinXP Pro, I am unable to create a file called: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaatige r.eps I can create file whose name is three characters shorter. The longest file name that I am able to handle with Ghostcript (CVS head) from the command line seems to be 202 characters. Note: gp_file_name_sizeof is defined as 260. I do not know why we cannot handle file names between 202 and 260 characters.
>This bug affects also gsview as you can't open attachment 1516 [details] with gsview 4.7. I can open attachment 1516 [details] without problem with 8.51 from the command line.
> This bug affects also gsview as you can't open attachment 1516 [details] with gsview 4.7. GSview 4.7 can open files with names up to 255 characters long. Note that the file name length includes the path.
Created attachment 1517 [details] patch Increade the limit on the .libfile operand length from 200 to the full gp_file_name_sizeof . The file system also limits the length of the file name. I used the following simple program to test the file systems and run time libraries. #include <stdio.h> #include <stdlib.h> int main() { int i; char buf[1024]; for(i=200; i < sizeof(buf); i++) { FILE *f; printf("%d\n",i); memset(buf, 'a', i); buf[i] = 0; f = fopen(buf, "wb"); if(!f) break; fclose(f); } return 0; } The results: WindowsNT, NTFS, GCC = 243 WindowsNT, NTFS, MSVC = 252 WindowsNT, Samba, GCC = 236, last 5 files cannot be opened on Windows WindowsNT, Samba, MSVC= 232, last 3 files cannot be opened on Windows GNU+Linux, ext2, GCC = 255
The patch is committed to the HEAD branch.