Skip to content

PackageCatalog.PackageUpdating event cause app exit abnormally(The API was called internally by WinGet package manager) #5884

@Gaoyifei1011

Description

@Gaoyifei1011

Relevant area(s)

WinGet CLI

Relevant command(s)

No response

Brief description of your issue

PackageCatalog.PackageUpdating event cause app exit abnormally

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

PackageCatalog.PackageUpdating 事件导致应用退出异常(WinGet package manager 内部调用了该 API)


m_updatingEvent = m_catalog.PackageUpdating(

e6b1d02
As mentioned above, WinGet in version 1.12 calls the PackageCatalog.PackageUpdating apis, this API will lead to the application behavior when exit application, as shown in the following image and video

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

m_updatingEvent = m_catalog.PackageUpdating(

e6b1d02
如上所述,WinGet 在 1.12 版本中调用了 PackageCatalog.PackageUpdating API,该 API 会导致应用程序在退出应用时行为异常,如下图和视频所示


Steps to reproduce

  1. Create a blank WinUI 3 application
  2. Mount 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

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

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

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


Actual behavior

Image Image
QQ20251116-10612.mp4

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

Environment

Windows Package Manager 1.27.420.0
Windows 11 26100.7070

App1.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions