Skip to content

App crashes when clearing ObservableCollection #10341

@tipa

Description

@tipa

Describe the bug

Clearing an ObservableCollection can cause this exception in certain cases (perhaps when page is unloaded and garbage collected):

System.Runtime.InteropServices.COMException: Unspecified error

Steps to reproduce the bug

Download and run this example project: Test.zip

Expected behavior

No crash

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.6.3: 1.6.241114003

Windows version

Windows 11 (24H2): Build 26100

Additional context

Related bug reports:
#8684
#7639
CommunityToolkit/Windows#616

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-ErrorHandlingIssues related to error reporting and debuggingbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions