Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SettingsExpander] Unhandled "Unspecified error" exception #616

Open
3 tasks done
tipa opened this issue Jan 30, 2025 · 1 comment
Open
3 tasks done

[SettingsExpander] Unhandled "Unspecified error" exception #616

tipa opened this issue Jan 30, 2025 · 1 comment

Comments

@tipa
Copy link

tipa commented Jan 30, 2025

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

Expected behavior

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

Code Platform

  • WinAppSDK / WinUI 3

Windows Build Number

  • Windows 11 21H2 (Build 22000)

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)

Visual Studio Version

2022

Help us help you

No, I'm unable to contribute a solution.

@AndrewKeepCoding
Copy link

AndrewKeepCoding commented Jan 31, 2025

The ItemsRepeater inside the SettingsExpander is causing this issue, so you can see the same exception with a plain ItemsRepeater.

I found this issue (microsoft/microsoft-ui-xaml#7639) but it's closed. Leaving a comment there might help reopening it.

You can avoid this exception by setting ItemsSource to null when the SettingsControl is unloaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants