Skip to content

Instantly share code, notes, and snippets.

@Juansero29
Created August 3, 2023 13:34
Show Gist options
  • Save Juansero29/d72df8c3a1b31f9746f24df07d75c0f9 to your computer and use it in GitHub Desktop.
Save Juansero29/d72df8c3a1b31f9746f24df07d75c0f9 to your computer and use it in GitHub Desktop.
How my team solved Unhandled exception at 0x7726BF4B (MrmCoreR.dll) in AppName_UWP.exe: 0xC0000005: Access violation reading location 0x02000087 for a UWP app
  1. A teammate watched on App launch after installation in Process Monitor (by Sysinternals) and saw before App starting WerFault (preparing crash report) it is doing many stuff like "OverrideLanguagesList".
  2. My teammate remembered that, in the app, we had code that was doing ApplicationLanguages.PrimaryLanguageOverride = stuff, and that when doing this app would be closed or restarted.
  3. My teammate searched for where we played with PrimaryLanguageOverride and saw indeed, during first launch it was overriden by some code, then during 2nd launch it is not overriden any more
  4. By analyzing with my teamate we saw that crash was generated because of how we handled language change in or BindableStrings class, we changed the responsible code as follows image
  5. Now app didn't crash anymore :)

So main points:

  • You can use Process Monitor (by Sysinternals) to deeply analyze weird crashes in your Windows apps
  • Maybe this crash is related to some irresponsible code being present in some part of the app, most commonly tied to the resources of your app (strings localization, images, icons, etc...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment