Animated image freezes if it is discarded while still decoding

RESOLVED FIXED in Firefox 56

Status

()

defect
P3
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: aosmond, Assigned: aosmond)

Tracking

({regression})

55 Branch
mozilla57
Points:
---
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox55 wontfix, firefox56 fixed, firefox57 fixed)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
An animated image is frozen on the last composited frame if it did not finish decoding before the surface was discarded.

STR:

1) Find a really, really big animated image (I transcoded a 30 minute video to a GIF). Alternatively, go to a really slow HTTP server which prevents us from finishing the decoding in a timely manner (but we still get a few frames).

2) From about:memory, minimize memory.

3) Return to the original tab, animated image has stopped advancing.
(Assignee)

Updated

2 years ago
Assignee: nobody → aosmond
Blocks: 1343341
Status: NEW → ASSIGNED
Has STR: --- → yes
Keywords: regression
Priority: -- → P3
Whiteboard: [gfx-noted]
(Assignee)

Updated

2 years ago
Attachment #8895369 - Flags: review?(tnikkel)
Duplicate of this bug: 1372532
Comment on attachment 8895369 [details] [diff] [review]
Ensure animations resume when the image surfaces are discarded while still decoding., v1

Awesome, thanks!

This is probably what is causing bug 1372532.
Attachment #8895369 - Flags: review?(tnikkel) → review+

Comment 4

2 years ago
Pushed by aosmond@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0f0344d938ce
Ensure animations resume when the image surfaces are discarded while still decoding. r=tnikkel

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/0f0344d938ce
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Please nominate this for Beta approval when you get a chance.
Flags: needinfo?(aosmond)
Version: unspecified → 55 Branch
(Assignee)

Comment 7

2 years ago
Comment on attachment 8895369 [details] [diff] [review]
Ensure animations resume when the image surfaces are discarded while still decoding., v1

Approval Request Comment
[Feature/Bug causing the regression]: 1343341
[User impact if declined]: Animations may appear frozen to the user. Expected to be rare.
[Is this code covered by automated tests?]: Yes. A mochitest verifies we can discard and redecode an animated image; this test did not catch the bug before but the new change generalizes the original behaviour such that this test can be considered exercising the relevant code.
[Has the fix been verified in Nightly?]: Yes, manually by me.
[Needs manual test from QE? If yes, steps to reproduce]: No.
[List of other uplifts needed for the feature/fix]: None.
[Is the change risky?]: No.
[Why is the change risky/not risky?]: It is small and well contained. I would say the biggest risk is if somehow we end up discarding the composited frame more often, but we easily recover from that.
[String changes made/needed]: None.
Flags: needinfo?(aosmond)
Attachment #8895369 - Flags: approval-mozilla-beta?
Comment on attachment 8895369 [details] [diff] [review]
Ensure animations resume when the image surfaces are discarded while still decoding., v1

Fix an UI behavior. Beta56+. Should be in 56.0b3.
Attachment #8895369 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
(In reply to Andrew Osmond [:aosmond] from comment #7)
> [Is this code covered by automated tests?]: Yes. A mochitest verifies we can
> discard and redecode an animated image; this test did not catch the bug
> before but the new change generalizes the original behaviour such that this
> test can be considered exercising the relevant code.
> [Has the fix been verified in Nightly?]: Yes, manually by me.
> [Needs manual test from QE? If yes, steps to reproduce]: No.

Setting qe-verify- based on Andrew's assessment on manual testing needs and the fact that this fix has automated coverage.
You need to log in before you can comment on or make changes to this bug.