Uh oh!
There was an error while loading. Please reload this page.
[release/5.0] Notify Reference Tracker runtime of disconnect at the right time - #58412
Conversation
Based on misunderstanding of SyncBlock clean-up modes the indication of when an Native Object Wrapper was being collected was being done after the wrapper's Finalizer was run. However, this information must be conveyed prior to wrapper finalization and synchronously during the GC.
jeffschwMSFT
left a comment
There was a problem hiding this comment.
Approved. Please get a code review and we can take for consideration for 5.0.x.
elinor-fung
left a comment
There was a problem hiding this comment.
My comments are minor things for when this goes to 7.0 - not so much for 5.0
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
AaronRobinsonMSFT
commented
Aug 31, 2021
There is no .NET 7 PR yet, but I will fold this feedback into that when it is opened. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Marv51
commented
Sep 13, 2021
Is there a reason this was scheduled for 5.0.11 and not the next update? I guess 5.0.11 could be roughly expected in the middle of October, right? |
AaronRobinsonMSFT
commented
Sep 13, 2021
@Marv51 Yes, this is for the October update. Unfortunately we missed the 5.0.10 release snap so this was pushed to the next service release. |
Fixesmicrosoft/CsWinRT#840
Customer Impact
Based on misunderstanding of SyncBlock clean-up modes the indication of when an Native Object Wrapper was being collected was being done after the wrapper's Finalizer was run. However, this information must be conveyed prior to wrapper finalization and synchronously during the GC. See
IReferenceTracker::DisconnectFromTrackerSource.Workaround
There are no workarounds for this issue.
Testing
Added a tests. Have provided private binaries to C#/WinRT team for validation.
Risk
Minimal. .NET 5 is the first release of
ComWrappersand this issue only impacts WinRT scenarios./cc @davidwrighton@jkoritzinsky@elinor-fung