question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PersonPicture crash on release configuration

See original GitHub issue

Describe the bug Crash on Release config when creating exstension class for PersonPicture

Steps to reproduce the bug

  1. Create class which extends PersonPicture:
public class Avatar : PersonPicture
{
    public Avatar()
    {
    }
}
  1. Add it to any place:
public MainPage()
{
    this.InitializeComponent();

    for (int x = 0; x < 10; x++)
    {
        this.Stack.Children.Add(new Avatar() { Margin = new Windows.UI.Xaml.Thickness(10), Height = 100 });
    }
}
  1. Run application in debug mode and get expected result
  2. Run application in release mode and get crash:
Unhandled exception at 0x063356F1 (Windows.UI.Xaml.dll) in AvatarTest.exe: 0xC000027B: an internal exception occurred in application(parameters: 0x09D79A80, 0x00000003).

Expected behavior App doesn’t crash in release mode

Video Youtube

Version Info NuGet package version: [Microsoft.UI.Xaml 2.4.3]

Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2020 Update (19041) Yes
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Felix-Devcommented, Sep 22, 2020

@De-Os To get your PersonPicture subclass working in Release configuration, add the BindableAttribute to it:

[Windows.UI.Xaml.Data.Bindable]
public class Avatar : PersonPicture {}

See this comment as a brief overview of the issue you are facing.

0reactions
RealTommyKleincommented, Sep 22, 2020

@StephenLPeters - this is tricky since the Xaml compiler doesn’t have enough information to know it has to generate type information for the Avatar class (type information is generated when the type is used in markup, or has the Bindable attribute on it). It works in Debug since debug builds use the reflection provider, which doesn’t rely on compiler-generated type information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

app crashed when starting after signing in release mode
1 Answer. Your problem is that proguard is renaming your code and that you're using reflection. The easiest fix would be to disable...
Read more >
Windows 10 Settings Crash
When I press the button the settings app opens but then crashes after a few seconds. I tried to do it manually from...
Read more >
Settings app crashing every time I open it
Press Ctrl + Shift + Esc to open Task Manager. Select the Processes tab. Scroll down and select Windows Explorer, Right click then...
Read more >
UWP/C# app crashes on startup when in "Release" from ...
Hi,. I've programmed a simple timer app (simply some XAML and a bit of JSON parsing for settings saving) and want to build...
Read more >
Xamarin UWP release mode crash but debug work
My steps with 16.8.3: Create a Mobile App (Xamarin.Forms) > Select Blank template with checking 'Windows UWP' option > Change configuration to Release...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found