Map ignores Graphics layers

3203
4
07-05-2015 01:06 AM
AlexanderGleyzer
New Contributor

Hi.

We are experiencing a problem with the ArcGIS Runtime (desktop) MapView WPF control. Unfortunately our code is extremely large and we are unable to post it here.

Basically, the problem is as follows: we have a WinForm that has a WPF User Control containing a MapView. This form is opened and closed repeatedly throughout the program life cycle. After opening & closing the form several times, the Graphics from all GraphicsLayers disappear. Logically, they are still there, with valid information (visibility, renderers, symbols, spatial references, correct geometries).

Also, after the graphics disappear, the program crashes upon calling HitTestAsync on map control. It's a NUllReferenceException, and here is its Stack Trace: 

at Esri.ArcGISRuntime.Layers.GraphicsLayer.d__1e.MoveNext()

--- End of stack trace from previous location where exception was thrown --- 

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 

at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 

at GISRuntime.Map.Components.MapManager.d__b.MoveNext() in...

Additional notes:

* Typically, it takes around 4-5 times of closing/reopening for the graphics to disappear. However this number may vary from 2 to 20+.

* We have not seen any difference, property-wise, in the Map View control once the graphics disappear.

* We have another (overview) Map View control whose Graphics continue to be shown after the main map's graphics disappear. We have compared their properties and they are identical.

Please, advise.

Thanks,

Alexander Gleyzer

0 Kudos
4 Replies
AsserSwelam1
Occasional Contributor

Hi Alexander,

Which RenderingMode are you using for your graphics layer? for large graphics number it is recommended to use Static mode. If you using static mode and still see the problem, can you create a simple app reproducing the problem and send it to us so we can have close look.

Thanks,

Asser

0 Kudos
AlexanderGleyzer
New Contributor

Hello, Asser.

We're using Static mode for all our Graphic layers.

Unfortunately, we cannot create a simple app reproducing the problem, since the business logic and the data flows are quite complex.

Can you still estimate what could be the problem?

For instance, what could be the reason for HItTestAsync crash?

Thanks,

Alexander.

0 Kudos
AsserSwelam1
Occasional Contributor

Hi Alexander,

With how you described the problem, it could be many things that cause the issue which make it really hard to tell. And for the graphics disappear and the HitTest crash it seems like an API issue.

I will try to create a similar app to reproduce the problem.

Also in the coming release (so soon) we have done a lot of performance enhancement and bug fixes related to map rendering and HitTest, so once it is available, please update us if you still seeing the same issue with the new version.

Thanks,

Asser

0 Kudos
dotMorten_esri
Esri Notable Contributor

There has been some fixes similar to this in 10.2.6. Could you try it with the latest 10.2.6 release?

0 Kudos