With following test code and ThinkGeo version 14.2.1:
private async void mapView_Loaded(object sender, RoutedEventArgs e)
{
var mapView = sender as MapView;
// Set the Map's Unit to Meter.
mapView.MapUnit = GeographyUnit.Meter;
// Set the Current Extent to the Max Extent of ThinkGeo Map.
mapView.CurrentExtent = MaxExtents.ThinkGeoMaps;
// Add a base map overlay.
var baseOverlay = new ThinkGeoCloudRasterMapsOverlay("AOf22-EmFgIEeK4qkdx5HhwbkBjiRCmIDbIYuP8jWbc~",
"xK0pbuywjaZx4sqauaga8DMlzZprz0qQSjLTow90EhBx5D8gFd2krw~~", ThinkGeoCloudRasterMapsMapType.Light_V1_X1);
// Set up the tile cache for the base overlay, passing in the location and an ID to distinguish the cache.
baseOverlay.TileCache = new FileRasterTileCache(@".\cache", "basemap");
**baseOverlay.DrawingExceptionMode = DrawingExceptionMode.DrawException;**
// Add the newly created overlay to mapView.
mapView.Overlays.Add(baseOverlay);
// Refresh the Map
await mapView.RefreshAsync();
}
If network connection is disconnected after application start-up it crashes with HttpRequestException after around one hour with following stack trace:
[Exception] System.Net.Http.dll!System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(string host, int port, System.Net.Http.HttpRequestMessage initialRequest, bool async, System.Threading.CancellationToken cancellationToken) (Unknown Source:0)
[Exception] System.Net.Http.dll!System.Net.Http.HttpConnectionPool.ConnectAsync(System.Net.Http.HttpRequestMessage request, bool async, System.Threading.CancellationToken cancellationToken) (Unknown Source:0)
[Exception] System.Net.Http.dll!System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(System.Net.Http.HttpRequestMessage request, bool async, System.Threading.CancellationToken cancellationToken) (Unknown Source:0)
[Exception] System.Net.Http.dll!System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(System.Net.Http.HttpConnectionPool.RequestQueue<System.Net.Http.HttpConnection>.QueueItem queueItem) (Unknown Source:0)
[Exception] System.Net.Http.dll!System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(System.Net.Http.HttpRequestMessage request, bool async, bool doRequestAuth, System.Threading.CancellationToken cancellationToken) (Unknown Source:0)
[Exception] System.Net.Http.dll!System.Net.Http.RedirectHandler.SendAsync(System.Net.Http.HttpRequestMessage request, bool async, System.Threading.CancellationToken cancellationToken) (Unknown Source:0)
[Exception] System.Net.Http.dll!System.Net.Http.HttpClient.SendAsync.__Core|83_0(System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationTokenSource cts, bool disposeCts, System.Threading.CancellationTokenSource pendingRequestsCts, System.Threading.CancellationToken originalCancellationToken) (Unknown Source:0)
[Exception] ThinkGeo.Core.dll!GRU=.8h0=.KT8=.MoveNext() (Unknown Source:0)
[Exception] ThinkGeo.Core.dll!GRU=.8h0=.Lj8=.MoveNext() (Unknown Source:0)
System.Private.CoreLib.dll!System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() (Unknown Source:0)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ThrowAsync.AnonymousMethod__128_1(object state) (Unknown Source:0)
System.Private.CoreLib.dll!System.Threading.QueueUserWorkItemCallback.Execute() (Unknown Source:0)
System.Private.CoreLib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() (Unknown Source:0)
System.Private.CoreLib.dll!System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() (Unknown Source:0)
To me it seems that something is updated inside ThinkGeo after one hour and without network connection exception is thrown. Could you please help to investigate is there some possibility to prevent this crash ?
I did attach de-compiled ThinkGeo file throwing the exception. (it’s thrown from line 207 and was called from line 269)
BR, SimoThrowingClass.cs (5.6 KB)