microsoft / microsoft-ui-xaml

WinUI: a modern UI framework with a rich set of controls and styles to build dynamic and high-performing Windows applications.
MIT License
6.37k stars 682 forks source link

Crash in Microsoft_UI_Xaml!RefreshRateInfo::RegisterForPowerNotification+0x63 #10163

Open RSN1907 opened 1 week ago

RSN1907 commented 1 week ago

Describe the bug

Our product is WinUI based installer(self contained) targeting .NET8 framework and have these dependencies "Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742" "Microsoft.WindowsAppSDK" Version="1.6.240923002" "PInvoke.User32" Version="0.7.124" "Microsoft.Windows.Compatibility" Version="8.0.10"

We see crash with below stack trace

Stowed Exception #1 @ 0x07ad4a80 0x80070057 (FACILITY_WIN32 - Win32 Undecorated Error Codes): E_INVALIDARG - One or more arguments are not valid

Stack    : 0x7ad4270
    6c7f0823 Microsoft_UI_Xaml!RefreshRateInfo::RegisterForPowerNotification+0x63
    6c7f056c Microsoft_UI_Xaml!RefreshRateInfo::Create+0xb9
    6c1be417 Microsoft_UI_Xaml!WindowsGraphicsDeviceManager::Create+0xad
    6c1b0435 Microsoft_UI_Xaml!CWindowsServices::CreateGraphicsDeviceManager+0x15
    6c1a2030 Microsoft_UI_Xaml!CommonBrowserHost::CreateRenderTarget+0x40
    6c1a1f9d Microsoft_UI_Xaml!CommonBrowserHost::Init+0x13d
    6c1a2d79 Microsoft_UI_Xaml!CXcpBrowserHost::Init+0x19
    6c1a34dc Microsoft_UI_Xaml!CXcpBrowserHost::Create+0x4c
    6c8143b3 Microsoft_UI_Xaml!CControlBase::Init+0x113
    6c531b9c Microsoft_UI_Xaml!CJupiterControl::Init+0x14c
    6c53197b Microsoft_UI_Xaml!CJupiterControl::Create+0x64
    6c521b2b Microsoft_UI_Xaml!DirectUI::DXamlCore::InitializeImpl+0xf4
    6c512a8e Microsoft_UI_Xaml!DirectUI::FrameworkApplication::StartDesktop+0x14a
    6c1f6e82 Microsoft_UI_Xaml!DirectUI::FrameworkApplicationFactory::Start+0xc2

This issue happens during installation via Intune as well as using logon script to install

Steps to reproduce the bug

1) Install product via intune or 2) Install product via logon script

Expected behavior

It should not crash and installation should proceed

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.6.2: 1.6.241106002

Windows version

Windows 10 (21H2): Build 19044

Additional context

No response