New issue
Advanced search Search tips

Issue 836978 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug

Blocking:
issue 836979



Sign in to add a comment

[desktopCapture OSX] screen capture freezes after changing display resolution

Project Member Reported by braveyao@chromium.org, Apr 25 2018

Issue description

What steps will reproduce the problem?
(1) Start a Hangout meeting
(2) Start to share the screen of a MBP 
(3) Change the resolution of that screen

What is the expected result?
screen sharing will continue with the new resolution.

What happens instead?
screen sharing freezes


Please use labels and text to provide additional information.

This is a regression by CL, https://chromium-review.googlesource.com/c/chromium/src/+/681850.
Since that CL, when we re-register CGDisplayStreamFrameAvailableHandler to CGDisplayStream, https://cs.chromium.org/chromium/src/third_party/webrtc/modules/desktop_capture/mac/screen_capturer_mac.mm?l=512, the callback won't be invoked any more.
 
Blocking: 836979
Cc: rsesek@chromium.org
resesek@, what should we do to adapt to the changing of using MessagePumpDefault on OSX in https://chromium-review.googlesource.com/c/chromium/src/+/681850?
Cc: erikc...@chromium.org
+ erikchen@ for more insight of Screencapturer on OSX.
You'll want to adjust the thread that runs this code to use a different MessageLoop type. For an example of a CL that does this for another component, see: https://chromium-review.googlesource.com/c/chromium/src/+/923584
Yes, switching to UI thread will fix this issue, https://cs.chromium.org/chromium/src/content/browser/media/capture/desktop_capture_device.cc?l=576.

Thanks a lot!

Comment 6 by rsesek@chromium.org, Apr 25 2018

Erik's right with #4. But also see  issue 827300 .
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/18b6eee163f276a6023f51a68b7b8e71328b748e

commit 18b6eee163f276a6023f51a68b7b8e71328b748e
Author: braveyao <braveyao@chromium.org>
Date: Fri Apr 27 04:18:37 2018

[Mac] Force a MessageLoop::TYPE_UI for the desktopCaptureThread

In a recent CL, https://chromium-review.googlesource.com/c/chromium/src/+/681850,
MesasgePumpDefault is used for MessageLoop::TYPE_DEFAULT on OSX.
This requests the desktopCaptureThread to be adjusted to run as
a UI thread, otherwise the CFRunLoop won't run again after
display resolution changes.

Bug:  836978 
Change-Id: Ifb460f19dca4741359d93bb73e280404d62c5a05
Reviewed-on: https://chromium-review.googlesource.com/1029113
Reviewed-by: Zijie He <zijiehe@chromium.org>
Commit-Queue: Weiyong Yao <braveyao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554299}
[modify] https://crrev.com/18b6eee163f276a6023f51a68b7b8e71328b748e/content/browser/media/capture/desktop_capture_device.cc

Labels: Needs-Feedback
Tested this issue on MacBook Pro 10.13.3 on the build without fix 68.0.3406.0 and the build with fix 68.0.3415.0.
Unable to reproduce the issue on the build without fix by following the steps given in the original comment.

Able to share the screen via Hangouts and no hang is observed when the screen resolution is changed.
Tried changing the resolution in System Preferences as well and no freeze is observed on the screen.

Attached is the screen cast for reference.

braveyao@ Request you to check and confirm if anything is missed from our end in testing the issue.
Also help us in verifying the fix on the latest M-68 68.0.3415.0 build.

Thanks...
836978.mp4
10.3 MB View Download
Status: Verified (was: Assigned)
Thanks susan.boorgula@ for the verification! Seems that I didn't make myself clear in the original report, that it's the video stream freezes, not the App/Page. 

Verified on Mac with Canany 68.0.3414.0.

Comment 10 by q...@chromium.org, Apr 30 2018

Cc: q...@chromium.org
Labels: -Needs-Feedback Merge-Request-67
Project Member

Comment 11 by sheriffbot@chromium.org, Apr 30 2018

Labels: -Merge-Request-67 Merge-Review-67 Hotlist-Merge-Review
This bug requires manual review: M67 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Before we approve merge to M67, please answer followings:
* Is this M67 regression? Is it critical?
* Is the change well baked/verified in Canary, having enough automation tests coverage and safe to merge to M67?
* Any other important details to justify the merge.

Please note M67 is already in Beta, so merge bar is VERY high. Thank you
- This is a regression happened in this Feb. It's not so critical itself, but it blocks the fix for  issue 836979 .
- Yes. It's verified in Canary.
- Several other CL have been landed due to the regression. For example  issue 827300 .
Thank you  braveyao@.

Only Cl listed at #7 need a merge to M67 and it is a fully safe merge?
Yes, that's true.

Oh, the example for  issue827300  only shows that this is a safe fix and will be a safe merge, which did the same thing in #7 here.
Labels: -Merge-Review-67 Merge-Approved-67
Approving merge for CL listed at #7 to M67 branch 3396 based on comments #13 and #15. Please merge ASAP. 
Project Member

Comment 17 by bugdroid1@chromium.org, Apr 30 2018

Labels: -merge-approved-67 merge-merged-3396
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/586a16d084f4c0a4a467914399a2b0cd1be29ac5

commit 586a16d084f4c0a4a467914399a2b0cd1be29ac5
Author: braveyao <braveyao@chromium.org>
Date: Mon Apr 30 19:43:45 2018

[Mac] Force a MessageLoop::TYPE_UI for the desktopCaptureThread

In a recent CL, https://chromium-review.googlesource.com/c/chromium/src/+/681850,
MesasgePumpDefault is used for MessageLoop::TYPE_DEFAULT on OSX.
This requests the desktopCaptureThread to be adjusted to run as
a UI thread, otherwise the CFRunLoop won't run again after
display resolution changes.

Bug:  836978 
Change-Id: Ifb460f19dca4741359d93bb73e280404d62c5a05
Reviewed-on: https://chromium-review.googlesource.com/1029113
Reviewed-by: Zijie He <zijiehe@chromium.org>
Commit-Queue: Weiyong Yao <braveyao@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#554299}(cherry picked from commit 18b6eee163f276a6023f51a68b7b8e71328b748e)
Reviewed-on: https://chromium-review.googlesource.com/1035963
Reviewed-by: Weiyong Yao <braveyao@chromium.org>
Cr-Commit-Position: refs/branch-heads/3396@{#393}
Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428}
[modify] https://crrev.com/586a16d084f4c0a4a467914399a2b0cd1be29ac5/content/browser/media/capture/desktop_capture_device.cc

Labels: Needs-Feedback
Re-Tested this issue on MacBook Pro 10.13.3 on the build without fix 68.0.3410.0 and unable to reproduce the issue.
Able to share the screen via Hangouts and no video freeze is observed when the screen resolution is changed.

braveyao@ Request you to check and help us in verifying the fix on the latest M-67 67.0.3396.30 build.

Thanks..

Labels: -Needs-Feedback
M-67 67.0.3396.30 works fine now.
[bulk-edit: disregard if N/A] Can the owner please set milestone to this bug if applicable?
Labels: M-68

Sign in to add a comment