Closing a desktopCapture'd window that is being simulcast over WebRTC crashes the renderer #26136
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
Preflight Checklist
Issue Details
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.
Screenshots
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:
Running with
ELECTRON_ENABLE_LOGGING=true ELECTRON_ENABLE_STACK_DUMPING=true
gives the following output:The text was updated successfully, but these errors were encountered: