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
fix: Avoid crashing in NativeViewHost::SetParentAccessible on Windows 10 #26924
Conversation
after the changes in | ||
https://chromium.googlesource.com/chromium/src.git/+/5c6c8e994bce2bfb867279ae5068e9f9134e70c3%5E!/#F15 | ||
|
||
For context, see: https://github.com/electron/electron/issues/26905 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We require all patches to describe a plan for their own removal, or else a reason why they should be maintained forever, per https://github.com/electron/electron/blob/master/docs/development/patches.md#patch-justification.
Can this patch be upstreamed? If not, why not? Can we fix this crash without a patch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nornagon Updated!
This fixes electron#26905. The patch was obtained from @deepak1556, who in turn got it from the Microsoft Teams folks. I believe the crash started happening due to the changes in https://chromium.googlesource.com/chromium/src.git/+/5c6c8e994bce2bfb867279ae5068e9f9134e70c3%5E!/#F15 This affects Electron 9 and later. Notes: Fix occasional crash on Windows
7576f52
to
a74da42
Compare
This is based on the investigation done by Way Vadhanasin and Julie Koubova from MS teams. The original trace from memory dump was
Inspecting the dump had showed that NativeViewHost does not have a valid native_wrapper_ set. The instance of NativeViewHost comes from a holder_ member of WebView. And this causes the Ax notification to dereference a null pointer. Tracing the construction of the above WebView instance
It comes from
The reason why WebView doesn't get a native_wrapper_ is because the parent of these view's which is electron::InspectableWebContentsViewViews is not of type RootView where there is an enforcement of a valid Widget |
I am not sure of the reason why we consider So for now teams have incorporated this patch that fixes the crash path but definitely doesn't address the root issue, which is with how we maintain the view tree. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accepted for now, I hope that we can find a fix for this that does not require a patch.
Release Notes Persisted
|
I have automatically backported this PR to "10-x-y", please check out #26949 |
I have automatically backported this PR to "9-x-y", please check out #26950 |
I have automatically backported this PR to "11-x-y", please check out #26951 |
I have automatically backported this PR to "12-x-y", please check out #26952 |
This fixes #26905. The patch was obtained from @deepak1556, who in turn
got it from the Microsoft Teams folks.
I believe the crash started happening due to the changes in
https://chromium.googlesource.com/chromium/src.git/+/5c6c8e994bce2bfb867279ae5068e9f9134e70c3%5E!/#F15
This affects Electron 9 and later.
Notes: Fix occasional crash on Windows