Good morning
An update on this conversation [Therion] th_formdef.tex runaway text error
<https://www.mail-archive.com/[email protected]/msg09676.html>
therion 6.4.0+d6d9a18f (2026-05-17) fixed the runaway text problem for me, but
now I seem to have expanded the load in the same thconfig file by changing, in
my thconfig, ‘maps on’ to ‘maps off’.
I have been experimenting with texmf/web2c/texmf.cnf, changing the setting from:
extra_mem_top = 4000000
to
extra_mem_top = 6500000 %this value based on the guidance
re maximum must be less than 8000000 total
The Therion log transcript for that is below:
######################## pdftex log file #########################
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/W32TeX)
(preloaded format=pdfetex 2023.12.2) 9 AUG 2026 10:04
entering extended mode
**data.tex
(./data.tex (./th_enc.tex) (./th_texts.tex) (./th_resources.tex
(c:/Program Files/Therion/texmf/tex/glyphtounicode.tex)) (./th_fontdef.tex{c:/P
rogram Files/Therion/texmf/fonts/pdftex.map}) (./th_fontdef2.tex)
(./th_formdef.tex
Runaway text?
0.2450
! TeX capacity exceeded, sorry [main memory size=8000000].
l.373350 \PL{0.24501
w}%
If you really absolutely need more capacity,
you can ask a wizard to enlarge me.
Here is how much of TeX's memory you used:
273 strings out of 95671
3888 string characters out of 1192323
8000001 words of memory out of 8000000
1674 multiletter control sequences out of 15000+50000
16503 words of font info for 54 fonts, out of 1000000 for 2000
844 hyphenation exceptions out of 5000
5i,1n,6p,415b,36s stack positions out of 5000i,500n,10000p,200000b,50000s
! ==> Fatal error occurred, no output PDF file produced!
##################### end of pdftex log file #####################
C:\Program Files\Therion\therion.exe: error -- pdftex exit code -- 1
writing xtherion file ... done
The guidance in texmf/web2c/texmf.cnf suggests 8000000 is the maximum, so I
stopped there for a while, but then I tried 9000000.
And success!
The equivalent tex log message below…
Here is how much of TeX's memory you used:
311 strings out of 95671
4227 string characters out of 1192323
8353892 words of memory out of 9066935
1706 multiletter control sequences out of 15000+50000
16503 words of font info for 54 fonts, out of 1000000 for 2000
844 hyphenation exceptions out of 5000
8i,5n,6p,415b,46s stack positions out of 5000i,500n,10000p,200000b,50000s
<c:/Program Files/Therion/texmf/fonts/type1/cmr10.pfb><c:/Program Files/T
herion/texmf/fonts/type1/cmss10.pfb>
Output written on data.pdf (1 page, 1580708 bytes).
PDF statistics:
54 PDF objects out of 1000 (max. 8388607)
31 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
115 words of extra memory for PDF output out of 10000 (max. 10000000)
So if the limit is not 8000000, is there a limit?
Or are there possible problems with going over 8000000?
Might needing so much memory allocated suggest some problem with my dataset?
Curious that ‘maps off’ requires more memory than ‘maps on’ (this is a 70 km
cave but there are scraps drawn for only 15 km)
Any insights appreciated.
Bruce
From: Therion <[email protected]> On Behalf Of Martin Budaj
Sent: Thursday, 21 May 2026 05:29
To: List for Therion users <[email protected]>
Subject: Re: [Therion] th_formdef.tex runaway text error
Hi,
after testing Bruce's dataset, it seems TeX really runs out of memory in this
case.
You can increase it in the file texmf/web2c/texmf.cnf. Set
extra_mem_top = 4000000 % originally 2000000 in the embedded TeX distribution
in Therion for Windows
I also updated this in the Windows installer:
https://github.com/therion/therion/actions/runs/25989238617
Martin
On Sun, Apr 19, 2026 at 7:20 AM <[email protected] <mailto:[email protected]> >
wrote:
I’m exploring what might be causing this problem that I raised 3 weeks ago
(copied below).
It has been affecting a project where we are migrating a lot of centrelines
from On-Station to Therion.
Back in March this problem only affected exported pdf elevations that were over
about 30 km in length.
Now we are closer to 63 km, it is also affecting exported pdf plans.
If I drill down to subsets of the project, there is no particular atomic subset
that errors out.
Seems like when the subset drops below around 30 km the problem resolves itself
and everything works OK.
Paring the layout used for exports down to specify only the scale of the output
and then gradually adding statements, I have narrowed the culprit down to the
colour map-fg statement.
Specifically, colour map-fg [97 86 38] is what seems to trigger the error.
Similarly colour map-fg scrap and colour map-fg map.
However colour map-fg 50 does not exhibit the problem for the 30-ish km
centrelines. An example below.
Neither does colour map-fg altitude (a colour legend is placed in the header,
but the LRUD is not coloured – don’t know if that is expected or not).
This breaks down somewhat at 60-ish km and all pdf exports fail even with only
a scale specified.
I have not figured out if this affects all my large projects, as I got
interrupted by the map -survey option problem reported earlier.
Stepping back in time, based on limited testing, all versions back to at least
therion 6.2.1 (2024-03-20) behave similarly).
Bruce
_______________________________________________
Therion mailing list
[email protected]
https://mailman.speleo.sk/listinfo/therion