Here is an issue that took me too many days to unravel.
The order of source statements in a thconfig affects the outcome of the compilation.
I think the problem, or constraint, can be described as:
For example, a thconfig contains:
source ./Greenlinkcave/INDEXGreenlink.th
source ./swissmaidcave/INDEXSwissMaid.th
source
#join the two cave surveys without an index file
equate 133@jp.SwissM I68@s.Greenlink
equate 156@second.SwissM S45@ss.Greenlink
equate 144@jp.SwissM H32@h.Greenlink
endsource
source ./middleearthcave/INDEXMiddleEarth.th
source
#join the two cave surveys without an index file
equate F76@f.MiddleEarth F102@f2.Greenlink
endsource
This results in a fatal error:
reading source files ... done
preprocessing database ... done
C:\Program Files\Therion\therion.exe: error -- ./middleearthcave/INDEXMiddleEarth.th [24] -- survey does not exist -- 74
Which confused me because each of these would compile alone an in combination via other thconfig files.
If I changed the order of the source statements, the ‘non-existent’ survey would change.
I tried 6.2.0 + fd5c1b6 and 6.17 and 6.13 all with similar effect (although I’m not that confident because the latter two being 32-bit and toggling between the 64-bit 6.2.0 variants results in duplicate therion programs on my Windows machine, thus I’m not sure I have ‘clean’ installs).
Too late, I tried putting all the single line sources first, followed by the multi-line sources, and viola, success.
So this seems like a bug, in that I understand Therion should read all sources before processing the survey and map input. With sources, this seems not to be happening, and Therion is crashing inappropriately if the sources are not listed in the ‘correct’ order.
Bruce
PS: Yes, I know the example above is a rather messy way of treating sources. I would not usually do this – it is a hack to work around an unfortunate decision made early in the project history.