New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 681988 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
not on Chrome anymore
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Screenshot capture not working on android

Reported by w...@coding-tech.com, Jan 17 2017

Issue description

Steps to reproduce the problem:
1. inspect mobile page on android phone
2. Record timeline with screenshots enabled
3. Timeline captured without screenshots

What is the expected behavior?
It should work the same as chrome for desktop. Include screenshots in the trace.

What went wrong?
No screenshots in trace

Did this work before? N/A 

Chrome version: 55.0.2883.95  Channel: stable
OS Version: Android 6
Flash Version: Shockwave Flash 24.0 r0

Lighthouse uses these traces but they don't work on android. See bug https://github.com/GoogleChrome/lighthouse/issues/1260
 
airhorner.com_2017-01-14_17-49-37-0.trace.json
2.4 MB View Download

Comment 1 by caseq@chromium.org, Jan 17 2017

Cc: paulir...@chromium.org
Labels: Needs-Feedback
I've just tried this locally and it works for me. The recorded trace does not look like one produced by DevTools -- was it obtained via lighthouse?
Thanks for responding so fast. Are you capturing a trace from your android device?

Comment 3 by caseq@chromium.org, Jan 17 2017

Yes. I wonder if in your scenario the inspected tab is actually active and visible -- for example, when you're not recording timeline, can you see screen cast updates on the left?
I have an open screen on my android chrome. I added a trace from desktop & android with just devtools + added a screenshot as well
shop-polymer-desktop.json
24.5 MB Download
shop-polymer-android.json
4.0 MB View Download
Schermafdruk 2017-01-17 23.30.48.png
785 KB View Download

Comment 5 by caseq@chromium.org, Jan 17 2017

Components: -Platform>DevTools Platform>DevTools>Performance
Labels: -Needs-Feedback
Owner: caseq@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks, I've been able to reproduce this. FWIW, this seems to only happen during reload.
any news? on this issue :)

Comment 7 by caseq@chromium.org, Feb 16 2017

Cc: jbau...@chromium.org fsam...@chromium.org kbr@chromium.org caseq@chromium.org
Components: -Platform>DevTools>Performance Internals>Compositing
Labels: -Pri-2 Pri-1
Owner: ----
Status: Available (was: Assigned)
Summary: Screenshot capture not working on android (was: DevTools: Screenshot capture not working)
I tracked this down to callback passed to RenderWidgetHostViewAndroid::CopyFromCompositingSurface() being invoked with READBACK_FAILED. This appears to happen from within Surface::ClearCopyRequests() when it's invoked when a pending frame is being activated from within Surface::QueueFrame().
Adding some CC folks in a hope they would be able to help with that.

Some notes on reproducing this:
- some request get through successfully, but the majority is lost;
- reproduces well on stable and on ToT;
- you can either record timeline with screenshots or just open remote DevTools and observe that the screencast pane on the left is nor promptly updated most of the time when you scroll;
- does not seem to ever happen on desktop (linux), even with forced GPU rasterization.

Comment 8 by kbr@chromium.org, Feb 17 2017

Cc: aelias@chromium.org sunn...@chromium.org
Thanks for triaging this. I don't know who from the Chrome GPU team is best to help investigate. I'm pretty sure the GPU bots use this code path, though not as stressfully as the timeline view, and the pixel tests are running pretty reliably there. (See the Android bots on https://build.chromium.org/p/chromium.gpu.fyi .)

Cc: danakj@chromium.org
I see you mentioned pending frames getting activated. Note that surface dependency tracking has not yet been turned on in Chrome (I just finished landing the first set of patches this week). I don't think surface dependency tracking / surface synchronization has any influence on this. +danakj@ who knows more about copy requests.
Yeah, currently we attach the copy request to the root pass of the current frame in the surface, so if the timing's wrong a new frame could be given from the renderer before the surface is aggregated and the copy request is executed.

We could try saving CopyOutputRequests separately so that the can live across frames.

Comment 11 by caseq@chromium.org, Feb 22 2017

So would anyone be able to take care of this reasonably soon? A couple of rather important DevTools features depend on it and since a bunch of tests also depends on getting the screenshots, I guess this may contribute to overall flakiness and mask other problems, as already happened in the past.
Owner: jbau...@chromium.org
Status: Assigned (was: Available)
The clearing behaviour has been there since https://chromium.googlesource.com/chromium/src/+/2cd9f8f5c3acf503ade180a5584a2c5c1e1004e1

I don't see anything in the CL description explaining the intention. Shall we just not clear from QueueFrame?
Project Member

Comment 13 by bugdroid1@chromium.org, Mar 1 2017

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

commit 37b0e1379938325304eeaff6afb9e7cb9f8bb618
Author: jbauman <jbauman@chromium.org>
Date: Wed Mar 01 03:04:30 2017

Don't delete CopyOutputRequests when queueing a new Surface frame.

This reduces the risk that the CopyOutputRequests will be discarded
unnecessarily. This only affects CopyOutputRequests created through
SurfaceFactory::RequestCopyOfSurface, as requests submitted on
RenderPasses directly with the frame will still be discarded.

BUG= 681988 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2695243006
Cr-Commit-Position: refs/heads/master@{#453807}

[modify] https://crrev.com/37b0e1379938325304eeaff6afb9e7cb9f8bb618/cc/surfaces/surface.cc
[modify] https://crrev.com/37b0e1379938325304eeaff6afb9e7cb9f8bb618/cc/surfaces/surface_unittest.cc

Status: Fixed (was: Assigned)
Cool, works for me now -- thanks a lot!
on which chrome (dev, beta, canary, ...) can I test this? :)

Chrome canary but after canary is updated again. Hopefully in 12 hours.
Cc: phulce@chromium.org

Sign in to add a comment