ThinkGeo.com    |     Documentation    |     Premium Support

Another FeatureSource is not open. Please call the Open method before calling this method

I have not been able to escape this problem. The stack trace is below:

  System.InvalidOperationException: The FeatureSource is not open.   Please call the Open method before calling this method.
   at ThinkGeo.MapSuite.Wpf.Tile.DrawException(GeoCanvas geoCanvas, Exception exception)
   at ThinkGeo.MapSuite.Wpf.Tile.Draw(GeoCanvas geoCanvas)
   at ThinkGeo.MapSuite.Wpf.Tile.tVk=(Object status)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

I have exception handlers in all places where I can place them to prevent the map from crashing my application. Can someone please help?

Thanks Klaus
Base on the error message. You need call open method before use the object. Do you have more context for this issue. If we swallow the exception the drawing method will keep threw error again. So we’d fix the error by call the open method before do further action.

Thanks

Frank

Frank, thanks for the response. I am opening the layer upon construction. Will see if I can capture more context. It happens at random moments in the application.

Klaus
I was have the same issues. It was caused another update in my case. If I create layer not in the MainFrame_Load but when prog already run, than I need call Layer.Open() method before using this layer. Try to check all yours created layers is opened.
Slava

Thanks Slava.
Good to know this one.

Thanks

Frank