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.38k stars 683 forks source link

Getting exceptions randomly when closing a WinUI3 app with TabView controls. #8575

Open Ajith-GS opened 1 year ago

Ajith-GS commented 1 year ago

Describe the bug

The following exception is thrown randomly when closing a WinUI3 app that contains TabView controls in its UI. The given object has already been closed/ disposed and may no longer be used.

ExceptionMsg

Call Stack: CallStack

Steps to reproduce the bug

  1. Create a C++ WinUI3 project using "Blank App, Packaged (WinUI 3 in Desktop)" template.
  2. Make it as unpackaged application using the steps described in the following link. https://learn.microsoft.com/en-us/windows/apps/winui/winui3/create-your-first-winui3-app#unpackaged-create-a-new-project-for-an-unpackaged-c-or-c-winui-3-desktop-app
  3. Add TabView controls to MainWindow.xaml
  4. Build the application.
  5. Run the application.
  6. Interact with the TabView controls.
  7. Close the application.

Expected behavior

Application should close without throwing any exception.

Screenshots

No response

NuGet package version

Windows App SDK 1.3.2: 1.3.230602002

Packaging type

Unpackaged

Windows version

Windows 10 version 22H2 (19045, 2022 Update)

IDE

Visual Studio 2022

Additional context

The exception is throwing only randomly. Can not be reproduced every time. A test application is also attached. Tab_TestApp.zip

ranjeshj commented 1 year ago

@Ajith-GS this might already be fixed in WASDK 1.4. Can you please give it a try and report back ?

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

Ajith-GS commented 1 year ago

@Ajith-GS this might already be fixed in WASDK 1.4. Can you please give it a try and report back ?

Thank you for your response, I will check and update.

Ajith-GS commented 4 months ago

This problem still exists in latest WASDK 1.5 (1.5.240607001).

karkarl commented 1 week ago

Sorry for the delayed response. Can you verify if the problem still persists in 1.6.

microsoft-github-policy-service[bot] commented 4 days ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.