[metapost] metapost crash
taco at elvenkind.com
Sun Feb 12 11:01:29 CET 2006
Stephan Olbrich wrote:
>>My guess is that you ran out of "independant variables", metapost
>>used to crash when that happened. The latest version should give you
>>a prober error before quitting, but the actual problem is not solved.
> My version is:
> MiKTeX-MetaPost 2.4.1398 (0.641) (MiKTeX 2.4)
> Which version is the latest?
0.901. I'm not sure if there is a miktex update package, but you
can download miktex binaries from here:
>>If this is indeed the cause, then the problem is in the internal
>>bookkeeping of metafont (which metapost has inherited), and there
>>is no known solution.
> What are "independent variables"? Is there anything I can do to use
> I thought all variables between beginfig and endfig are local and
> cleared after the endfig, so the memory should be freed.
Whenever metapost has to create an instance of a variable, it
attaches a unique serial number to be able to identify that instance,
and those serial numbers are the problem. If a macro that has a local
variable is called 100 times, the serial number is a 100 higher
It is often possible to circumvent the problem in your own code,
by using more internals and global state variables and less
local variables, but it is not nearly as easy with the graph
>>Another potential cause is that the .mem file that is used by
>>your run was generated with different web2c array sizes from the
>>current ones. That can produce all kind of strange errors, but
>>is easy to fix: just regenerate the .mem file.
> Sorry, I have no clue, what you are talking about. How can I regenerate
> the .mem file?
'plain metapost' is actually the metapost executable with a set of
predefined macros, loaded from a file whose extension is '.mem'.
Mem files are created by calling metapost with a special switch. How
to do this in miktex I do not know (I use linux)
More information about the metapost