36

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:

\documentclass{article}
\begin{document}
    Any tex file.
\end{document}
4
  • latex will not even start compiling. That's the problem. It doesn't matter what tex file...
    – Markus
    Commented Aug 13, 2012 at 20:53
  • 1
    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
    Commented Aug 13, 2012 at 20:58
  • 3
    what did you do with your texmf.cnf? In general there is no need to modify that file. At least use a local one.
    – user2478
    Commented Aug 13, 2012 at 21:01
  • I require quite a bit more memory for my compilations as I have large plots, animations and interactive components. These are very heavy during compilation.
    – Markus
    Commented Aug 14, 2012 at 20:34

1 Answer 1

56

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);
  end;

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

8
  • 1
    Indeed, I apparently had one too many zeros for the main_memory entry. Reread the config files. No more error! Thank you!
    – Markus
    Commented Aug 13, 2012 at 21:03
  • 1
    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
    Commented May 17, 2013 at 17:27
  • 2
    @Christian I have updated the answer to add some calculation for main_memory. Commented May 17, 2013 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
    Commented May 17, 2013 at 19:19
  • @Christian Answer updated with my guesses for the size of the memory units. Commented May 17, 2013 at 19:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .