CommunityToolkit / CommunityToolkit/Windows

[SettingsExpander] Unhandled "Unspecified error" exception

Open
#616 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.1k
Forks
166
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

When using a `SettingsExpander` that is bound to an `ObservableCollection` in a page that is not cached (`NavigationCacheMode="Disabled"`) and this page is repeatedly opened (and old instances of the page have been garbage collected), the app crashes once an item of that `ObservableCollection` is removed.

### Steps to reproduce
Download and run this test project : [Test.zip](https://github.com/user-attachments/files/18602524/Test.zip)

### Expected behavior

No crash.
When adding `NavigationCacheMode="Required"` to `Page2`, the crash is not happening

### Code Platform

- [x] WinAppSDK / WinUI 3

### Windows Build Number

- [x] Windows 11 21H2 (Build 22000)

### App minimum and target SDK version

- [x] Windows 10, version 1809 (Build 17763)

### Visual Studio Version

2022

### Help us help you

No, I'm unable to contribute a solution.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.