question

GirayGence-9562 avatar image
0 Votes"
GirayGence-9562 asked GirayGence-9562 commented

[UWP] [MapControl] App crash

Hello,

I added UWP MapControl to my app. While zooming/dragging, after a while, the map gets slower and then the app crashes. Then, I added a MapControl to an empty UWP project for trying purposes. I tried to get the same error/crash, by zooming/dragging so hard, it took a longer time to crash but that one also crashed. Furthermore, I took the same error/crash in UWP MapControl samples (MapControl), but again it took a long time with hard zooming/dragging.
Sometimes after hard zooming/dragging for a while, app does not crash but screen becomes black and PC becomes unavailable for couple of seconds.

Errors are similar but a bit different:
My app:
194660-err.jpg

Microsoft UWP MapControl sample:
194763-err-sample.jpg


OS: Windows 11
UWP Target Version(for both): Windows 11(10.0; Build 22000)


windows-uwpwindows-maps
err.jpg (310.3 KiB)
err-sample.jpg (125.1 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

When you are trying to test in an empty UWP project, did you add any other code in it, or it just contains a MapControl in the Xaml without any code in the code-behind? Also, could you please tell me how long it takes when you are zooming/dragging the MapControl?

0 Votes 0 ·
  • Yes, it just contains a MapControl without any code. Basically, I created a blank UWP project, then, I added a MapControl in MainPage.xaml

  • In my project it takes like 1 minute, in the empty project it was longer, like maybe up to 10 minutes. Also, just an observation, with a large screen (27") it was easier to produce the crash


0 Votes 0 ·
IoTGirl avatar image IoTGirl GirayGence-9562 ·

Have you tried starting with one of the samples instead? https://docs.microsoft.com/en-us/samples/microsoft/windows-universal-samples/mapcontrol/

0 Votes 0 ·
Show more comments

1 Answer

DuncanLawler-3885 avatar image
1 Vote"
DuncanLawler-3885 answered GirayGence-9562 commented

The callstack looks like the D3D rendering device was lost and was unable to be recreated. This can be caused by a buggy device driver for your video card. The map control uses D3D for rendering and is unable to function if the 3D device is unavailable.
I would suggest making sure this system is updated to the latest video drivers available, and you are not doing other 3D graphics rendering at the same time. It's also possible it's a simple resource issue - not all video hardware is capable of rendering the map canvas well, and it's difficult to detect this at runtime.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@GirayGence-9562 Can you confirm you have:
1. Forced a driver update on your computer to get the latest video driver
2. Tried the UWP app sample to see if it behaves any differently than yours

Sincerely, IoTGirl

0 Votes 0 ·

I updated my DirectX driver and now the issue is solved thanks! But, still, I would be more happy if there will be no issue with MapContol and some old DirectX drivers, since the app we are developing is used by tens of thousands clients and it would be a bad impression to have a conversation with clients like -"app is crashed" -"please update your DirectX driver"

0 Votes 0 ·