Bug 687702 - gs8.15 setpagedevice /invalidaccess
Summary: gs8.15 setpagedevice /invalidaccess
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Interpreter (show other bugs)
Version: 0.00
Hardware: PC Linux
: P3 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-25 15:41 UTC by Gerhard Fuernkranz
Modified: 2013-06-26 16:17 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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