Hi Ben
After the first quick tests it seems that both suggestions are working.
About item 1: the crash with RefreshAsync
I tested my demo application (which was crashing before) with both suggestions:
a) Using ThinkGeo version 14.4.0-beta085
b) Using ThinkGeo 14.3.2 and replacing GdalProjectionConverter with ProjectionConverter
In both cases I was not able to make the demo application crash. I will update my main application and perform more tests, but the first impression is that it is working.
About item 2: delay and exception when closing
The code OSGeo.GDAL.Gdal.GDALDestroyDriverManager(); added in the windows closing event seems to resolve both the delay and the exception (0xc0000005) when closing.
Note that since I am showing the raster map in a child window I had to call the method in closing event of the main window. If the GDALDestroyDriverManager is called in the closing event of the child window then ThinkGeo will raise the following exception next time the child windows is open again:
Error opening the raster file: D:\Test\DemoRasterMapCrash\DemoRasterMap\bin\Debug\net9.0-windows\Maps\Sonderborg_ECW_Test.ecw
System.ApplicationException: No driver registered.
at OSGeo.GDAL.Gdal.Open(String utf8_path, Access eAccess)
at ThinkGeo.Core.GdalRasterSource.OpenCore()
at ThinkGeo.Core.RasterSource.Open()
at DemoRasterMap.MapWindow.Discover(String _filename, String& _projection, String& _worldFile) in D:\Test\DemoRasterMapCrash\DemoRasterMap\MapWindow.xaml.cs:line 1326
At the moment seems that both issues are solved by the suggestions. It seems they was 2 separate issues.
It is my plan to add the call OSGeo.GDAL.Gdal.GDALDestroyDriverManager() in the main windows closing event, to replace GdalProjectionConverter with ProjectionConverter and to continue with ThinkGeo version 14.3.2 (instead of wait for 14.4) in order to be able to release an hotfix as soon as possible.
Thanks for the help
Best regards
Domenico