-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
[Bug]: Asynchronous onBeforeRequest callback crashes Chromium with unretained dangling pointer error for specific websites #42505
Comments
Stacktrace
|
@codebytere Can we have an update please? Our in-production applications are impacted. |
@amitparida we have hundreds of issues, all with their own distinct impacts to different consumers. My backlog is deep and I will do my best but can make no guarantees. |
I tracked this to #41490 and it looks like a bug in the remote module (which we heavily discourage using) resultant of a Chrome roll. I rewrote your code using ipc and now see no issues: https://gist.github.com/bc20399ee30acd0f08bdbacbca9a8969, meaning it's not an issue with the callback itself. |
@codebytere just FYI - in the case of #42149, we don't use the remote module but still get a similar crash. Maybe callstack is different though, didn't check. |
Folding this into #42149 - they have the same root cause |
Preflight Checklist
Electron Version
31.0.1
What operating system are you using?
macOS
Operating System Version
macOS Sonoma 14.5
What arch are you using?
x64
Last Known Working Electron version
29.1.1
Expected Behavior
An asynchronous handler to a window's
webContents.session.webRequest.onBeforeRequest
method should not result in a crash, regardless of the website being navigated to.Actual Behavior
If there is any asynchrony in the onBeforeRequest handler, attempting to navigate to or within few websites like Adidas-CA, Yahoo results in Chromium crashing with the fatal error:
[67617:0614/200604.586896:FATAL:partition_alloc_support.cc(807)] Detected dangling raw_ptr in unretained with id=0x00000138007c37fc:
.Try-catch blocks are not sufficient to keep this error from tearing down the entire application.
Testcase Gist URL
https://gist.github.com/amitparida/adfd147123f60ad23508a356ff182f8e
Additional Information
Here are the steps to follow to reproduce the issue.
Detected dangling raw_ptr in unretained with id=0x000001200083e0fc
.The bug lies with multiple stable versions released post v30.0.0. I'm sure there woudl be multiple other websites which if loaded would crash the application. Please look at it at the earliest as we're unable to upgrade our in-Production Electron Application impacting the users.
The text was updated successfully, but these errors were encountered: