Hi, I have recently changed backend of therion logging in this commit https://github.com/therion/therion/commit/5b60074328476b860ea35d48da0d6add48..., so that is maybe when it stopped working. But I see two reasons why this bug happens: 1. Original implementation did not explicitly flush the output stream, but it apparently relied on some implicit flushing, which the current implementation does not do. Fix would be to add an explicit flush. 2. Thlogfile output should get closed in its destructor, which would properly write all the data, but it is possibly never destructed. Solution would be to reimplement thlogfile as a proper singleton, not just a global variable. I can prepare a quick fix with 1., but 2. should also get fixed in the future. Matěj so 6. 1. 2024 v 0:18 odesílatel Bruce Mutton <bruce@tomo.co.nz> napsal:
Recently I’ve noticed some of my therion log files are truncated. They end prematurely.
Only happens with some thconfig files and while the location of the truncation is often consistent within each file, it can change with subsequent compile runs as well.
Noticed this while trying to debug a presumably unrelated issue.
Some examples below.
Any insights as to why this might happen?
Bruce
on Windows 10 Home v 22H2
Another example.
therion 6.2.0 (2023-12-21)
- using Proj 9.3.0, compiled against 9.3.0
initialization file: C:\Program Files\Therion/therion.ini
reading ... done
configuration file: thconfig-DwarfsDoor.thc
reading ... done
reading source files ... done
preprocessing database ... done
output coordinate system: EPSG:2193
meridian convergence (deg): -0.0685
geomag declinations (deg):
1992.1.1 21.3626
1993.1.1 21.3859
…and the log proceeds normally until a line is truncated mid-sentence…
0.27% 0.4m 146.4m 30 0.2m 0.0m 0.4m [sn45.31@118.MiddleEarth - 118.64 - 118.63 - 118.62 - 118.61 - 118.60 - 118.56 - 118.66 - 78.12 = 78.12@78.MiddleEarth - 78.11 - 78.10 - 78.9 - 78.8 - 78.7 - 78.6 - 78.5 - 78.4 - 78.3 - 78.2 - 78.1 - 77.12 = 77.12@77.MiddleEarth - 77.11
In this case some loops are missing and scrap distortions and CRS transformations are missing.
But the log file truncation can happen anywhere, as in the screenshot below…
_______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion