Skip to content

Conversation

jkoritzinsky
Copy link
Member

@jkoritzinsky jkoritzinsky commented Nov 5, 2021

This prevents us from trying to re-create a managed object that is a user-defined object deriving from an RCW type from a COM IWeakReference (which fails).

The included test crashes on main with an AV and passes with the changes in this PR.

Fixes microsoft/CsWinRT#1025

@AaronRobinsonMSFT
Copy link
Member

@jkoritzinsky Let's start the port to .NET 6 ASAP.

@jkoritzinsky
Copy link
Member Author

/backport to release/6.0

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2021

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1429642390

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Taking a WeakReference to a C# object that inherits a native WinRT object crashes the app.

2 participants