Bug 687702

Summary: gs8.15 setpagedevice /invalidaccess
Product: Ghostscript Reporter: Gerhard Fuernkranz <gfuer>
Component: PS InterpreterAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED FIXED    
Severity: normal CC: christinedelight.top85, shailesh.mistry
Priority: P3    
Version: 0.00   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---

Description Gerhard Fuernkranz 2004-09-25 15:41:32 UTC
With gs 8.15, setpagedevice fails with /invalidaccess,
if currentglobal is true, when setpagedevice is called.
I can reproduce that with e.g.

  true setglobal
  << /.HWMargins [ 4 25.4 div 72 mul dup dup dup ] >> setpagedevice

With gs 8.14 and gs 8.30 beta, the above command did work.

I searched the PLRM, but I could not find a restriction
which explicitly prohibits calling the setpagedevice
operator, when currentglobal is true.
Comment 1 Ralph Giles 2004-09-27 11:20:15 UTC
I don't know why this was assigned to me. Reassigning to Ray.
Comment 2 Alex Cherepanov 2004-09-28 20:06:26 UTC
I confirm that this bug exists in the current CVS version.
Comment 3 Alex Cherepanov 2005-12-26 04:00:27 UTC
The error appears in pdfwrite device after the fix
http://cvs.ghostscript.com/cgi-bin/viewcvs.cgi/cvs/ghostscript/gs/lib/gs_pdfwr.ps?r1=1.37&r2=1.38
http://cvs.ghostscript.com/cgi-bin/viewcvs.cgi/cvs/ghostscript/gs/lib/gs_setpd.ps?r1=1.23&r2=1.24

And propagates to all devices after
http://cvs.ghostscript.com/cgi-bin/viewcvs.cgi/cvs/ghostscript/gs/lib/gs_pdfwr.ps?r1=1.38&r2=1.39

The immediate cause of the error is an attempt to put local OutputAttributes
dictionary into a global dictionary. I have not figured out yet how global/local
objects should play inside the page device machinery. So the real cause of the
bug is still a mystery.
Comment 4 Shailesh Mistry 2011-07-11 20:16:38 UTC
Bug still reproducible in Ghostscript 9.03
Comment 5 Ken Sharp 2013-06-26 16:17:43 UTC
Commit 073f7be1671e7fa2dbbc75984e593d2279bb05d7 fixes this