question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[WPF] "Point is empty" exception on MapControl.Info event

See original GitHub issue

Windows 10 Pro Visual Studio Community 2019 16.11.5 .NET Core 3.1 Mapsui.Wpf 3.0.1

Test project: MapsuiTest.zip Steps to reproduce:

  1. Set breakpoint in MapControlOnInfo method
  2. Run in debug mode
  3. Left mouse click on map
  4. Continue running (F5)
  5. Press LeftCtrl key while moving the mouse
  6. Exception: image
System.Exception
  HResult=0x80131500
  Message = Point is empty
  Source = Mapsui.Geometries
  StackTrace:
   at Mapsui.Geometries.Point.get_X()
   at Mapsui.UI.Wpf.MapControl.DrawBbox(Point newPos)
   at Mapsui.UI.Wpf.MapControl.MapControlMouseMove(Object sender, MouseEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   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.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.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()
   at MapsuiTest.App.Main()

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pauldendulkcommented, Oct 17, 2021

I pushed a fix to develop/3.0. Since this only affects developers I will hold out a patch release until other bug come up.

0reactions
IldarKhayrutdinovcommented, Oct 17, 2021

@pauldendulk Thanks for developing Mapsui! I’m happy to be helpful

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mapsui Error: How to fix PresentationSource is null?
I received this error in a WPF view hosting a usercontrol containing the Mapsui mapcontrol in WPF MVVM application. System.Exception HResult= ...
Read more >
Map for WPF - ArgumentOutOfRangeException is thrown ...
Hello,. To Note: This is not specific to the MapEditor and Adorners, it can happen on any Map item with a bound property....
Read more >
WPF MapControl - Info event NumTaps is always 1 #1677
Describe the bug. When the Info event is triggered in the WPF Map Control, the NumTaps property is always set to 1. To...
Read more >
Map crash while disposing in UI for WPF
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...
Read more >
Binding the map control in MVVM?
I had a double mouseclick event on my map which got the position and returned the mapPoint to a text box which worked...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found