Skip to content

SystemSettings.exe crashes after trying to use AppNotifications API #3139

Closed
@librick

Description

@librick

Describe the bug

I'm trying to write a simple Windows app to show some personal metadata on the lockscreen.
I've been referencing https://github.com/microsoft/WindowsAppSDK/blob/main/specs/AppNotifications/AppNotifications-spec.md as well as an older guide from https://learn.microsoft.com/en-us/previous-versions/windows/apps/hh700416(v=win.10)?redirectedfrom=MSDN.

Now when I go to Settings > Personalization > Lock screen via Windows 11 System Settings app, the settings app completely crashes as soon as I click to expand the Lock screen status dropdown (currently set to None).
I don't know if this is an issue with the AppNotifications API or with the System Settings app, but this seemed like the easiest place to report it.

I would provide the code I was using but I've been playing with a few different examples/permutations all day so I have no idea which Visual Studio project caused it to break. I was able to expand the dropdown and select one of my own apps earlier in the day, but then at some point after building an app while using the Windows App SDK the settings app broke as described.
I was able to get normal COM notifications to show up using the AppNotifications API, I just can't see them on my lock screen because the settings app is now broken.

Here's what the event viewer shows:

Faulting application name: SystemSettings.exe, version: 10.0.22000.1165, time stamp: 0x27a6d211
Faulting module name: Windows.UI.Xaml.dll, version: 10.0.22000.1219, time stamp: 0xe4635fc8
Exception code: 0xc000027b
Fault offset: 0x0000000000834e60
Faulting process id: 0xb30
Faulting application start time: 0x01d8f7ccb2eec94a
Faulting application path: C:\Windows\ImmersiveControlPanel\SystemSettings.exe
Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll
Report Id: 0d95bd70-766f-4a1e-887b-adee8e6bd9f4
Faulting package full name: windows.immersivecontrolpanel_10.0.6.1000_neutral_neutral_cw5n1h2txyewy
Faulting package-relative application ID: microsoft.windows.immersivecontrolpanel

Thanks for any help.
(As an aside, I don't see anything in the Windows App SDK specifically about displaying info on the lock screen. If that's a valid use-case, maybe update the spec?)
Bonus points if you can suggest how I can fix my settings app :/

Steps to reproduce the bug

  1. Attempt to create a new project that leverages the AppNotifications API
  2. Try various permutations of Package.appxmanifest settings
  3. Within the Windows Settings app, go to Personalization > Lock screen
  4. For the setting Lock screen status, try to expand the dropdown.
  5. The settings app will crash immediately

I don't know exactly what I did to get it to crash.
I know I set an earlier app of mine with that dropdown earlier in the day, and later deleted that project. Maybe that messed up the settings? Hopefully the event log message will be helpful.

Expected behavior

No response

Screenshots

No response

NuGet package version

1.2.221109.1

Packaging type

No response

Windows version

Windows 11 version 21H2 (22000)

IDE

Visual Studio 2022

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-NotificationsToast notification, badges, Live Tiles, push notificationsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions