[tex-live] xdvipdfmx says "** ERROR ** Capacity exceeded"
jinhwan.cho at gmail.com
Fri Feb 19 01:05:55 CET 2010
On Feb 18, 2010, at 10:12 PM, Daniel Rubin wrote:
> Dear tex-live users and wizards,
> I've got a problem with xdvipdfmx trying to build a PDF from an xdvi
> file compiled with xelatex.
> The logfile is empty except for this:
> ** WARNING ** DVI need stack depth of 291,
> ** WARNING ** but DVI_STACK_DEPTH_MAX is 256.
> ** ERROR ** Capacity exceeded.
> I have no clue as to what's causing this. It happens with about 1 out
> of 1000 source files I'm creating. I'd be glad to get some help to
> pinpoint this.
> What stack is this DVI stack?
It is easy to understand if you are familiar with DVI commands, push and pop.
The "push" command will save a few values related to the current status and
increase the "stack depth" value. On the other hand, the "pop" command will
restore the saved values, and decrease the "stack depth".
DVI_STACK_DEPTH_MAX says how many "push"es you can use.
> What may be causing it to become so deep? E. g. can I do something to my
> latex-source, embedded images, fonts or whatever to make this go away?
I never see a valid TeX file causing the dvi stack problem. One exception is
when some style or class files may have a bug. If you send me sample ".xdv"
file, I can check what happened really. (It may be helpful if I have a source
TeX file too.)
> I'm creating through an automated process and I'm afraid simply going to
> the source and increasing the limit will only make this problem go away
> for a little longer rather than forever.
If you are able to compile "xdvipdfmx" by yourself, it is very simple to adjust
the maximum value of DVI_STACK_DEPTH_MAX. Find the 70th line of the
"dvi.c", and change the value 256 to what you want.
Best regards, ChoF.
More information about the tex-live