# [metapost] color stack overflow

luigi scarso luigi.scarso at gmail.com
Mon Apr 10 10:27:38 CEST 2017

On Mon, Apr 10, 2017 at 10:18 AM, Akira Kakuto <kakuto at fuk.kindai.ac.jp> wrote:
> Hi Luigi,
>
>> yes, but the point is that perhaps I can find another
>> chain like
>> \opOp{\opSimple{\opMouv{\opAp
>> and have another stack overflow.
>
>
> Sorry I can't understand the meaning.
> The file  mptextmp.tex which was ok contains the line
> \opOp{\opSimple{\opMouv{\opAp{titi}}}}%
Yes, but you have raised the stack with
max_color_stack_depth = 12
and the chain of \op* now it's ok.

It's a matter of push/pop :
push
push
push
pop
:
push
push
push
:
so at some point I have more than max_color_stack_depth "push" and mpost exits.
With max_color_stack_depth = 10 the example fails
with max_color_stack_depth = 12 the example is ok,
but then perhaps I can find an example where max_color_stack_depth =
12  also fails.
The fact that max_color_stack_depth = 10 is there from decades says
that perhaps
something  could be not ok in the latex code.

--
luigi