ImageDecoder DCHECK is hit when browsing big PNGs on low mem device
Reported by
hu...@vewd.com,
Dec 29 2017
|
|||
Issue descriptionWhat steps will reproduce the problem? 1. Build content_shell_apk with dcheck_always_on=true 2. out/Android/bin/content_shell_apk launch --args='--enable-low-end-device-mode' http://logikbyran.se/big.png What is the expected result? No DCHECK crash. What happens instead? DCHECK is hit => Renderer crashes. Tentative fix: - DCHECK(requested_decoded_bytes <= max_decoded_bytes); - max_decoded_bytes = requested_decoded_bytes; + max_decoded_bytes = std::min(requested_decoded_bytes, max_decoded_bytes);
,
Jan 2 2018
,
Jan 2 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9d1809c798a342dc34d8be2d90495c541a43145a commit 9d1809c798a342dc34d8be2d90495c541a43145a Author: Vladimir Levin <vmpstr@chromium.org> Date: Tue Jan 02 23:55:04 2018 images: Ensure we always request the min of max bytes or desired bytes. On low end android, MaxDecodedImageBytes() might return a value that is smaller than the size we request. The reason we request a larger size is that only some of the codecs support decoding to a smaller size, and for things like PNGs we would still be requesting an intrinsic size even though the max bytes is smaller than that. This trips up a DCHECK. The fix, as suggested by the bug reporter, is to take the minimum of desired bytes and max bytes. R=chrishtr@chromium.org Bug: 798110 Change-Id: I092541359164f4e08af68bf0e7939f2a9f8c8237 Reviewed-on: https://chromium-review.googlesource.com/847632 Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Commit-Queue: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#526551} [modify] https://crrev.com/9d1809c798a342dc34d8be2d90495c541a43145a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
,
Jan 4 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mart_s...@mail.ru
, Dec 31 2017