Exception thrown at Windows.UI.Xaml.dll. 0xC0000005: Access violation reading location 0x00000000.

budding_developer 156 Reputation points
2021-11-08T08:07:10.163+00:00

Hi,
We are developing an uwp app. We are facing an issue with the app recently. When the app is launched and the controls are loading for the first time, we are getting an exception as shown below:

Exception thrown at 0x7AF51BAB (Windows.UI.Xaml.dll) in MyProject.exe. 0xC0000005: Access violation reading location 0x00000000.

Note that this exception is thrown only for the first time while the app is installed and not thrown otherwise.

We want to know the reason for this exception so that we will try to fix this issue in our app. Also want to know if this issue is system-specific?
Thanks in Advance :)

Universal Windows Platform (UWP)
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,279 questions
{count} votes

Accepted answer
  1. budding_developer 156 Reputation points
    2021-11-09T10:04:42.71+00:00

    Hi there,

    Found out the issue.

    We had a scenario where teaching tip will be shown when the app is launched for the first time.

    MyTeachingTip.IsOpen = true;
    

    We had the above line in OnNavigatedTo function in xaml.cs file for showing the teaching tip. Now we have moved this code to ViewModel as a property CanShowTeachingTip and binded this property to TeachingTip's IsOpen property in xaml file. And this solved the issue!

    Thanks for the help :)


0 additional answers

Sort by: Most helpful