<div dir="ltr">Hi,<div><br></div><div>after testing Bruce's dataset, it seems TeX really runs out of memory in this case. </div><div><br></div><div>You can increase it in the file texmf/web2c/texmf.cnf. Set</div><div><br></div><div>extra_mem_top = 4000000  % originally 2000000 in the embedded TeX distribution in Therion for Windows</div><div><br></div><div>I also updated this in the Windows installer: <a href="https://github.com/therion/therion/actions/runs/25989238617">https://github.com/therion/therion/actions/runs/25989238617</a></div><div><br></div><div>Martin</div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Apr 19, 2026 at 7:20 AM <<a href="mailto:bruce@tomo.co.nz">bruce@tomo.co.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg1397637737449018828"><div lang="EN-NZ" style="overflow-wrap: break-word;"><div class="m_1397637737449018828WordSection1"><p class="MsoNormal">I’m exploring what might be causing this problem that I raised 3 weeks ago (copied below).<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">It has been affecting a project where we are migrating a lot of centrelines from On-Station to Therion.<u></u><u></u></p><p class="MsoNormal">Back in March this problem only affected exported pdf elevations that were over about 30 km in length.<u></u><u></u></p><p class="MsoNormal">Now we are closer to 63 km, it is also affecting exported pdf plans.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">If I drill down to subsets of the project, there is no particular atomic subset that errors out.<u></u><u></u></p><p class="MsoNormal">Seems like when the subset drops below around 30 km the problem resolves itself and everything works OK.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">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 <b>colour map-fg</b> statement.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Specifically, <b>colour map-fg [97 86 38]</b> is what seems to trigger the error.<u></u><u></u></p><p class="MsoNormal">Similarly <b>colour map-fg scrap</b> and <b>colour map-fg map</b>.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">However <b>colour map-fg 50</b> does not exhibit the problem for the 30-ish km centrelines.  An example below.<u></u><u></u></p><p class="MsoNormal">Neither does <b>colour map-fg altitude</b> (a colour legend is placed in the header, but the LRUD is not coloured – don’t know if that is expected or not).<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">This breaks down somewhat at 60-ish km and all pdf exports fail even with only a scale specified.<u></u><u></u></p><p class="MsoNormal">I have not figured out if this affects all my large projects, as I got interrupted by the map -survey option problem reported earlier.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Stepping back in time, based on limited testing, all versions back to at least therion 6.2.1 (2024-03-20) behave similarly).<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Bruce<u></u><u></u></p><p class="MsoNormal"><span><img width="1029" height="534" style="width: 10.7222in; height: 5.5625in;" id="m_1397637737449018828Picture_x0020_1" src="cid:ii_19e46695f4a5b16b21"></span><u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><div><div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(225,225,225) currentcolor currentcolor;padding:3pt 0mm 0mm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11pt;font-family:Calibri,sans-serif"> Therion <<a href="mailto:therion-bounces@speleo.sk" target="_blank">therion-bounces@speleo.sk</a>> <b>On Behalf Of </b><a href="mailto:bruce@tomo.co.nz" target="_blank">bruce@tomo.co.nz</a><br><b>Sent:</b> Monday, 30 March 2026 15:51<br><b>To:</b> 'List for Therion users' <<a href="mailto:therion@speleo.sk" target="_blank">therion@speleo.sk</a>><br><b>Subject:</b> [Therion] th_formdef.tex runaway text error<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Hello<u></u><u></u></p><p class="MsoNormal">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.<u></u><u></u></p><p class="MsoNormal">(It’s not related to recent posts I’ve made on <a href="https://github.com/therion/therion" target="_blank">therion/therion: therion – cave surveying software</a>, and it is consistent across all recent Therion versions)<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Perhaps someone may know if I can use the therion log information to track down the cause?<u></u><u></u></p><p class="MsoNormal">Using the below information I checked in file thTMPDIR /th_formdef.tex<u></u><u></u></p><p class="MsoNormal">…and found the string \PL{9178.94 283.21 m}% on line 165540.<u></u><u></u></p><p class="MsoNormal">There are 220130 lines overall, and the file seems to end without obvious truncation.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">That in itself does not help much.<u></u><u></u></p><p class="MsoNormal">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?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Bruce<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><div style="border:1pt solid windowtext;padding:1pt 4pt"><p class="MsoNormal" style="margin-left:36pt">#################### end of metapost log file ####################<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">converting scraps ... done<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">making map ... done<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">######################## pdftex log file #########################<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">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<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">entering extended mode<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">**data.tex<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">(./data.tex (./th_enc.tex) (./th_texts.tex) (./th_resources.tex<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">(c:/Program Files/Therion/texmf/tex/glyphtounicode.tex)) (./th_fontdef.tex{c:/P<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">rogram Files/Therion/texmf/fonts/pdftex.map})<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">(./th_formdef.tex<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt"><span style="background:yellow">Runaway text?<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:36pt"><span style="background:yellow">9178.9<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:36pt"><span style="background:yellow">! TeX capacity exceeded, sorry [main memory size=3500000].<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:36pt"><span style="background:yellow">l.165540 \PL{9178.94<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:36pt"><span style="background:yellow">                     283.21 m}%</span><u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">If you really absolutely need more capacity,<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">you can ask a wizard to enlarge me.<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p><p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p><p class="MsoNormal" style="margin-left:36pt">Here is how much of TeX's memory you used:<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">263 strings out of 95671<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">3772 string characters out of 1192323<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">3500001 words of memory out of 3500000<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">1667 multiletter control sequences out of 15000+50000<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">16503 words of font info for 54 fonts, out of 1000000 for 2000<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">844 hyphenation exceptions out of 5000<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">5i,1n,6p,289b,36s stack positions out of 5000i,500n,10000p,200000b,50000s<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">!  ==> Fatal error occurred, no output PDF file produced!<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt"><u></u> <u></u></p><p class="MsoNormal" style="margin-left:36pt">##################### end of pdftex log file #####################<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">C:\Program Files\Therion\therion.exe: error -- pdftex exit code -- 1<u></u><u></u></p><p class="MsoNormal" style="margin-left:36pt">writing xtherion file ... done<u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div>_______________________________________________<br>
Therion mailing list<br>
<a href="mailto:Therion@speleo.sk" target="_blank">Therion@speleo.sk</a><br>
<a href="https://mailman.speleo.sk/listinfo/therion" rel="noreferrer" target="_blank">https://mailman.speleo.sk/listinfo/therion</a><br>
</div></blockquote></div>