I am trying to compile the svn on Mac OS X Mavericks. When I ran make all
(after running ./autogen.sh
and ./configure
and wget
ing the garbage collector and rerunning ./configure
), I got the following error trying to compile GaussianSurface.asy
:
../asy -dir ../base -config "" -render=0 -f pdf -noprc GaussianSurface.asy ../base/plain_Label.asy: 670.23: reading array of length 2 with out-of-bounds index 2 make[1]: *** [GaussianSurface.pdf] Error 1 make: *** [man] Error 2
I tried debugging it, ran the ../asy
command a few times getting the same error, and then, mysteriously, the error vanished--even when I reverted all my debug-oriented changes. When I tried make all
again, I got the following error:
../asy -dir ../base -config "" -render=0 -f pdf -noprc axis3.asy ../base/plain_Label.asy: 670.23: reading array of length 3 with out-of-bounds index 3 make[1]: *** [axis3.pdf] Error 1 make: *** [man] Error 2
When I reran the ../asy
command directly, I got the same error except that the length and the out-of-bounds index both changed to 2
. I added some debugging output to plain_Label.asy
and got the following:
tex = true length of g:2 length of stringlist:7 Trying to access g (length 2) at index 2 stringlist = $x$ $y$ $z$ \vphantom{$10^4$}$0$ \vphantom{$10^4$}$0.5$ \vphantom{$10^4$}$1$ \vphantom{$10^4$}$10^{1}$ g = 0 1 ../base/plain_Label.asy: 685.23: reading array of length 2 with out-of-bounds index 2
(Note: the output for the path[][] g
is the index of the current path[]
followed by writing the path[]
.)
What this seems to say is that the _texpath
command is sometimes, for no apparent reason, malfunctioning and returning a too-short array of disconnected empty paths. And the inconsistency makes me wonder if there is some kind of concurrency issue here, or perhaps some configuration choice that is being made "at random" (i.e., without a well-defined rule). Perhaps even some change that takes time to propogate?
What version of ghostscript are you using? You need ghostscript 9.16 or later.
It would help to see the output of asy -vvv. Also try with and without -tex pdflatex and -tex xelatex to help narrow down which tex engine this occurs with.
Note that upgrading to MacTeX 2015 (and consequently upgrading ghostscript) stopped this from happening. I still think that returning an array of the wrong length is bad error handling. Perhaps
_texpath
should issue a warning when applied with the "wrong" version of Ghostscript? (Ideally accompanied with instructions on how to install an up-to-date version.)In any case, the priority of this bug can probably be lowered.
I'm closing this as it was due to using an obsolete version of ghostscript.