Hello again. I was going through my project, and stumbled upon an exception and am looking for clarification.
Here are the basics: I am using over a dozen layers as basemaps, which are set to draw from a tile cache. I then have about 19 other layers that aren’t cached. I am using GoogleMaps for a base layer, which is also pulling from cached tiles.
How it crashed: I decided to ‘play user’ and pan and zoom the map around quickly as if I were looking for something specific. After a little bit, it gave me the System.NullReferenceException and the following stack trace. I have also done the same thing and gotten an ObjectDisposedException.
My assumption: I am assuming that somewhere in the ThinkGeo back end, there is a process trying to call a reference to a tile that has been changed or no longer exists. However, I cannot fully see more information about it.
What I need to know: I am looking for a way to somehow track down the root cause of these types of exceptions or at the very least, have a way to handle them. Unfortunately, they do not happen in my main program so I cannot try to catch them and handle them. Is there some manner in which I would be able to get more access to your internal error handling to avoid shut downs like this? Basically, I am looking for a solution besides telling a user not to do something. Telling them not to pan quickly or zoom quickly because it will crash isn’t our best option.
at ThinkGeo.MapSuite.WpfDesktopEdition.Tile.<>c__DisplayClass6.<
DrawException
>b__4()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(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.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at WPS_Test.Application.Main() in C:\Users\colemanb\Desktop\Rover Files\ThinkGeo_Test\PHI_Test_Projection\WPS_Test\WPS_Test\obj\x86\Debug\Application.g.vb:line 65