[metapost] strange behaviour using metapost 1.504 from texlive 2011

Laurent Méhats laurent.mehats at gmail.com
Mon Aug 1 23:05:59 CEST 2011


Hello,

I'm experiencing a strange behaviour using metapost 1.504 from texlive
2011. The following code causes a segfault on my system (ubuntu 11.04,
2.6.38-11-generic):

--%<-- test.mp
beginfig(0)
picture pct[];
if known pct[0]: fi
pct[1].num:=0;
endfig;

beginfig(1)
picture pct[];
if known pct[0]: fi
pct[1].num:=0;
endfig;

end
--%<-- test.mp

What I get is:
This is MetaPost, version 1.504 (kpathsea version 6.0.1)
(mpost.mp (/usr/local/texlive/2011/texmf-dist/metapost/base/plain.mp
Preloading the plain mem file, version 1.004)) (./test.mp [0]Erreur de
segmentation

However, the code will compile if I:
- use metapost 1.211 from texlive 2010 instead of metapost 1.504 or
- remove the code for figure 1 (that is the same as for figure 0) or
- remove any of the "if known pct[0]: fi" lines or
- change the first "if known pct[0]: fi" line to "if known pct[1]: fi"
(not the second one).
- remove any of the "pct[1].num:=0;" lines or
- change the first "pct[1].num:=0;" line to "pct[0].num:=0;" (not the
second one).

Does that come from metapost 1.504 or did I make a mistake updating texlive ?

Regards,
Laurent Méhats



More information about the metapost mailing list