Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DebugSettings.EnableFrameRateCounter = true in Desktop causes an AccessViolation #2835

Closed
jtbrower opened this issue Jul 5, 2020 · 8 comments
Labels
appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps bug Something isn't working product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team
Milestone

Comments

@jtbrower
Copy link

jtbrower commented Jul 5, 2020

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

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Jul 5, 2020
@StephenLPeters StephenLPeters added appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps product-winui3 WinUI 3 issues and removed needs-triage Issue needs to be triaged by the area owners labels Jul 6, 2020
@hshristov
Copy link

Also happens with Preview2

@MikeHillberg
Copy link
Contributor

@RBrid Fyi

@RBrid
Copy link
Contributor

RBrid commented Jul 23, 2020

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

@marb2000 marb2000 added the bug Something isn't working label Feb 20, 2021
@aybe
Copy link

aybe commented Mar 21, 2022

This is still happening as of today.

@bpulliam bpulliam added the team-Rendering Issue for the Rendering team label Oct 30, 2022
@myblindy
Copy link

Also today

@duncanmacmichael
Copy link
Member

duncanmacmichael commented May 25, 2023

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

@llongley llongley reopened this Jan 27, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jan 27, 2024
@codendone codendone added this to the WinAppSDK 1.5 milestone Feb 21, 2024
@codendone codendone removed the needs-triage Issue needs to be triaged by the area owners label Feb 21, 2024
@codendone
Copy link
Contributor

Fixed for the next 1.5 release.

@llongley llongley closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2024
@llongley llongley added the closed-Duplicate Described behavior is already captured by another issue. label Feb 27, 2024
@bpulliam
Copy link
Contributor

Automation error. This is fixed in the 1.5 release.

@bpulliam bpulliam reopened this Feb 27, 2024
@bpulliam bpulliam added fixed-internally This bug has been fixed, and the fix will be shipped in the next version of WinUI 3. and removed closed-Duplicate Described behavior is already captured by another issue. labels Feb 27, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Feb 27, 2024
@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Feb 29, 2024
@bpulliam bpulliam removed the fixed-internally This bug has been fixed, and the fix will be shipped in the next version of WinUI 3. label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps bug Something isn't working product-winui3 WinUI 3 issues team-Rendering Issue for the Rendering team
Projects
None yet
Development

No branches or pull requests