Closed Bug 1160801 Opened 5 years ago Closed 5 years ago

Assertion failure: false (MOZ_ASSERT_UNREACHABLE: Unexpected DisposalMethod) @ mozilla::image::FrameAnimator::DoBlend

Categories

(Core :: ImageLib, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox40 --- affected
firefox41 --- fixed

People

(Reporter: bc, Assigned: seth)

References

(Blocks 1 open bug, )

Details

(Keywords: assertion)

Attachments

(2 files, 2 obsolete files)

Attached file Crash report
1. http://ohnotheydidnt.livejournal.com/?skip=30
2. Assertion failure: false (MOZ_ASSERT_UNREACHABLE: Unexpected DisposalMethod)

Nightly OSX, Linux, Windows 7
Thanks for reporting this! This is potentially serious...
The GIF89a spec defines four disposal methods (see page 16):

http://www.w3.org/Graphics/GIF/spec-gif89a.txt

Disposal methods 0, 1, 2, and 3 are used. 4, 5, 6, and 7 are left undefined by
the spec. We treat 4 as 3, but we currently have no interpretation for 5, 6, or
7. There's no valid value in the DisposalMethod enumeration for these undefined
disposal methods, and that's what caused the assertion to fire.

This patch makes us treat methods 5, 6, and 7 as method 0
(DisposalMethod::NOT_SPECIFIED). This eliminates the assertion, and causes us to
render the GIF in question the same way that WebKit does.

I've also included regression tests, each of which tests correct handling for
one of the undefined disposal methods.
Attachment #8601229 - Flags: review?(jmuizelaar)
Assignee: nobody → seth
Status: NEW → ASSIGNED
Ack, left a print in the previous patch by mistake.
Attachment #8601230 - Flags: review?(jmuizelaar)
Attachment #8601229 - Attachment is obsolete: true
Attachment #8601229 - Flags: review?(jmuizelaar)
Hmm, I can see this test becoming an intermittent orange. Unfortunately I don't think delaytest.html is reliable. =\

Perhaps I should just make these crashtests...
Same C++ code, but switched the tests to just be crashtests.
Attachment #8602387 - Flags: review?(jmuizelaar)
Attachment #8601230 - Attachment is obsolete: true
Attachment #8601230 - Flags: review?(jmuizelaar)
Attachment #8602387 - Flags: review?(jmuizelaar) → review+
Thanks for the review! I went ahead and pushed since all seems well on try.
https://hg.mozilla.org/mozilla-central/rev/d15063ca7a45
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.