0

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

rbrundritt
  • 16,570
  • 2
  • 21
  • 46
Jeremiah Mercier
  • 451
  • 5
  • 18
  • Could you please narrow down the issue, for example, just use the MapControl and all the related functions in a blank project to see if you could reproduce this? – Roy Li - MSFT Sep 30 '22 at 07:08
  • I wish that I could. As I stated in my original post, we've been unable to find any pattern or reproduce the issue with any consistency. I went three weeks without it crashing and then it crashed twice in a matter of ten minutes at two completely different points. I repeated the same steps as best I could remember and couldn't get it to crash again. Without knowing how to force it to crash, I have no idea what to put in a repro to try to reproduce the issue. That's why I focused on capturing crash dumps. – Jeremiah Mercier Sep 30 '22 at 16:16

1 Answers1

1

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.

  • Thank you for reporting the issue to Microsoft and pointing us in the direction of MapRouteFinder. We're in the process of converting those calls to use the Azure API and will see if that resolves the issue. – Jeremiah Mercier Oct 10 '22 at 15:00
  • 1
    Removing the MapRouteFinder and replacing it with calls to the Azure Maps REST API appears to have resolved the issue. Thank you! – Jeremiah Mercier Jan 06 '23 at 19:42