[Therion] th_formdef.tex runaway text error
Martin Budaj
m.budaj at gmail.com
Wed Aug 12 21:17:40 CEST 2026
Hi Bruce,
On Sun, Aug 9, 2026 at 12:43 AM <bruce at tomo.co.nz> wrote:
> 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!
>
...
> So if the limit is not 8000000, is there a limit?
>
> Or are there possible problems with going over 8000000?
>
Possibly some configuration defaults for pdfTeX in TeXLive were changed
without updating the comments in texmf.cnf.
I think maybe it's time to switch from pdfTeX to LuaTeX, which uses dynamic
memory allocation (so the limit is the amount of installed RAM). It's a
simple configuration change briefly described in the annex of the Thbook
(search for luatex). The downside is that LuaTeX is a bit slower than
pdfTeX, but it would be interesting to hear about your experience with it.
> 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)
>
>
That's weird. I could perhaps investigate it on your dataset.
Cheers
Martin
Any insights appreciated.
>
>
>
> Bruce
>
>
>
>
>
> *From:* Therion <therion-bounces at speleo.sk> *On Behalf Of *Martin Budaj
> *Sent:* Thursday, 21 May 2026 05:29
> *To:* List for Therion users <therion at speleo.sk>
> *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 <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
>
>
>
> _______________________________________________
> 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/20260812/4c5527f5/attachment.htm>
More information about the Therion
mailing list