[metapost] mptopdf crash

Oliver Buerschaper oliver.buerschaper at mpq.mpg.de
Fri Nov 13 16:04:43 CET 2009


Hi,

I'm experiencing a strange crash with mptopdf from a freshly installed  
TeXLive 2009 on Mac OS X 10.5.8.

File:

---
Phi := (1+sqrt(5))/2;       % golden ratio


def drawmidarrow (expr p, t) =
    draw p;
    filldraw arrowhead subpath(0,arctime(t*(arclength(p)-ahlength) 
+ahlength) of p) of p;
enddef;



s := 6mm;
l := Phi*Phi*s;
d := l-2mm;

path box;
box := unitsquare scaled s shifted (-s/2,-s/2);

path piece;
piece := ((quartercircle scaled d) cutbefore (box xshifted l/2))  
cutafter (box yshifted l/2);


beginfig(1);
     picture pic;
     pic := image(drawmidarrow(piece, 0.5));

     draw pic;

     % Only first variant crashes on MetaPost (mptopdf), TeXLive  
2008/2009!

     draw pic rotated 180;
     %draw pic rotated 179.999;
endfig;


end
---


Terminal output:
---
MTXrun | kpse fallback with progname 'context' initialized in 0.08  
seconds

MPtoPDF 1.3.3 : running 'texexec --mptex    bug_pic.mp'
MTXrun | kpse fallback with progname 'context' initialized in 0.08  
seconds
TeXExec | processing graphic 'bug_pic.mp'
This is MetaPost, version 1.208 (kpathsea version 5.0.0)
(./bug_pic.mp [1]
metafun 2009-11-13 08:39
  )
1 output file written: bug_pic.1
Transcript written on bug_pic.log.
TeXExec | runtime: 0.213421
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009)
[MP to PDF] (./bug_pic.1
! Missing number, treated as zero.
<to be read again>
                    \@@MP62
\presetMPscale ...pt \dimen 4=0pt \dimen 6=\gMPs 2
                                                   pt \dimen 8=0pt  
\dimen 10=0pt

\handleMPpathscale ->\presetMPscale
                                     \PDFcode {\gMPs 1 0 0 \gMPs 2 0 0  
cm}\re...

\dohandleMPpathB ... at MP :P:\somestring \endcsname
                                                   \handleMPsequence
l.41 B-1 -1  s
                S Q
?
---

What's going on here?

Thanks for your help,
Oliver


More information about the metapost mailing list