Error /rangecheck In .installpagedevice
Log In [x] | Forgot Password Login: [x] First Last Prev Next This bug is not in your last search results. Bug695468 - /rangecheck in .installpagedevice error when combining LockDistillerParams, setpagedevice, and restore Summary: /rangecheck in .installpagedevice error when combining LockDistillerParams, s... Status: RESOLVED FIXED Product: Ghostscript Classification: Unclassified Component: PDF Writer Version: 9.14 Hardware: PC Windows 7 Importance: P4 minor Assigned To: Ken Sharp QA Contact: Bug traffic URL: Keywords: Depends on: Blocks: Show dependency tree /graph Reported: 2014-09-03 22:21 PDT by Nick Phillips Modified: 2014-09-05 07:04 PDT (History) CC List: 0 users See Also: Customer: Word Size: --- Attachments Very minimal test case (76 bytes, application/postscript) 2014-09-03 22:21 PDT, Nick Phillips Details View All Add an attachment (proposed patch, testcase, etc.) Note You need to log in before you can comment on or make changes to this bug. Description Nick Phillips 2014-09-03 22:21:36 PDT Created attachment 11153 [details] Very minimal test case When LockDistillerParams is true, and we call setpagedevice within a save/restore block, the restore fails as below: Error: /rangecheck in .installpagedevice Based on the Adobe docs it sounds like LockDistillerParams should not cause any failure it should just cause requested changes to be ignored. Also I'm not sure whether it should interact with setpagedevice like this. This is tested with version 9.14 on Windows 7 32-bit as below. gswin32c.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=test.pdf -c "<< /LockDistillerParams true >> setdistillerparams" -f test.ps The attached file is as minimal as I can get. Our real world usage is to provide 2 input files (the saved Adobe Distiller options, and the PS file produced from a document composition tool). If the restore or setpagedevice lines are removed it works, and regardless it does produce a working file but we prefer not to just ignore error messages in our automated processing environment. Comment 1 Ken Sharp 2014-09-04 02:08:20 PDT The problem is the insane setpagedevice implementation. When we restore back to the state prior to the setpagedevice (page device configuration is affected by gsave/grestore), we set the page device by using .installpagedevice which insists that all the keys must be processed (unlike normal setpagedevice). Now we store the distiller params in the page device structure, so they too (properly) follow gsave and grestore. The problem is that if LockDistillerParams is set, pdfwrite doesn't bother to process the distiller params. This leaves the keys unproc
was "aborted". In the log file, I found that therewas a Postscript error generated in the "pstoraster" stage. I canreproduce the error with the following command:gs-esp -dNOPAUSE -sDEVICE=cups -sOUTPUTFILE=/dev/null foo.psError: /rangecheck in .installpagedeviceOperand stack:--nostringval-- --dict:70/71(ro)(G)-- --nostringval--Execution stack:%interp_exit .runexec2 --nostringval-- --nostringval----nostringval-- 2 %stopped_push --nostringval-- --nostringval----nostringval-- false 1 %stopped_push 1 3 %oparray_pop 13 %oparray_pop 1 http://bugs.ghostscript.com/show_bug.cgi?id=695468 3 %oparray_pop .runexec2 --nostringval----nostringval-- --nostringval-- 2 %stopped_push --nostringval--1 3 %oparray_pop --nostringval-- 1 3 %oparray_pop--nostringval-- --nostringval-- --nostringval-- --nostringval--Dictionary stack:--dict:1048/1123(ro)(G)-- --dict:0/20(G)-- --dict:69/200(L)--Current allocation mode is localCurrent file position is 233ESP Ghostscript 7.05.4: Unrecoverable error, exit code 1The Postscript file was a huge file produced by http://cups-bugs.easysw.narkive.com/QExAhyU9/error-rangecheck-in-installpagedevice Interleaf, but Ireduced it to the following:%!PS-Adobe-3.0/inch { 72 mul } def/skiphead save defstatusdict begin 8.824 inch 6.617 inch 0.000 inch 0 setpageparams end/Times-Roman findfont 12 scalefont setfont72 72 moveto (Hello, World!) showshowpageskiphead restoreThe problem disappears when I either remove the statusdict line or theskiphead line. I can also display the file on screen with "gs". Isthis a problem of the cups driver, or is the Postscript invalid?--Dick Streefland //// De Biltdick.streefland-qWit8jRvyhVmR6Xm/***@public.gmane.org (@ @) The Netherlands------------------------------oOO--(_)--OOo------------------ Mike Sweet 2003-05-14 00:14:03 UTC PermalinkRaw Message Post by Dick StreeflandToday, I ran into a Postscript file that couldn't be printed withCUPS. The job state was "aborted". In the log file, I found that therewas a Postscript error generated in the "pstoraster" stage. I can...Please file a STR at:http://www.cups.org/str.php-
have seen this problem with a couple of different postscript files. It seems to happen http://computer-programming-forum.com/36-postscript/937b5342deb30d53.htm on pages where a figure is present. I https://bugs.debian.org/372608 am postscript and ghostscript ignorant. How can I work around this? And what is the problem anyways? thanks. -- roz Below is the dump from gsview. Loaded Ghostscript DLL C:\GSTOOLS\gs5.10\gsdll32.dll Aladdin Ghostscript 5.10 (1997-11-23) Copyright error /rangecheck (C) 1997 Aladdin Enterprises, Menlo Park, CA. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Displaying DSC file C:/My Documents/Rozanna/usf/ai learning/octhesis/thesis_nolargefig_ps.ps Displaying page 1 Displaying page 2 Displaying page 3 Displaying page 4 Displaying page 5 Displaying page error /rangecheck in 6 Displaying page 7 Displaying page 8 Displaying page 9 Displaying page 10 Displaying page 11 Displaying page 12 Displaying page 13 Loading NimbusRomNo9L-Regu font from C:\GSTOOLS\gs5.10\fonts\n021003l.pfb... 1892392 572724 1561260 263563 2 done. Loading NimbusRomNo9L-Medi font from C:\GSTOOLS\gs5.10\fonts\n021004l.pfb... 1932572 613025 1561260 265257 2 done. Unrecoverable error: rangecheck in .installpagedevice Operand stack: --nostringval-- --nostringval-- --- Begin offending input --- 7.17 356.95 T (ee:) 104.83 356.95 T FMENDPAGE %%EndDocument (astronom)o(y)e(data)h(set)g(and)g(a)g(tree)g(generated)g(from)f(it.)20 b(No)q(des)15 b(in)g(b)q(old)150 2209 y(face)g(are)g(dec --- End offending input --- file offset = 282658 gsdll_execute_cont returns -15 Wed, 24 Jan 2001 03:00:00 GMT Mike Barfiel#2 / 3 Unrecoverable error: rangecheck in .installpagedevice ------snip------snip------snip------snip------snip------snip------snip------ Ghostscript version: 5.10 Where you got Ghostscript: Alladin site Hardware you are using: pc/pentium Operating system you are using: Windows 95 (If you compiled Ghostscript yourself) C compiler
for ghostscript is src:ghostscript. Reported by: Olivier Berger