ThinkGeo.com    |     Documentation    |     Premium Support

Issue with GroupAsyncLayer

I have just observed an issue with the GroupAsyncLayer. We have a GroupAsyncLayer, and then create a new GroupAsyncLayer and add it to the first GroupAsyncLayer’s Layers collection. Finally, we add a shapefile to the Layers collection of the 2nd GroupAsyncLayer’s Layers collection. The first GroupAsyncLayer then continuously throws the following exception:

System.InvalidOperationException: A task may only be disposed if it is in a completion state (RanToCompletion, Faulted or Canceled).
at System.Threading.Tasks.Task.Dispose(Boolean disposing)
at System.Threading.Tasks.Task.Dispose()
at ThinkGeo.Core.GroupAsyncLayer.d__10.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ThinkGeo.Core.AsyncLayer.d__7.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ThinkGeo.Core.AsyncLayer.d__6.MoveNext()

We are using this configuration to display raster images in our application and it is causing many problems. I have attached a sample project.

Thanks for your help!

Steve
ThinkGeo_14_Demo.zip (2.9 MB)

Hi Steve,

This was recreated and fixed in beta105, and it will be fixed in the upcoming v14.5.4

Thanks,
Ben