Crash due animated WebP images

RESOLVED FIXED in Firefox 65

Status

()

defect
P3
critical
RESOLVED FIXED
10 months ago
10 months ago

People

(Reporter: sjw, Assigned: aosmond)

Tracking

({crash, crashreportid})

Trunk
mozilla65
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox-esr60 unaffected, firefox63 unaffected, firefox64 unaffected, firefox65 fixed)

Details

(crash signature, )

Attachments

(1 attachment)

Firefox Nightly crashes reproducible when displaying animated WebP images.
See the test cases in the referenced url.
It does not crash immediately, but after a while. At times the images flicker or do not appear at all just before crashing.

Crash ID:
https://crash-stats.mozilla.com/report/index/09732bfa-67c6-485c-a9db-32f3f0181101
Assignee: nobody → aosmond
Status: NEW → ASSIGNED
Flags: needinfo?(aosmond)
Priority: -- → P3
Crash Signature: mozilla::image::DecoderFactory::CloneAnimationDecoder → [@ mozilla::image::DecoderFactory::CloneAnimationDecoder]
I forgot to mention, that "image.webp.enabled" need to be enabled.
I understand the crash, uber my bad. However I am seeing artifacting on the lossless animated images which is very concerning.
First we did not handle the SourceBufferIterator::WAITING state which
can happen when we get woken up but there is no data to read from the
SourceBufferIterator. StreamingLexer handled this properly by yielding
with NEED_MORE_DATA, and properly scheduling the decoder to resume. This
patch does the same in the WebP decoder.

Second nsWebPDecoder::GetType was not implemented. This meant it would
return DecoderType::UNKNOWN, and would fail to recreate the decoder if
we are discarding frames and need to restart from the beginning. In
addition to implementing that method, this patch also corrects an assert
in DecoderFactory::CloneAnimationDecoder which failed to check for WebP
as a supported animated decoder.

This patch also modestly improves the logging output and library method
checks.
(In reply to Andrew Osmond [:aosmond] from comment #2)
> I understand the crash, uber my bad. However I am seeing artifacting on the
> lossless animated images which is very concerning.

I think those may have been caused by the WAITING bug where it would "randomly" stop decoding midway through due to no network traffic.
Flags: needinfo?(aosmond)
This bug will probably help with some of the intermittents I was seeing on treeherder.
try with new gtests to exercise functionality that was broken: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6e233bd240e70e64942577400e874f7a18b66b1f
Pushed by aosmond@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5223058ac4ff
Fix some WebP decoder implementation bugs. r=tnikkel
https://hg.mozilla.org/mozilla-central/rev/5223058ac4ff
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Duplicate of this bug: 1504120
You need to log in before you can comment on or make changes to this bug.