Map crash while disposing

3 posts, 0 answers
  1. Peter
    Peter avatar
    41 posts
    Member since:
    Oct 2016

    Posted 12 Apr Link to this post

    We've seen a crash in our application when the RadMap control is disposed. We've only seen the crash once but have been unable to reproduce. The stack trace is as follows:

    Telerik.Windows.Controls.DataVisualization : System.NullReferenceException
    Object reference not set to an instance of an object.

    at Telerik.Windows.Controls.Map.Location.PixelToLogical(RadMap mapControl, Point pixel, Boolean useTileLayer)

    at Telerik.Windows.Controls.Map.Location.PixelToLogical(RadMap mapControl, Point pixel, Boolean useTileLayer)
    at Telerik.Windows.Controls.Map.MapMouseLocationIndicator.MapControl_MouseMove(Object sender, MouseEventArgs e)
    at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
    at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
    at System.Windows.Input.InputManager.ProcessStagingArea()
    at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
    at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
    at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
    at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at System.Windows.Interop.HwndSource.InputFilterMessage(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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, 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.Application.RunDispatcher(Object ignore)
    at System.Windows.Application.RunInternal(Window window)
    at CNL.IPSecurityCenter.WindowsClient.App.Main()

    We're currently using version 2017.2.614.45. Looking at the Telerik code it seems like the mouse event handler for MapMouseLocationIndicator doesn't get detached when RadMap is disposed. Is it possible there's some race condition that allows a mouse event to be processed in MapMouseLocationIndicator after its RadMap property has been set to null (which does happen when RadMap is disposed)?

    Thanks
    Pete

  2. Peter
    Peter avatar
    41 posts
    Member since:
    Oct 2016

    Posted 10 May in reply to Peter Link to this post

    No update on this post since I raised it on 12th April. Would I be better raising a support ticket?

    Pete

  3. Vladimir Stoyanov
    Admin
    Vladimir Stoyanov avatar
    390 posts

    Posted 15 May Link to this post

    Hello Pete,

    Thank you for the provided stacktrace. 

    I went through our backlog, however I am afraid that we have not received reports of such an exception. With this in mind and without being able to reproduce it, it is difficult to pinpoint what could be the reason for the exception based on the stacktrace only.

    May I ask you to elaborate on the following questions? Can you share some sample xaml/code of the application's structure and mainly how the RadMap is defined? May I also ask you to elaborate on when and how is the RadMap disposed? This way I will hopefully be able to reproduce the observed behavior on my end and investigate it.

    Thank you in advance for any help you can provide.

    Regards,
    Vladimir Stoyanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top