[Bug]: NativeWindowViews::ShouldDescendIntoChildForEventHandling sporadically crashing application when checking BrowserViews for draggable regions · Issue #31812 · electron/electron · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug]: NativeWindowViews::ShouldDescendIntoChildForEventHandling sporadically crashing application when checking BrowserViews for draggable regions
#31812
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.
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Electron Version
15.3.0
What operating system are you using?
Windows
Operating System Version
Windows 10 version 21H1
What arch are you using?
x64
Last Known Working Electron version
11.0.3
Expected Behavior
Should return true or false when checking if the click was within a draggable region of a browserview.
Actual Behavior
It appears that sporadically that the view_draggable_region may not be valid, thus when checking if the cursor is contained within the SkRegion by calling SkRegion::contains, an uncaught exception happens that results in electron crashing.
Testcase Gist URL
No response
Additional Information
I believe this is related to issue #31406, as it crashes in the same way. I'm submitting this bug because while I was trying to figure out what was really causing issue 31406 I ran into this one. As a refresher I am using a frameless window with a BrowserView acting as the title bar that has a draggable region, then 1+ other BrowserViews serving the main content that do not have draggable regions. This is interesting because I reverted back to using a window instead of being a frameless and this started to happen, while no longer experiencing the crashes reported in issue 31406. Next I switched to running the title bar code from being in a BrowserView into the main BrowserWindow since it seems to be only BrowserViews that will cause this issue (I could be misunderstanding the underlying code), and the crashes still happen. I have tried this using several versions of electron from 11.x.x, 12.x.x, 13.x.x, and 15.x.x and they all exhibit this behavior, however 11.0.3 is the last working version that does not crash. My guess is that pull 26738 was when this issue, and subsequently issue 31406, was introduced as this bit of code
is both in NativeWindowViews::ShouldDescendIntoChildForEventHandling and FramelessView::NonClientHitTest.
I still don't have a gist that reproduces either issue, so it could be something else in my application that is causing both issues to crop up. I do have crashdumps that are telling me that these are the last calls in the callstack and that when it calls SkRegion::contains it causes an invalid_read and then crashes due to the uncaught exception.
The text was updated successfully, but these errors were encountered:
Preflight Checklist
Electron Version
15.3.0
What operating system are you using?
Windows
Operating System Version
Windows 10 version 21H1
What arch are you using?
x64
Last Known Working Electron version
11.0.3
Expected Behavior
Should return true or false when checking if the click was within a draggable region of a browserview.
Actual Behavior
It appears that sporadically that the view_draggable_region may not be valid, thus when checking if the cursor is contained within the SkRegion by calling SkRegion::contains, an uncaught exception happens that results in electron crashing.
Testcase Gist URL
No response
Additional Information
I believe this is related to issue #31406, as it crashes in the same way. I'm submitting this bug because while I was trying to figure out what was really causing issue 31406 I ran into this one. As a refresher I am using a frameless window with a BrowserView acting as the title bar that has a draggable region, then 1+ other BrowserViews serving the main content that do not have draggable regions. This is interesting because I reverted back to using a window instead of being a frameless and this started to happen, while no longer experiencing the crashes reported in issue 31406. Next I switched to running the title bar code from being in a BrowserView into the main BrowserWindow since it seems to be only BrowserViews that will cause this issue (I could be misunderstanding the underlying code), and the crashes still happen. I have tried this using several versions of electron from 11.x.x, 12.x.x, 13.x.x, and 15.x.x and they all exhibit this behavior, however 11.0.3 is the last working version that does not crash. My guess is that pull 26738 was when this issue, and subsequently issue 31406, was introduced as this bit of code
for (auto* view : browser_views()) { auto* native_view = static_cast<NativeBrowserViewViews*>(view); auto* view_draggable_region = native_view->draggable_region(); if (view_draggable_region && view_draggable_region->contains(location.x(), location.y())) return false; }
is both in NativeWindowViews::ShouldDescendIntoChildForEventHandling and FramelessView::NonClientHitTest.
I still don't have a gist that reproduces either issue, so it could be something else in my application that is causing both issues to crop up. I do have crashdumps that are telling me that these are the last calls in the callstack and that when it calls SkRegion::contains it causes an invalid_read and then crashes due to the uncaught exception.
The text was updated successfully, but these errors were encountered: