I have a .Net Core application that attempts to show a map in a dialog at a particular viewport. It seems to occasionally encounter the following errors resulting in areas of the map not rendering.
Exception thrown: 'System.IO.IOException' in System.Private.CoreLib.dll
Exception thrown: 'System.Net.Http.HttpRequestException' in System.Net.Http.dll
Bizarrely the same code in the .Net Framework version works without issue.
I've created a couple of test projects that illustrate the problem. It simply creates and displays a map in the window when a button is clicked. The code looks like:
public partial class MapView : UserControl{
public MapView()
{
InitializeComponent();
var map = new Map(Basemap.CreateStreetsVector());
MapPoint mapPoint = new MapPoint(-4.27873, 53, SpatialReferences.Wgs84);
Viewpoint vp = new Viewpoint(mapPoint, 3000);
map.InitialViewpoint = vp;
Map.Map = map;
}
}
I'm using version 100.11.2 and it also fails on 100.10.
Any help would be appreciated. Thanks
Solved! Go to Solution.
This issue was challenging to reproduce. But we did eventually detect occasional occurrences of the same exception in our automated daily tests and and have made some associated improvements to our .NET Core / .NET 5 request caching which should resolve this issue.
We would be very grateful if you can you retest in the upcoming v100.12 release and confirm.
Thanks
Can you attach the test project?
Thanks
Thanks for replying.
Our current theory is that our virus checker is locking files the map is attempting to display. In investigating further we were seeing this happening in maps that we were not displaying in a dialog as well.
Hi,
Can you try disabling the request caching to see if this makes a difference?
Note this is for testing/diagnosis purposes only because disabling the cache will have a significant performance impact.
Add this line before any the ArcGIS Runtime makes any requests, e.g. in your App.xaml.cs class.
AppContext.SetSwitch("Switch.Esri.ArcGISRuntime.DisableRequestCache", true);
Thanks
Hi
Sorry for the late reply.
Your suggestion seems to prevent the issue.
Just to add to this that we are seeing this issue in the Arcgis Runtime SDK sample app as well. Also adding the directory to the exception list in our virus checker doesn't seem to prevent this from occurring suggesting our initial theory might be wrong.
Hi,
I've added an issue to our backlog to investigate and attempt to identify what might cause this issue.
Thanks
Hi
Thanks for this.
If it helps you can see the issue in the ArcGis Runtime SDK for .NET (WPF) sample app if you zoom in to a certain level and change basemap. I can record an example if required. We also notice this on a non work based PC.
I don't suppose you have a link for the issue so we can track the progress on this?
Thanks
A recording would really help us understand what you're seeing. If you're not able to upload here, please share it with me via mbranscomb@esri.com.
We don't have a public link for this yet since it's just in triage at this stage - if it turns out to be an issue in the cache implementation that we need to resolve then we can share a public bug reference.
Thanks
This issue was challenging to reproduce. But we did eventually detect occasional occurrences of the same exception in our automated daily tests and and have made some associated improvements to our .NET Core / .NET 5 request caching which should resolve this issue.
We would be very grateful if you can you retest in the upcoming v100.12 release and confirm.
Thanks