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 <https://github.com/therion/therion> - cave surveying software, 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
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@speleo.sk> On Behalf Of bruce@tomo.co.nz Sent: Monday, 30 March 2026 15:51 To: 'List for Therion users' <therion@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 <https://github.com/therion/therion> - cave surveying software, 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
I tried iccaving/migovec-survey-data: Cave survey data for the Migovec System in Slovenia <https://github.com/iccaving/migovec-survey-data> to see if the three overview thconfigs might display this behaviour. The longest compilations are about 45 km, and trialling of various colour map-fg combinations and scales as below did not trigger any cases of this error. Back to looking at my own dataset I suppose. Bruce From: Therion <therion-bounces@speleo.sk> On Behalf Of bruce@tomo.co.nz Sent: Sunday, 19 April 2026 17:20 To: 'List for Therion users' <therion@speleo.sk> Subject: [Therion] th_formdef.tex runaway text error 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@speleo.sk <mailto:therion-bounces@speleo.sk>
On Behalf Of bruce@tomo.co.nz <mailto:bruce@tomo.co.nz> Sent: Monday, 30 March 2026 15:51 To: 'List for Therion users' <therion@speleo.sk <mailto:therion@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 <https://github.com/therion/therion> - cave surveying software, 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
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@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@speleo.sk> *On Behalf Of * bruce@tomo.co.nz *Sent:* Monday, 30 March 2026 15:51 *To:* 'List for Therion users' <therion@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@speleo.sk https://mailman.speleo.sk/listinfo/therion
Thankyou Martin B Editing texmf.cnf seems to have solved my problem (only limited testing so far – but thought I should acknowledge your work). And Martin Luethi, you were on to it, but I forgot Therion users had control of memory availability, and in any case, I would not have known quite which parameters to change. Very happy Bruce From: Therion <therion-bounces@speleo.sk> On Behalf Of Martin Budaj Sent: Thursday, 21 May 2026 05:29 To: List for Therion users <therion@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
Good morning An update on this conversation [Therion] th_formdef.tex runaway text error <https://www.mail-archive.com/therion@speleo.sk/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 <therion-bounces@speleo.sk> On Behalf Of Martin Budaj Sent: Thursday, 21 May 2026 05:29 To: List for Therion users <therion@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@tomo.co.nz <mailto:bruce@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
Hi Bruce, On Sun, Aug 9, 2026 at 12:43 AM <bruce@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@speleo.sk> *On Behalf Of *Martin Budaj *Sent:* Thursday, 21 May 2026 05:29 *To:* List for Therion users <therion@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@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@speleo.sk https://mailman.speleo.sk/listinfo/therion
participants (2)
-
bruce@tomo.co.nz -
Martin Budaj