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 <mailto: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 <mailto: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.
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
Dear Therion users, I am struggling to make a 3D model with terrain overlaid by a raster map. Everything is done according to the Thbook however Loch is only showing me a semi-transparent grid without any map overlay.
Here is what I put into my Surface.th file:
surface cs epsg:32637 #UTM zone 37N Datum WGS84 bitmap Khipsta_DEM_utm.jpg [0 0 634154.048728 4787812.294106 13345 10428 642161.048728 4794069.094106] # 0 0 - SW corner grid-units meter grid 634148.414 4787799.503 10 10 803 628 # x lower leftt, y lower left SW 1088.598 1088.548 1088.4978 1088.4384 1088.3688 1089.3929 1090.4301 1091.0236 1089.8979 1088.7723 1087.3954 1085.6592 1083.9077 1080.9875 1077.3958 1073.8142 1065.2386 1055.7455 1046.4127 1039.4907 1032.5994 1025.662 1018.52 1011.3781 1004.0082 996.3887 988.7744 982.0675 975.7867 969……. -------------------------------------------------------------------------------------------------------------------------------------------------------------- The corner point coords for the image: File "Khipsta_DEM_utm.jpg" Type "RASTER" (634154.048728, 4794069.094106) (0, 0) Label "NW", (634154.048728, 4787812.294106) (0, 10428) Label "SW", (642161.048728, 4794069.094106) (13345, 0) Label "NE", (642161.048728, 4787812.294106) (13345, 10428) Label "SE" CoordSys Earth Projection 8, 104, "m", 39, 0, 0.9996, 500000, 0 Units "m" If I comment ‘bitmap’ line the .lox file will be a lot smaller and vice versa if uncommented so I assume that overlay is being written into .lox Could this be due to the .jpg file size which is 10.5Mb? I was able to make 3D models with terrain overlay in the past but image size was under 10Mb. Many thanks, Andrey -- Kind regards, Andrey
Audrey I just compiled an old project surface with a 50MB jpg without problem, so file size is not your issue. Using a recent therion 6.2.0+fd5c1b6 (2024-01-10) In the image you can see what happens when the image does not cover the full surface grid. I’ve not looked at your numbers, but from your description perhaps the image position falls outside of your grid, and so you get something that looks like the left side of my image? Maybe your grid needs a grid-flip none/vertical/horizontal? I think the surface object needs to be inside a survey object, at least my one is. Bruce From: Therion <therion-bounces@speleo.sk> On Behalf Of Andrey via Therion Sent: Saturday, 13 January 2024 10:48 To: List for Therion users <therion@speleo.sk> Cc: Andrey <drunews@mail.ru> Subject: [Therion] Calibrating surface map Dear Therion users, I am struggling to make a 3D model with terrain overlaid by a raster map. Everything is done according to the Thbook however Loch is only showing me a semi-transparent grid without any map overlay. Here is what I put into my Surface.th file: _____ surface cs epsg:32637 #UTM zone 37N Datum WGS84 bitmap Khipsta_DEM_utm.jpg [0 0 634154.048728 4787812.294106 13345 10428 642161.048728 4794069.094106] # 0 0 - SW corner grid-units meter grid 634148.414 4787799.503 10 10 803 628 # x lower leftt, y lower left SW 1088.598 1088.548 1088.4978 1088.4384 1088.3688 1089.3929 1090.4301 1091.0236 1089.8979 1088.7723 1087.3954 1085.6592 1083.9077 1080.9875 1077.3958 1073.8142 1065.2386 1055.7455 1046.4127 1039.4907 1032.5994 1025.662 1018.52 1011.3781 1004.0082 996.3887 988.7744 982.0675 975.7867 969……. -------------------------------------------------------------------------------------------------------------------------------------------------------------- The corner point coords for the image: File "Khipsta_DEM_utm.jpg" Type "RASTER" (634154.048728, 4794069.094106) (0, 0) Label "NW", (634154.048728, 4787812.294106) (0, 10428) Label "SW", (642161.048728, 4794069.094106) (13345, 0) Label "NE", (642161.048728, 4787812.294106) (13345, 10428) Label "SE" CoordSys Earth Projection 8, 104, "m", 39, 0, 0.9996, 500000, 0 Units "m" If I comment ‘bitmap’ line the .lox file will be a lot smaller and vice versa if uncommented so I assume that overlay is being written into .lox Could this be due to the .jpg file size which is 10.5Mb? I was able to make 3D models with terrain overlay in the past but image size was under 10Mb. Many thanks, Andrey -- Kind regards, Andrey
Hello Andrey, Are you able to see _any_ bitmap overlays in other loch models? I had an issue long ago where an issue with my video card caused textures to load incorrectly or not at all. Also, in the scene settings options in loch, do you have it set to actually show the bitmap overlay? Cheers, Jonny On Fri, Jan 12, 2024, 5:22 PM Andrey via Therion <therion@speleo.sk> wrote:
Dear Therion users,
I am struggling to make a 3D model with terrain overlaid by a raster map.
Everything is done according to the Thbook however Loch is only showing me a semi-transparent grid without any map overlay.
Here is what I put into my Surface.th file:
------------------------------ surface cs epsg:32637 #UTM zone 37N Datum WGS84
bitmap Khipsta_DEM_utm.jpg [0 0 634154.048728 4787812.294106 13345 10428 642161.048728 4794069.094106] # 0 0 - SW corner
grid-units meter grid 634148.414 4787799.503 10 10 803 628 # x lower leftt, y lower left SW 1088.598 1088.548 1088.4978 1088.4384 1088.3688 1089.3929 1090.4301 1091.0236 1089.8979 1088.7723 1087.3954 1085.6592 1083.9077 1080.9875 1077.3958 1073.8142 1065.2386 1055.7455 1046.4127 1039.4907 1032.5994 1025.662 1018.52 1011.3781 1004.0082 996.3887 988.7744 982.0675 975.7867 969…….
--------------------------------------------------------------------------------------------------------------------------------------------------------------
The corner point coords for the image: File "Khipsta_DEM_utm.jpg" Type "RASTER" (634154.048728, 4794069.094106) (0, 0) Label "NW", (634154.048728, 4787812.294106) (0, 10428) Label "SW", (642161.048728, 4794069.094106) (13345, 0) Label "NE", (642161.048728, 4787812.294106) (13345, 10428) Label "SE" CoordSys Earth Projection 8, 104, "m", 39, 0, 0.9996, 500000, 0 Units "m"
If I comment ‘bitmap’ line the .lox file will be a lot smaller and vice versa if uncommented so I assume that overlay is being written into .lox
Could this be due to the .jpg file size which is 10.5Mb?
I was able to make 3D models with terrain overlay in the past but image size was under 10Mb.
Many thanks, Andrey
-- Kind regards, Andrey
_______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Hello Jonny, Thanks for the hint! I’ve tried to open few old models which were surely working and half of them did not show any map texture. Trying to open the same models on other computer proved that they all work fine. There must be something wrong with graphics on my laptop. Will try updating drivers etc. Cheers, Andrey
Суббота, 13 января 2024, 18:36 UTC от Jonny Prouty <jonathanprouty@gmail.com>: Hello Andrey, Are you able to see _any_ bitmap overlays in other loch models? I had an issue long ago where an issue with my video card caused textures to load incorrectly or not at all. Also, in the scene settings options in loch, do you have it set to actually show the bitmap overlay? Cheers, Jonny On Fri, Jan 12, 2024, 5:22PM Andrey via Therion < therion@speleo.sk > wrote:
Dear Therion users, I am struggling to make a 3D model with terrain overlaid by a raster map. Everything is done according to the Thbook however Loch is only showing me a semi-transparent grid without any map overlay.
Here is what I put into my Surface.th file:
surface cs epsg:32637 #UTM zone 37N Datum WGS84 bitmap Khipsta_DEM_utm.jpg [0 0 634154.048728 4787812.294106 13345 10428 642161.048728 4794069.094106] # 0 0 - SW corner grid-units meter grid 634148.414 4787799.503 10 10 803 628 # x lower leftt, y lower left SW 1088.598 1088.548 1088.4978 1088.4384 1088.3688 1089.3929 1090.4301 1091.0236 1089.8979 1088.7723 1087.3954 1085.6592 1083.9077 1080.9875 1077.3958 1073.8142 1065.2386 1055.7455 1046.4127 1039.4907 1032.5994 1025.662 1018.52 1011.3781 1004.0082 996.3887 988.7744 982.0675 975.7867 969……. -------------------------------------------------------------------------------------------------------------------------------------------------------------- The corner point coords for the image: File "Khipsta_DEM_utm.jpg" Type "RASTER" (634154.048728, 4794069.094106) (0, 0) Label "NW", (634154.048728, 4787812.294106) (0, 10428) Label "SW", (642161.048728, 4794069.094106) (13345, 0) Label "NE", (642161.048728, 4787812.294106) (13345, 10428) Label "SE" CoordSys Earth Projection 8, 104, "m", 39, 0, 0.9996, 500000, 0 Units "m" If I comment ‘bitmap’ line the .lox file will be a lot smaller and vice versa if uncommented so I assume that overlay is being written into .lox Could this be due to the .jpg file size which is 10.5Mb? I was able to make 3D models with terrain overlay in the past but image size was under 10Mb. Many thanks, Andrey -- Kind regards, Andrey _______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion -- Kind regards, Andrey
Hi all, I have a similar behavior, for some of my huge lox files, the map texture does not show on the DEM when loaded. But if I push the Ω-button « entrances », the overlay loads. They open OK with Caveview. If it is needed to find the bug, I am running Therion and Loch on a MacOS 12.6.9, and I have installed Therion and Loch from sources: $ therion --version therion 6.1.7+dev (compiled on 2023-06-02) - using Proj 9.3.1, compiled against 9.2.1 Loch version 6.1.7 (compiled on 2023-06-02) Cheers Xavier
Le 14 janv. 2024 à 00:57, Andrey via Therion <therion@speleo.sk> a écrit :
Hello Jonny,
Thanks for the hint!
I’ve tried to open few old models which were surely working and half of them did not show any map texture.
Trying to open the same models on other computer proved that they all work fine. There must be something wrong with graphics on my laptop. Will try updating drivers etc.
Cheers, Andrey
Суббота, 13 января 2024, 18:36 UTC от Jonny Prouty <jonathanprouty@gmail.com>:
Hello Andrey,
Are you able to see _any_ bitmap overlays in other loch models? I had an issue long ago where an issue with my video card caused textures to load incorrectly or not at all.
Also, in the scene settings options in loch, do you have it set to actually show the bitmap overlay?
Cheers, Jonny
On Fri, Jan 12, 2024, 5:22PM Andrey via Therion <therion@speleo.sk <x-msg://e.mail.ru/compose/?mailto=mailto%3atherion@speleo.sk>> wrote: Dear Therion users,
I am struggling to make a 3D model with terrain overlaid by a raster map.
Everything is done according to the Thbook however Loch is only showing me a semi-transparent grid without any map overlay.
Here is what I put into my Surface.th file:
surface cs epsg:32637 #UTM zone 37N Datum WGS84
bitmap Khipsta_DEM_utm.jpg [0 0 634154.048728 4787812.294106 13345 10428 642161.048728 4794069.094106] # 0 0 - SW corner
grid-units meter grid 634148.414 4787799.503 10 10 803 628 # x lower leftt, y lower left SW 1088.598 1088.548 1088.4978 1088.4384 1088.3688 1089.3929 1090.4301 1091.0236 1089.8979 1088.7723 1087.3954 1085.6592 1083.9077 1080.9875 1077.3958 1073.8142 1065.2386 1055.7455 1046.4127 1039.4907 1032.5994 1025.662 1018.52 1011.3781 1004.0082 996.3887 988.7744 982.0675 975.7867 969……. --------------------------------------------------------------------------------------------------------------------------------------------------------------
The corner point coords for the image: File "Khipsta_DEM_utm.jpg" Type "RASTER" (634154.048728, 4794069.094106) (0, 0) Label "NW", (634154.048728, 4787812.294106) (0, 10428) Label "SW", (642161.048728, 4794069.094106) (13345, 0) Label "NE", (642161.048728, 4787812.294106) (13345, 10428) Label "SE" CoordSys Earth Projection 8, 104, "m", 39, 0, 0.9996, 500000, 0 Units "m"
If I comment ‘bitmap’ line the .lox file will be a lot smaller and vice versa if uncommented so I assume that overlay is being written into .lox
Could this be due to the .jpg file size which is 10.5Mb?
I was able to make 3D models with terrain overlay in the past but image size was under 10Mb.
Many thanks, Andrey
-- Kind regards, Andrey
_______________________________________________ Therion mailing list Therion@speleo.sk <x-msg://e.mail.ru/compose/?mailto=mailto%3aTherion@speleo.sk> https://mailman.speleo.sk/listinfo/therion <https://mailman.speleo.sk/listinfo/therion>
-- Kind regards, Andrey
_______________________________________________ Therion mailing list Therion@speleo.sk <mailto:Therion@speleo.sk> https://mailman.speleo.sk/listinfo/therion <https://mailman.speleo.sk/listinfo/therion>
participants (5)
-
Andrey -
Bruce Mutton -
Jonny Prouty -
Matěj Plch -
Xavier Robert