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

Closing a desktopCapture'd window that is being simulcast over WebRTC crashes the renderer #26136

Closed
3 tasks done
alexciarlillo opened this issue Oct 23, 2020 · 3 comments
Closed
3 tasks done
Labels
8-x-y 10-x-y crash 💥 has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/windows stale

Comments

@alexciarlillo
Copy link

alexciarlillo commented Oct 23, 2020

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 8.5.1 / 10.1.4
  • Operating System:
    • Windows 10 (various builds)
  • Last Known Working Electron version:
    • n/a

Expected Behavior

When screen sharing a specific application window via WebRTC (and simulcast is enabled), when you close the window the output should freeze on the last sent frame. Or go black? Anything but crashing the application.

Actual Behavior

When screen sharing an application window, and using a simulcast setup, when you close the window the renderer process will crash.

To Reproduce

This is tricky to reproduce as it requires some fairly involved RTC setup to get simulcast working. I made an example repo here with a single dependency (sdp-transform so I didnt have to manually munge SDP to set this up):

https://github.com/alexciarlillo/electron-capture-bug

Most of the RTC code can probably be ignored - it works, and I am seeing this same repro in our real application using more sophisticated libraries to perform this negotiation. I specified H264 in this example, but I have also confirmed this occurs with VP8.

You should be able to capture a window from a dropdown - any window should work, and see the fullsize capture (source) and 1/2 size output on the "receiver" side (this all local-host loopback) which indicates we are simulcasting, and receiving one of the simulcast encodings. Close the window and it should crash.

$ git clone https://github.com/alexciarlillo/electron-capture-bug
$ npm install
$ npm start

Screenshots

image

image

Additional Information

Besides some line numbers the debug call stack looks identical from 8.5.1 to 10.1.4, here is 10.1.4:

image

Running with ELECTRON_ENABLE_LOGGING=true ELECTRON_ENABLE_STACK_DUMPING=true gives the following output:

[7028:1023/155508.933:WARNING:dxgi_adapter_duplicator.cc(108)] Cannot initialize any DxgiOutputDuplicator instance.
[7028:1023/155508.933:WARNING:dxgi_duplicator_controller.cc(260)] Failed to initialize DxgiAdapterDuplicator on adapter 1
[7028:1023/155513.912:WARNING:dxgi_duplicator_controller.cc(81)] Count of references reaches zero, DxgiDuplicatorController will be unloaded.
Renderer process crashed - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.
@ckerr ckerr added 10-x-y 8-x-y crash 💥 platform/windows has-repro-gist Issue can be reproduced with code at https://gist.github.com/ labels Oct 26, 2020
@ckerr
Copy link
Member

ckerr commented Oct 26, 2020

@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2022

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Oct 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2022

This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8-x-y 10-x-y crash 💥 has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/windows stale
Projects
None yet
Development

No branches or pull requests

2 participants