Skip to content
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: add uv_loop_close when object release to fix crash #35322

Merged
merged 1 commit into from Aug 15, 2022

Conversation

zuohuiyang
Copy link
Contributor

@zuohuiyang zuohuiyang commented Aug 13, 2022

Description of Change

stop_and_close_uv_loop add call uv_loop_close.
In the destructor of NodeBindings, stop_and_close_uv_loop is called, but stop_and_close_uv_loop does not call uv_loop_close. After NodeBindings are destructed, libuv still holds the member objects of NodeBindings. When power resume, libuv enumerates all loops, and will accesses a pointer that has been released.
as issue #32926

About npm test in checklist. Before I modified the code, 15 cases could not pass on my computer. After I modified, the failed cases did not increase, so there should be no problem with npm test.

Resolves #32926

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes

Release Notes

Notes: Fixed crash in renderer when resuming system from sleep

@welcome
Copy link

welcome bot commented Aug 13, 2022

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 13, 2022
@zcbenz zcbenz added semver/patch backwards-compatible bug fixes target/19-x-y target/21-x-y PR should also be added to the "21-x-y" branch. labels Aug 15, 2022
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 15, 2022
@jkleinsc jkleinsc merged commit cbc1ee5 into electron:main Aug 15, 2022
@welcome
Copy link

welcome bot commented Aug 15, 2022

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link

release-clerk bot commented Aug 15, 2022

Release Notes Persisted

Fixed crash in renderer when resuming system from sleep

@trop
Copy link
Contributor

trop bot commented Aug 15, 2022

I have automatically backported this PR to "21-x-y", please check out #35336

@trop trop bot added in-flight/21-x-y and removed target/21-x-y PR should also be added to the "21-x-y" branch. labels Aug 15, 2022
@trop
Copy link
Contributor

trop bot commented Aug 15, 2022

I have automatically backported this PR to "19-x-y", please check out #35337

@trop
Copy link
Contributor

trop bot commented Aug 15, 2022

I have automatically backported this PR to "20-x-y", please check out #35338

@miniak
Copy link
Contributor

miniak commented Aug 15, 2022

/trop run backport-to 18-x-y

@trop
Copy link
Contributor

trop bot commented Aug 15, 2022

The backport process for this PR has been manually initiated - sending your PR to 18-x-y!

@trop
Copy link
Contributor

trop bot commented Aug 15, 2022

I have automatically backported this PR to "18-x-y", please check out #35340

@trop trop bot added in-flight/18-x-y merged/21-x-y PR was merged to the "21-x-y" branch. and removed in-flight/18-x-y labels Aug 15, 2022
@DanielMcAssey
Copy link

This seems to have broken in Mac with WebWorkers destructing. Will look at posting dump and repro

schetle pushed a commit to schetle/electron that referenced this pull request Nov 3, 2022
Co-authored-by: yangzuohui <yangzuohui@bytedance.com>
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
Co-authored-by: yangzuohui <yangzuohui@bytedance.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/21-x-y PR was merged to the "21-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Renderer process crashes on power resume
6 participants