-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
An attempted fix for the
SignalTextChanged
crash (#13876)
This is conjecture - I was totally unable to repro the original crash here. Based on the stacks in MSFT:39994969, it looks like we try to fire off a `RaiseAutomationEvent`, which calls through UIA core, eventually to the point of calling `ComPtr<WUX::Automation::Peers::IAutomationPeer>::{dtor}`. I'm guessing based on the stacks that the TermControl has already been released and cleaned up. However, the lambda in the `RunAsync` calls here only takes a ref to the TCAP. The TCAP has an outstanding reference (maybe on the other side of the UIA fence), and gets successfully resolved as strong, but when calling to `RaiseAutomationEvent`, the `owner` we passed in is gonezo. This explicitly passes a `weak_ref` to `TermControlAutomationPeer`, rather than a raw ptr, so we can actually check if the control is still alive before _we_ dereference it. If it is, great, we've got a strong ref to it now and it won't get torn down. Again, this is hearsay. Without a repro, the only way we can confirm this is gone is by just hoping the crashes go away. 🤞 * Might close #13357 (we'll reopen if it doesn't?) * narrator still works (cherry picked from commit fe0d570) Service-Card-Id: 85401131 Service-Version: 1.15
- Loading branch information
1 parent
2f6b546
commit 6027a36
Showing
3 changed files
with
51 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters