Select to view content in your preferred language

Map tiles not loading creating a new map

2648
10
Jump to solution
07-08-2021 10:04 AM
Gr0bert0
Emerging Contributor

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

0 Kudos
1 Solution

Accepted Solutions
MichaelBranscomb
Esri Frequent Contributor

@Gr0bert0 

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

View solution in original post

0 Kudos
10 Replies
MichaelBranscomb
Esri Frequent Contributor

Can you attach the test project?

 

Thanks

0 Kudos
Gr0bert0
Emerging Contributor

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.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

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

0 Kudos
Gr0bert0
Emerging Contributor

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.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

I've added an issue to our backlog to investigate and attempt to identify what might cause this issue.

Thanks

Gr0bert0
Emerging Contributor

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

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

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 

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

@Gr0bert0 

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

0 Kudos
Gr0bert0
Emerging Contributor

@MichaelBranscomb 

That's great thanks.

I'll let you know how our test go.

0 Kudos