microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

DebugSettings.EnableFrameRateCounter = true in Desktop causes an AccessViolation

Open jtbrower opened this issue 5 years ago • 8 comments
trafficstars

Describe the bug Create a new WinUI Desktop application and set the DebugSettings.EnableFrameRateCounter = true in the application constructor or the OnLaunched and an access violation exception will occur when the application is run.

Exception thrown at 0x7A0D38FC (Microsoft.UI.Xaml.dll) in WinUI_InDesktop.exe: 0xC0000005: Access violation reading location 0x00000000.

Steps to reproduce the bug

  1. In the attached solution, run the WinUiDesktop (Package) application. Note that you will be able to safely step over enabling the frame rate counter but the application will crash shortly after.
  2. For comparision, using the same solution, run the BlankAppUWP (Package). Note that the application will not crash and it will show the framerate counter as expected.

Expected behavior If by chance the DebugSettings.EnableFrameRateCounter setting cannot be used with Desktop applications, then a non-fatal exception message should be thrown. If this feature is supported in Desktop applications then it has a bug.

Screenshots

image

Version Info .Net5.0 Preview 6

NuGet package version: <PackageReference Include="Microsoft.WinUI" Version="3.0.0-preview1.200515.3" />

Note that I have been making WinUI work with Preview 6 by adding this additional direct package reference, a trick I learned from Scott Jones. Although I have been able to accomplish quite a bit of Window related work without any crashes, it was worth mentioning.

<PackageReference Include="Microsoft.Windows.CsWinRT" Version="0.1.0-prerelease.200623.5" />

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

Additional context I have attached a solution for easy reproduction of the problem. WinUIDesktop.zip

jtbrower avatar Jul 05 '20 02:07 jtbrower

Also happens with Preview2

hshristov avatar Jul 23 '20 13:07 hshristov

@RBrid Fyi

MikeHillberg avatar Jul 23 '20 16:07 MikeHillberg

Tracked by internal task 27649649 (and originally bug 27512832).

RBrid avatar Jul 23 '20 16:07 RBrid

This is still happening as of today.

aybe avatar Mar 21 '22 02:03 aybe

Also today

myblindy avatar Jan 21 '23 01:01 myblindy

Fixed in WinAppSDK 1.4-experimental1 on 05/23/23; @bpulliam can you please close this bug?

duncanmacmichael avatar May 25 '23 23:05 duncanmacmichael

Fixed for the next 1.5 release.

codendone avatar Feb 21 '24 18:02 codendone

Automation error. This is fixed in the 1.5 release.

bpulliam avatar Feb 27 '24 14:02 bpulliam