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

[Win] libuv loop stops working in a native addon after page reload. #23910

Closed
jphw opened this issue Jun 2, 2020 · 4 comments · Fixed by #25869
Closed

[Win] libuv loop stops working in a native addon after page reload. #23910

jphw opened this issue Jun 2, 2020 · 4 comments · Fixed by #25869

Comments

@jphw
Copy link

jphw commented Jun 2, 2020

Issue Details

  • Electron Version: 9.0.0 (beta versions of 9.0.0 too)
  • Operating System: Windows 10 1903
  • Last Known Working Electron version: 7.2.4

Repro steps

  1. require a native module in a Renderer process (on a page)
  2. call libuv function uv_queue_work 5 times
  3. get uv_after_work_cb invoked 5 times
  4. reload the page
  5. call libuv function uv_queue_work 5 times once more

Expected Behavior

  1. get uv_after_work_cb invoked 5 times

Actual Behavior

  1. get uv_after_work_cb invoked 1 or 2 times, remaining ones never get invoked by libuv

To Reproduce

I prepared a sample project with minimal code that demonstrates the problem:

https://github.com/jphw/libuv_problems

Please read the README.MD and check src/libuv_problems_module.cpp sources.

Additional Information

app.allowRendererProcessReuse = false; works as a workaround for this issue

@aabuhijleh
Copy link

I think this is causing the same issue I'm having #24173. Regression in Node.js APIs in preload script after page reload.

@nornagon
Copy link
Member

Related: #25314

@ckerr
Copy link
Member

ckerr commented Sep 30, 2020

This is still an issue in master & in the back branches even after the uv threading issue that was resolved in #25332. This appears to be an unrelated issue.

@codebytere codebytere self-assigned this Oct 7, 2020
@codebytere codebytere moved this from Blocks Stable to Fixed for Next Release in 11-x-y Oct 14, 2020
@Jiahui-Yan
Copy link

This problem also exists in electron 12.0.0, but not in 9.4.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
11-x-y
Fixed for Next Release
Development

Successfully merging a pull request may close this issue.

7 participants