[metapost] Limits for TEX.mp?

Taco Hoekwater taco at elvenkind.com
Mon May 9 15:26:51 CEST 2011

On 05/06/2011 05:08 PM, Taco Hoekwater wrote:
> On 05/06/2011 12:20 AM, Brian Kell wrote:
>> input TEX;
>> beginfig(1);
>> for i=1 upto 300:
>> label(TEX("$x_{" & decimal(i) & "}$"), (0,0));
>> endfor
>> endfig;
>> In this case I get 122 successful iterations, but the "Unable to make
>> mpx file" error occurs on the 123rd iteration, which is exactly where I
>> see the problem in my original file.
> It looks like metapost is running out of open file handles.
> (I see the same effect on linux but only after 506 iterations,
> which happens to match 1024 open file handles). I'll investigate
> this further in the weekend.

Found the problem: the .mpx file reader forgot to close any of the tfm 
files it had to read, resulting in lots of open tfm files. Fixed in 
trunk, branches/1.5, and tl2011 (dev).

Best wishes,

More information about the metapost mailing list