WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

`ToastNotificationManager` APIs crash on Window-minimize

Open tipa opened this issue 4 months ago • 0 comments

Describe the bug

ToastNotificationManager APIs crash when being called in the VisibilityChanged event handler of Window when the window is being minimized using the Windows-D keyboard shortcut

Steps to reproduce the bug

public MainWindow()
{
    InitializeComponent();
    VisibilityChanged += (s, e) =>
    {
        _ = ToastNotificationManager.CreateToastNotifier();
        _ = ToastNotificationManager.History.GetHistory();
    };
}
  • Launch app
  • Press Windows-D keyboard combination to minimize all windows
  • Crash with COMException

Example project: test.zip

Expected behavior

No crash

NuGet package version

Windows App SDK 1.7.3: 1.7.250606001

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 24H2 (22621, October 2024 Update)

IDE

Visual Studio 2022

tipa avatar Jun 16 '25 10:06 tipa