microsoft / microsoft/WindowsAppSDK

```PackageCatalog.PackageUpdating``` event cause app exit abnormally

Open
#6,002 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-External needs-triage
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

Description

### Describe the bug

```PackageCatalog.PackageUpdating``` event cause app exit abnormally

##### --------------------------

```PackageCatalog.PackageUpdating``` 事件导致应用退出异常

--------------------------

### Steps to reproduce the bug

1. Create a blank WinUI 3 application
2. ```PackageCatalog.PackageUpdating``` events
3. Exit the application
4. Observe the performance of the corresponding process in the Task Manager (or mount the Visual Studio debugger to view)

##### --------------------------

1. 创建一个空白 WinUI 3 应用
2. 挂载 PackageCatalog.PackageUpdating 事件
3. 退出应用
4. 看任务管理器对应进程的表现(或挂载 Visual Studio 调试器查看)

--------------------------

### Expected behavior

Mount ```PackageCatalog.PackageUpdating``` event, application can exit out of normal process will not trigger the exception

##### --------------------------

挂载 ```PackageCatalog.PackageUpdating``` 事件后,应用退出能正常退出进程,不会触发异常

--------------------------

### Screenshots

Image

Image

### NuGet package version

Windows App SDK 1.8.3: 1.8.251106002

### Packaging type

Packaged (MSIX)

### Windows version

Windows 11 version 24H2 LTSC (26100, June Update)
26220.7070

### IDE

Visual Studio 2022

### Additional context

https://github.com/user-attachments/assets/d6ae9a95-44ca-422d-9e15-47b944c3842c

https://learn.microsoft.com/uwp/api/windows.applicationmodel.packagecatalog.packageupdating?view=winrt-26100

[App1.zip](https://github.com/user-attachments/files/23566880/App1.zip)

Similar issues:
https://github.com/microsoft/winget-cli/issues/5870
https://github.com/microsoft/winget-cli/issues/5869

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by opening App1.zip and reproducing the issue with PackageCatalog.PackageUpdating on Windows App SDK 1.8.3, using the Visual Studio debugger or Task Manager while exiting. Compare the behavior with the linked similar issues; done means the packaged WinUI 3 application exits normally without the reported exception or abnormal process behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.