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

Big leak in DesktopCapturer.getSources('screen') on MacOS #16542

Closed
CapOM opened this issue Jan 25, 2019 · 3 comments
Closed

Big leak in DesktopCapturer.getSources('screen') on MacOS #16542

CapOM opened this issue Jan 25, 2019 · 3 comments

Comments

@CapOM
Copy link
Contributor

CapOM commented Jan 25, 2019

electron 4.0.2

Steps to reproduce:

git clone https://github.com/electron/electron-quick-start
and add the folllowing to renderer.js

const { desktopCapturer } = require('electron')

function findSources() {
  desktopCapturer.getSources({ types: ['screen'] }, (error, sources) => {
    if (error) throw error
    for (let i = 0; i < sources.length; ++i) {
      console.log('source: ' + sources[i].name); 
    }
  })
}

window.setInterval(findSources, 1000)

Does not happen with type "window" so I suspect an any in either webrtc::ScreenCapturerMac or the way it is started/stopped from chrome/browser/media/webrtc/native_desktop_media_list.cc

@CapOM
Copy link
Contributor Author

CapOM commented Jan 25, 2019

Ah I actually just found and you guys are missing the following patch:

“ScreenCapturerMac: destroy the streams and remove the DisplayStreamManager” - https://webrtc-review.googlesource.com/c/src/+/98227

Please back port it, thx!

@sofianguy
Copy link
Contributor

fixed in #16555

@CapOM
Copy link
Contributor Author

CapOM commented Jan 29, 2019

Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants