New issue
Advanced search Search tips

Issue 831773 link

Starred by 6 users

Issue metadata

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


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment

DevTools: capture full page screenshot renders blank page

Project Member Reported by pfeldman@chromium.org, Apr 11 2018

Issue description

- Start Chrome on MacOS
- Go to https://developers.google.com/web/tools/chrome-devtools/
- Open DevTools
- Hit Cmd+Shift+P, type "full"
- Choose the "Capture full size streenshot"

Expected: 4Mb+ PNG with full page content
Actual: 500Kb PNG that is blank

Bisect range: https://chromium.googlesource.com/chromium/src/+log/1e290a054df71ea6df7aa8f870f85e84a0540935..5157f928d980f7913d23144c597438d4c4f65699

Suspected CL: https://chromium.googlesource.com/chromium/src/+/e544a1ed8f62f4416060033ee0ff2ca0050af896
 
Labels: -Pri-3 Pri-1

Comment 2 by yiyix@chromium.org, Apr 11 2018

Status: Started (was: Assigned)

Comment 3 by yiyix@chromium.org, Apr 11 2018

It is unrealistic to fix this issue in 24 hour (the stable branch cut date is tomorrow). My fix may introduce new bugs as well. 

If this bug is just reported after living in dev channel for so long, it may not be a release blocker bug.

Comment 4 by yiyix@chromium.org, Apr 12 2018

It also happens with windows and linux. 

I found the following:

1. it's kinda broken without my patch. It doesn't do a full screen capture.... it's cut at the end. 

2. The bug is not in the CopyReuqest. The crash is due to "dimensions out of range". Because the TextureManager::ValidForTarget returns false. As the total height passed the maximum size. I also tried the take screenshot of wikipedia of different length, all pages with height less than maximum height works.

the Maximum height allowed is 0x4000, or 16384.

I need to understand why we have this height request, and how to update the height.
developers.google.com_web_tools_chrome-devtools_ (2).png
3.4 MB View Download

Comment 5 by yiyix@chromium.org, Apr 12 2018

3. If chrome is run with --disable-gpu, then this capture full page works. 
Thank you for the investigation. Do you know what change triggered the failure? We used to cap at 0x4000 and that was a known limitation.

Also, Chrome Mac Stable (65.0.3325.181) produces the full size screenshot of theverge.com with 1740 × 19970 pixels dimensions for me - the 0x4000 limit does not seem to apply there, a bug? Probably due to the device scale factor being 2.

Comment 7 by piman@chromium.org, Apr 12 2018

Cc: danakj@chromium.org m...@chromium.org
The maximum texture size is driver/hardware dependent, only the minimum of 2048 is guaranteed. See https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glGet.xhtml under GL_MAX_TEXTURE_SIZE
This is what TextureManager::ValidForTarget checks for.


We don't really have (never had) a facility to take a copy via multiple textures (which would really have to mean, composite multiple times). Clamping to the max texture size is probably the best workaround here, we probably were doing that in the old path and not the new one?

Comment 8 by yiyix@chromium.org, Apr 12 2018

I tried to take a full size screenshot of theverge.com on linux with stable channel. it's still cut for me.  
www.theverge.com_.png
8.1 MB View Download
Project Member

Comment 9 by bugdroid1@chromium.org, Apr 12 2018

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

commit b0634a799e9fb68487132d97b9fae7531492a491
Author: Pavel Feldman <pfeldman@chromium.org>
Date: Thu Apr 12 18:00:39 2018

DevTools: capture full page screenshot renders blank page for pages higher than 0x4000px.

Bug:  831773 
Change-Id: Ia5dfad17af526b495c38d6827292364a1d505dba
TBR: dgozman
Reviewed-on: https://chromium-review.googlesource.com/1010476
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550264}
[modify] https://crrev.com/b0634a799e9fb68487132d97b9fae7531492a491/third_party/blink/renderer/devtools/front_end/emulation/DeviceModeModel.js

I'm aware of the 16K limitation, I already landed the cap on the client side that I intend to merge everywhere (https://chromium-review.googlesource.com/c/chromium/src/+/1010476).

