Closed Bug 1388733 Opened 7 years ago Closed 7 years ago

Animated image freezes if it is discarded while still decoding

Categories

(Core :: Graphics: ImageLib, defect, P3)

55 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox-esr52 --- unaffected
firefox55 --- wontfix
firefox56 --- fixed
firefox57 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

Details

(Keywords: regression, Whiteboard: [gfx-noted])

Attachments

(1 file)

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: nobody → aosmond
Blocks: 1343341
Status: NEW → ASSIGNED
Has STR: --- → yes
Keywords: regression
Priority: -- → P3
Whiteboard: [gfx-noted]
Attachment #8895369 - Flags: review?(tnikkel)
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+
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
https://hg.mozilla.org/mozilla-central/rev/0f0344d938ce
Status: ASSIGNED → RESOLVED
Closed: 7 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
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.
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.