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

Mircotaskscope in the renderer interferes with debugging async/await #21288

Closed
deepak1556 opened this issue Nov 26, 2019 · 3 comments
Closed

Comments

@deepak1556
Copy link
Member

deepak1556 commented Nov 26, 2019

Electron Version: 6-1-x, 7-1-x, 8-xy

Expected Behavior

Devtools should perform normally without crash

Actual Behavior

Renderer crashes with following,

https://gist.github.com/deepak1556/29458392e72d01c097b822cbb36848f9 -> interesting frame starts from 33

To Reproduce

https://gist.github.com/deepak1556/f9ce7fd4d695361f1568c787affa3795

This originally surfaced in microsoft/vscode#83994 as a different issue, this is just one example based on the task event loop was processing when we originally saw the crash but we have explicit Microtaskscope spread out in a couple of places in the renderer and depending on the task queue at the time of debugger pause, they will cause a similar issue.

/cc @zcbenz

@zcbenz
Copy link
Member

zcbenz commented Dec 2, 2019

The blink::PromiseRejectHandlerInMainThread is called when promise is rejected, and crash happened inside it because blink could not could a valid DOM window at current scope.

From the crash report, it seems that we need to make electron::EmitIPCEvent call JS via blink.

@zcbenz zcbenz self-assigned this Dec 2, 2019
@ckerr ckerr added this to Unsorted Issues in 8.2.x Dec 4, 2019
@jkleinsc jkleinsc moved this from Unsorted Issues to Does Not Block Stable in 8.2.x Dec 4, 2019
@sofianguy sofianguy added this to Unsorted Issues in 6.1.x Dec 9, 2019
@sofianguy sofianguy added this to Unsorted Issues in 7.2.x Dec 9, 2019
@electron-triage
Copy link

The Electron version reported on this issue is no longer supported. See our supported versions documentation.

If this is still reproducible on a supported version, please open a new issue with any other new information that a maintainer should know.

Thank you for taking the time to report this issue and helping to make Electron better! Your help is appreciated.

@deepak1556
Copy link
Member Author

Can confirm the issue doesn't repro with Electron >=11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
6.1.x
Unsorted Issues
7.2.x
Unsorted Issues
8.2.x
Does Not Block Stable
Development

Successfully merging a pull request may close this issue.

4 participants