[Therion] th_formdef.tex runaway text error
Martin Budaj
m.budaj at gmail.com
Wed May 20 19:29:00 CEST 2026
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 <bruce at tomo.co.nz> 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
>
>
>
> *From:* Therion <therion-bounces at speleo.sk> *On Behalf Of *
> bruce at tomo.co.nz
> *Sent:* Monday, 30 March 2026 15:51
> *To:* 'List for Therion users' <therion at speleo.sk>
> *Subject:* [Therion] th_formdef.tex runaway text error
>
>
>
> Hello
>
> I’ve just created an error, due I believe to particular layout changes
> I’ve made to a couple of exported elevations, but I’m yet to isolate which
> changes are the culprits.
>
> (It’s not related to recent posts I’ve made on therion/therion: therion –
> cave surveying software <https://github.com/therion/therion>, and it is
> consistent across all recent Therion versions)
>
>
>
> Perhaps someone may know if I can use the therion log information to track
> down the cause?
>
> Using the below information I checked in file thTMPDIR /th_formdef.tex
>
> …and found the string \PL{9178.94 283.21 m}% on line 165540.
>
> There are 220130 lines overall, and the file seems to end without obvious
> truncation.
>
>
>
> That in itself does not help much.
>
> I’m sure I’ll be able to isolate the cause by other means, but I’m just
> wondering if anyone knows if I could use this information to locate a cause?
>
>
>
> Bruce
>
>
>
> #################### end of metapost log file ####################
>
> converting scraps ... done
>
> making map ... done
>
> ######################## pdftex log file #########################
>
> This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/W32TeX)
> (preloaded format=pdfetex 2023.12.2) 30 MAR 2026 14:09
>
> 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_formdef.tex
>
> Runaway text?
>
> 9178.9
>
> ! TeX capacity exceeded, sorry [main memory size=3500000].
>
> l.165540 \PL{9178.94
>
> 283.21 m}%
>
> 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:
>
> 263 strings out of 95671
>
> 3772 string characters out of 1192323
>
> 3500001 words of memory out of 3500000
>
> 1667 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,289b,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
>
>
>
>
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> https://mailman.speleo.sk/listinfo/therion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20260520/a6228c96/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 362502 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20260520/a6228c96/attachment-0001.png>
More information about the Therion
mailing list