UWP application with MapControl crashes without raising the UnhandledException event

Jeremiah Mercier 21 Reputation points
2022-09-29T21:06:44.303+00:00

We have a complicated UWP application that crashes periodically/randomly for customers. We've also experienced the crashes in-house, but despite numerous attempts, we've been unable to find any pattern or reproduce the issue with any consistency. Since we are unable to reproduce the issue, we are likewise unable to create a simple repro.

We have logging in the Application.UnhandledException event handler that we've used to correct a variety of other unhandled exceptions. Despite following guidance to flush the logs, nothing is logged to Application Insights or App Center for these crashes, which leads me to believe the failure occurs in unmanaged/native code and never raises the UnhandledException event.

I captured full crash dumps using Windows Error Reporting on the last two occurrences, but they haven't yielded any helpful information and we don't have anyone who is experienced with interpreting crash dumps.

I can say that the exception is "Unhandled exception at 0x... (JpMapControl.dll) in filename.dmp: 0xC0000420: Assertion Failure."

The call stack is:

  JpMapControl.dll!JpRouterAdapter::FailFast(char const *) Unknown  
  MapControlCore.dll!TDispatchQueue<struct IRouterHost>::Dispatch(struct IRouterHost *,bool *) Unknown  
  MapControlCore.dll!TDispatchQueue<struct IRouterUI>::DispatchMultiple(struct IRouterUI *,unsigned int) Unknown  
  JpMapControl.dll!JpDispatchQueueProcessor<class JpRouterAdapter>::s_ProcessDispatchQueue(void *) Unknown  
  ntdll.dll!RtlpTpWorkCallback() Unknown  
  ntdll.dll!TppWorkerThread() Unknown  
  kernel32.dll!BaseThreadInitThunk () Unknown  
  ntdll.dll!RtlUserThreadStart () Unknown  

We use the UWP MapControl within three user controls which are used in two views and a dialog, but neither of the views nor the dialog were accessed prior to the crash, so I don't understand why there would be any reference to the map whatsoever.

This appears to be a bug in the control. Any chance of a bug fix? Or a workaround to avoid it?

The crash dumps are available here:

MyApplication.exe.21320.dmp
MyApplication.exe.44476.dmp

Universal Windows Platform (UWP)
Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
257 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Jeremiah Mercier 21 Reputation points
    2023-01-06T19:45:09.137+00:00

    In case anyone else encounters this issue, see the explanation posted here:

    https://stackoverflow.com/a/73944246/13020341

    This crash is from a fail-fast check (for what should be / have been an unexpected condition), which means this is meant to teardown the application as opposed to generate an exception that can be propagated to the client app.

    Also, this does not appear to be an issue on the map control itself but on routing code. Presumably there are map services calls to MapRouteFinder in your code?

    I have reported the issue to the feature team. But depending on your scenario, a potential workaround for your app would be to call the online Routing Services API directly.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.