But a couple of things are mysterious to me:


- As I mention in comment #6, Mac is capable of capturing higher screenshots, probably due to the difference in the device scale as I mention in the same comment. I wonder why...
- I don't think --disable-gpu works around it. We've observed similar capture cap in headless chrome that has no gpu.

Comment 11 by yiyix@chromium.org, Apr 12 2018

I tried your patch, it worked!@!!!!!! Thank you so much for helping out!!!! I don't know this part of the chrome at all!

Do you want me to merge to the stable branch or you will do it?


Labels: Needs-Feedback
Tried checking the issue on latest canary 67.0.3396.0 and on 67.0.3393.0(Assuming this version with issue i.e., without fix) using Mac 10.13.1 with the below mentioned steps.
1. Launched Chrome
2. Navigated to https://developers.google.com/web/tools/chrome-devtools/
3. Hit Cmd+Shift+P and typed "full"
4. Have Chosen the "Capture full size screenshot"
We are able to see the images captured in both the above mentioned versions are same i.e., 3.6MB. Attaching the captured images for reference. 

@Pavel Feldman: Could you please have a look at the screen shots provided and please help us in verifying the fix.

Thanks!
developers.google.com_web_tools_chrome-devtools_.png
3.4 MB View Download
developers.google.com_web_tools_chrome-devtools_ (1).png
3.4 MB View Download
How safe is this fix overall? And how widely does this impact developers? My preference is to wait until M67, however if this is critical and a safe fix, then we should consider a merge to 66. 

Comment 14 by yiyix@chromium.org, Apr 15 2018

Cc: pfeldman@chromium.org
@pdeldman: could you provide some feedback to comment 13?

I personally feel that it's safe to merge to m66.

Comment 15 by yiyix@chromium.org, Apr 15 2018

Cc: nyerramilli@chromium.org yiyix@chromium.org pwnall@chromium.org rbasuvula@chromium.org
 Issue 812518  has been merged into this issue.

Comment 16 by yiyix@chromium.org, Apr 16 2018

Cc: dgozman@chromium.org
+Dmitry Gozman for feedbacks 
abdulsyed@: it is very safe, how are we looking with the timeline though? It is not worth merging into stable, but if we are still facing another beta, we should do it.
We have stable tomorrow. My recommendation is to punt it to 67. 
Project Member

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

Labels: merge-merged-testbranch
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b0634a799e9fb68487132d97b9fae7531492a491

commit b0634a799e9fb68487132d97b9fae7531492a491
Author: Pavel Feldman <pfeldman@chromium.org>
Date: Thu Apr 12 18:00:39 2018

DevTools: capture full page screenshot renders blank page for pages higher than 0x4000px.

Bug:  831773 
Change-Id: Ia5dfad17af526b495c38d6827292364a1d505dba
TBR: dgozman
Reviewed-on: https://chromium-review.googlesource.com/1010476
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550264}
[modify] https://crrev.com/b0634a799e9fb68487132d97b9fae7531492a491/third_party/blink/renderer/devtools/front_end/emulation/DeviceModeModel.js

I’ve received a dozen reports of this issue from people using my screenshotting extension, which means it’s probably happening to a much larger # of people. Do you have any suggestions on what can I tell them other than to wait ~1.5 months?
Has this fix been verified in Dev? Which branch is this merged in?

Comment 22 by yiyix@chromium.org, Apr 23 2018

it's verified in comment 12 i believe.
It's merged in to 67.0.3396.0.
Labels: -M-66 M-67

Comment 24 by yiyix@chromium.org, Apr 25 2018

Status: Fixed (was: Started)
I just received a report of this still happening to someone who is running Chrome 67.0.3396 on Mac OS X 10.11.6. They verified that running Chrome as `/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-gpu` was able to successfully capture a screenshot.

Comment 26 Deleted

Comment 27 by yiyix@chromium.org, Jun 21 2018

@peter: Could you please create a new bug with details on the users' hardware specifications? Thank you.

Sign in to add a comment