On Wed, Nov 28, 2007 at 10:44:07AM -0800, Alan Irwin wrote:
>
> Andrew, to pursue this further I think we need to find out exactly what in
> x03.pscairo is causing modern gv/gs to choke. For Debian testing, here is
> the current ghostscript error message (which you get by using the --noquiet
> option for gv):
>
> Error: /rangecheckGPL Ghostscript 8.56: Unrecoverable error, exit code 1
> in --xyshow--
> Operand stack:
> (\002\001) --nostringval--
> Execution stack:
> %interp_exit .runexec2 --nostringval-- --nostringval--
> --nostringval-- 2 %stopped_push --nostringval-- --nostringval--
> --nostringval-- false 1 %stopped_push 1797 1 3
> %oparray_pop 1796 1 3 %oparray_pop 1792 1 3 %oparray_pop
> 1675 1 3 %oparray_pop --nostringval-- %errorexec_pop
> .runexec2 --nostringval-- --nostringval-- --nostringval-- 2
> %stopped_push --nostringval--
> Dictionary stack:
> --dict:1086/1123(ro)(G)-- --dict:0/20(G)-- --dict:80/200(L)--
> Current allocation mode is local
>
> The ghostscript error message above says the error occurs for the xyshow
> command, but that command appears only in the prolog of the file.
>
> [EMAIL PROTECTED]> grep -n xyshow x03c.pscairo
> 20:/xyS{xyshow}bind def
>
> I don't really understand the PostScript language, but that prolog line
> appears to associate xyS with xyshow. The good news is that xyS appears
> quite rarely within the file:
>
> [EMAIL PROTECTED]> grep -n xyS x03c.pscairo
> 20:/xyS{xyshow}bind def
> 2519:[-4.670898 -8.090233 0 ] xyS
> 2537:[-8.090233 -4.670898 0 ] xyS
> 2573:[8.090233 -4.670898 8.090233 -4.670898 0 ] xyS
> 2591:[4.670898 -8.090233 4.670898 -8.090233 0 ] xyS
> 2627:[-4.670898 -8.090233 -4.670898 -8.090233 0 ] xyS
> 2645:[-8.090233 -4.670898 -8.090233 -4.670898 0 ] xyS
> 2681:[8.090233 -4.670898 8.090233 -4.670898 0 ] xyS
> 2699:[4.670898 -8.090233 4.670898 -8.090233 0 ] xyS
>
> Those same lines also appear in the x03c.pscairo version that was generated
> on the Debian oldstable system.
>
> Could the problem be the first (and second) xyS calls which appear to
> have the wrong number of arguments? It is quite possible that the newer
> gv/gs combination has tests for issues like that, while the older version
> does not and somehow muddles through. This is just speculation though,
> since
> I don't really understand PostScript.
>
> Andrew, you have a lot more understanding of the PostScript language than I
> do so I am looking forward to your comments on the above results and the
> results of your further investigations to pinpoint what the exact problem
> is. If it does turn out to be some issue with the Cairo backend being
> sloppy with the PostScript language, then I will need your backup to present
> this issue properly to the cairo mailing list.
Alan,
You are correct the the xyshow command is the cause of the problem.
The syntax is
string numarray xyshow
For each glyph in the string there needs to be a pair of numbers which
define the x and y displacement of the glyph. The array is ended with a
0. If the end of the array is reached before all the glpyhs are plotted
a rangecheck error occurs. This is precisely what happens here.
In the cairo postscript code the string appears on the previous line.
Note that in each case the string is one glyph longer than the number of
(x,y) pairs in the numarray. This operator only seems to be generated
for slanted text. In example 3 the first two shorter commands plot 30
and 60. The longer ones are for 120, 150 etc. Fix this by hand (i.e.
adding an extra pair of displacements in) and the postscript will work
fine. From the examples it looks like all of the "broken" ones use this
xyshow operator.
So, it looks like this is a cairo issue since it seems valid for gs to
generate a rangecheck error in this case. This issue only manifests
itself with newer versions of ghostscript though.
Incidently my older version of cairo produces postscript which does
not use the xyshow command, and so the problem does not arise. The
old pscairo plots display fine with the new gv/ghostscript. The
problems with the old ghostscript are that the old ghostscript does
not scale the text correctly, both with old and new pscairo plots. It
doesn't complain about the xyshow rangecheck though.
Andrew
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel