Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

As the title states, compiling with latex produces the error, right away:

Ouch---my internal constants have been clobbered!---case 14

I have no idea what this means... I use TexLive 2012. I updated my texmf.cnf and ran fmtutil-sys and texhash. I guess texhash may have messed it up?

Any ideas?

As requested a minimal working example:

    Any tex file.
share|improve this question
Can you please give a minimal working example? –  Ivo Aug 13 '12 at 20:51
Welcome to TeX.SE! Please provide a minimum working example (MWE) that generates the error message (which is quite alarming, isn't it?). Without that information, it's going to be well-nigh impossible to diagnose the cause that gives rise to this uncomfortable message. –  Mico Aug 13 '12 at 20:51
latex will not even start compiling. That's the problem. It doesn't matter what tex file... –  Markus Aug 13 '12 at 20:53
Delete all auxiliary files created from the previous run. See File extensions of LaTeX-related files or Deleting external/auxiliary files? for some ideas. Then try to rerun your example code. –  Werner Aug 13 '12 at 20:58
what did you do with your texmf.cnf? In general there is no need to modify that file. At least use a local one. –  Herbert Aug 13 '12 at 21:01

1 Answer 1

up vote 40 down vote accepted

The error message

Ouch---my internal constants have been clobbered!---case 14

is caused by

if (mem_min<min_halfword)or(mem_max>=max_halfword)or@|
  (mem_bot-mem_min>max_halfword+1) then bad:=14;

in pdftex.web. Probably you have changed the memory settings in texmf.cnf that triggers the error. For further analysis these changes would be useful.

Maximal main_memory

tex.ch changes the code lines above to:

if (mem_bot-sup_main_memory<min_halfword)or@|
  (mem_top+sup_main_memory>=max_halfword) then bad:=14;

Also it defines max_halfword as:

@d max_halfword==@"FFFFFFF {largest allowable value in a |halfword|}

That is 228-1 = 268,435,455. The value for sup_main_memory:

@!sup_main_memory = 256000000;

And mem_top is initialized as:

mem_top := mem_bot + main_memory -1;

Then the latest condition for triggering the error becomes:

mem_top + sup_mem_memorymax_half_word
main_memorymax_halfword - sup_main_memory + 1
main_memory ≥ 12,435,456

or main_memory must be smaller or equal than 12,435,455.

Memory units

From tex.web:

@!mem : array[mem_min..mem_max] of memory_word; {the big dynamic storage area}
@!memory_word = record@;@/
  case four_choices of
  1: (@!int:integer);
  2: (@!gr:glue_ratio);
  3: (@!hh:two_halves);
  4: (@!qqqq:four_quarters);

The translation to bytes seems to be system dependent, from texmfmem.h my guess for memory_word are four or eight bytes.

share|improve this answer
Indeed, I apparently had one too many zeros for the main_memory entry. Reread the config files. No more error! Thank you! –  Markus Aug 13 '12 at 21:03
Is there an easy way to find out the max_halfword? In the TeX sources I found a #define that set it to 1073741823 but this error occurs way before my main_memory variable reaches that value. –  Christian May 17 '13 at 17:27
@Christian I have updated the answer to add some calculation for main_memory. –  Heiko Oberdiek May 17 '13 at 18:14
@HeikoOberdiek Oh that's great. This works indeed just so :) Just out of curiosity, are these bytes, words or what else? If it's bytes, that's awfully few :/ –  Christian May 17 '13 at 19:19
@Christian Answer updated with my guesses for the size of the memory units. –  Heiko Oberdiek May 17 '13 at 19:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.