uwpbing-mapsunhandled-exceptionuwp-maps

UWP application with MapControl crashes without raising the UnhandledException event


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. In any case, this appears to be a bug in the control.

Can anyone provide guidance on what could be causing this crash or a workaround to avoid it?

The crash dumps are available here:

MyApplication.exe.21320.dmp

MyApplication.exe.44476.dmp


Solution

  • 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.