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:
--- 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 GISRuntime.Map.Components.MapManager.d__b.MoveNext() in...
* 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.