During the upgrade of our winforms application from 10.2.5 to 100.2 the starting of the local map service (working with a MPK file) would regularly fail within Visual Studio after working for a couple of hours with no issues. The Esri.ArcGISRuntime.LocalServices.LocalMapService StartAsync call would return 'A task was cancelled'.
I can force the same behaviour on our test environment by opening map windows within multiple copies of our application at the same time. There is plenty of free memory available when this happens. The stack trace is:
at Esri.ArcGISRuntime.LocalServices.LocalService.<StartServiceInternal>d__25.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.GetResult()
at ...SpatialMapControl.VB$StateMachine_128_LoadAsync.MoveNext() in ..\SpatialMapControl.xaml.vb:line 418
If possible it would be good to get an understanding of why this might happen so that we can try to reduce the likelihood of this occurring in a production environment.