Closed
Bug 691792
Opened 13 years ago
Closed 13 years ago
Change of src attribute for animated gifs no longer works as expected
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
People
(Reporter: jwir3, Assigned: jwir3)
References
Details
(Keywords: regression)
Attachments
(3 files, 2 obsolete files)
After the merge of bug 666446, it appears that some animated gif images don't animate after a src attribute is changed. An example testcase has been added to this bug.
This appears to be an issue with a small block of code included in the original patches for bug 666446 not being included in the final patches that were landed on 10-03-11.
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → sjohnson
Comment 1•13 years ago
|
||
Maybe you can fix bug 629411 as part of this, so we can catch it next time :)
Assignee | ||
Comment 2•13 years ago
|
||
(In reply to Joe Drew (:JOEDREW!) from comment #1)
> Maybe you can fix bug 629411 as part of this, so we can catch it next time :)
Well, actually I added a test for this as part of the tests I added for bug 666446. It only happens in certain cases, though, because the unit test is passing, but when I use it in an interactive context, it isn't working as expected.
Assignee | ||
Comment 3•13 years ago
|
||
Also pushed to try, try-chooser should automatically post here about that when it's done building.
Attachment #564656 -
Flags: review?(dholbert)
Assignee | ||
Comment 4•13 years ago
|
||
I should mention regarding the patch - the only thing that is new is the tests. The rest of the code was already pre-reviewed as part of bug 666446, but didn't make it into the final set of patches (probably a merge error on my part).
Comment 5•13 years ago
|
||
Comment on attachment 564656 [details] [diff] [review]
Patchv1
>+ bool* requestFlag = GetRegisteredFlagForRequest(aRequest);
>+ if (requestFlag) {
>+ nsLayoutUtils::RegisterImageRequest(GetFramePresContext(), aRequest,
>+ requestFlag);
>+ }
It looks like nsLayoutUtils::RegisterImageRequest already null-checks requestFlag (as well as checking if its pointed-to-value is true). So, probably no need to check it here, right?
> NS_IMETHODIMP nsBulletListener::OnStartContainer(imgIRequest *aRequest,
> imgIContainer *aImage)
> {
> if (!mFrame)
>- return NS_ERROR_FAILURE;
>+ return NS_OK;
There aren't any bullets in the live portion of the testcase, AFAICT. Is this change still necessary to fix this? Is it possible to regression-test whatever's broken in this bullet code?
>+++ b/modules/libpr0n/test/mochitest/test_changeOfSource2.html
>@@ -0,0 +1,48 @@
>+<!DOCTYPE HTML>
>+<html>
>+<!--
>+https://bugzilla.mozilla.org/show_bug.cgi?id=666446
>+-->
>+<head>
>+ <title>Test for Bug 666446 - Change of Source (2nd Version)</title>
[...]
>+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=666446">
>+Mozilla Bug 666446: lots of animated gifs swamp us with paint events
>+</a>
It's probably better to have these bug links point to this bug, but it doesn't matter supermuch.
>+const FAILURE_TIMEOUT = 15000; // Fail early after 120 seconds (2 minutes)
As noted in IRC, this needs a tweak ;)
Assignee | ||
Comment 6•13 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #5)
>
> It looks like nsLayoutUtils::RegisterImageRequest already null-checks
> requestFlag (as well as checking if its pointed-to-value is true). So,
> probably no need to check it here, right?
Yes, that's true. I've removed the check.
> There aren't any bullets in the live portion of the testcase, AFAICT. Is
> this change still necessary to fix this? Is it possible to regression-test
> whatever's broken in this bullet code?
Yes, that is true. This was a piece of code that was changed in the original patch (or was supposed to be changed in the original patch), that didn't make it into the final version. (See https://bugzilla.mozilla.org/show_bug.cgi?id=666446#c320)
> It's probably better to have these bug links point to this bug, but it
> doesn't matter supermuch.
Fixed.
> As noted in IRC, this needs a tweak ;)
Fixed.
I made these fixes in my local patch repository, and we can land it tomorrow.
Comment 7•13 years ago
|
||
Comment on attachment 564656 [details] [diff] [review]
Patchv1
(In reply to Scott Johnson (:jwir3) from comment #6)
> (In reply to Daniel Holbert [:dholbert] from comment #5)
> >
> > It looks like nsLayoutUtils::RegisterImageRequest already null-checks
> > requestFlag (as well as checking if its pointed-to-value is true). So,
> > probably no need to check it here, right?
>
> Yes, that's true. I've removed the check.
Sorry - I'd misread the null-check in RegisterImageRequest (I initially thought we'd early-return if requestFlag was null).
Per IRC discussion, I think we want to keep your patch's null-check, and just add an "else" clause with an NS_NOTREACHED or NS_ERROR, since (IIUC) we don't expect to be decoding images other than our current/pending requests.
r=me with that fixed.
> Yes, that is true. This was a piece of code that was changed in the original
> patch (or was supposed to be changed in the original patch), that didn't
> make it into the final version. (See
> https://bugzilla.mozilla.org/show_bug.cgi?id=666446#c320)
Ok, sounds good.
Attachment #564656 -
Flags: review?(dholbert) → review+
Comment 8•13 years ago
|
||
Try run for cd444c824d8c is complete.
Detailed breakdown of the results available here:
https://tbpl.mozilla.org/?tree=Try&rev=cd444c824d8c
Results (out of 171 total builds):
exception: 1
success: 148
warnings: 17
failure: 5
Builds available at http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/sjohnson@mozilla.com-cd444c824d8c
Assignee | ||
Comment 9•13 years ago
|
||
The final version of this patch is available at:
http://hg.mozilla.org/users/sjohnson_mozilla.com/patches/file/3f4a88de6d4f/b691792
I am pushing again to try to verify that the problems found in comment 8 were resolved.
Assignee | ||
Comment 10•13 years ago
|
||
The oranges for this bug on try push https://tbpl.mozilla.org/?tree=Try&rev=b4191222b830 appear to be random intermittent oranges. So, it looks like this bug should be ready to push to m-i.
Note that the latest version of the patch is at:
http://hg.mozilla.org/users/sjohnson_mozilla.com/patches/file/3f4a88de6d4f/b691792
Keywords: checkin-needed
Comment 11•13 years ago
|
||
(In reply to Scott Johnson (:jwir3) from comment #10)
> Note that the latest version of the patch is at:
> http://hg.mozilla.org/users/sjohnson_mozilla.com/patches/file/3f4a88de6d4f/b691792
Is it different from the one attached to this bug? If so, please attach the patch that's supposed to land.
"Fix regression issues introduced by bug 666446" is not a reasonable commit message, please fix this as well.
Keywords: checkin-needed
Assignee | ||
Comment 12•13 years ago
|
||
Dao, thanks for your comments. I have fixed the issues you have described.
Attachment #564656 -
Attachment is obsolete: true
Attachment #565237 -
Flags: review+
Attachment #565237 -
Flags: checkin?(dao)
Updated•13 years ago
|
Keywords: checkin-needed
Updated•13 years ago
|
Attachment #565237 -
Flags: checkin?(dao) → checkin?
Comment 13•13 years ago
|
||
Try run for b4191222b830 is complete.
Detailed breakdown of the results available here:
https://tbpl.mozilla.org/?tree=Try&rev=b4191222b830
Results (out of 216 total builds):
exception: 1
success: 173
warnings: 18
failure: 24
Builds available at http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/sjohnson@mozilla.com-b4191222b830
Updated•13 years ago
|
status-firefox10:
--- → affected
tracking-firefox10:
--- → ?
Updated•13 years ago
|
Keywords: checkin-needed
Comment 14•13 years ago
|
||
Sorry, no longer applies cleanly to inbound. If it were just a hunk or two I'd try to fix locally, but quite a bit doesn't apply, so I'd likely just end up breaking something:
{
patching file modules/libpr0n/test/mochitest/Makefile.in
Hunk #1 FAILED at 95
1 out of 1 hunks FAILED -- saving rejects to file modules/libpr0n/test/mochitest/Makefile.in.rej
unable to find 'modules/libpr0n/test/mochitest/animationPolling.js' for patching
5 out of 5 hunks FAILED -- saving rejects to file modules/libpr0n/test/mochitest/animationPolling.js.rej
unable to find 'modules/libpr0n/test/mochitest/test_changeOfSource.html' for patching
1 out of 1 hunks FAILED -- saving rejects to file modules/libpr0n/test/mochitest/test_changeOfSource.html.rej
}
Status: NEW → ASSIGNED
Updated•13 years ago
|
Attachment #565237 -
Flags: checkin?
Assignee | ||
Comment 15•13 years ago
|
||
(In reply to Ed Morley [:edmorley] from comment #14)
> Sorry, no longer applies cleanly to inbound. If it were just a hunk or two
> I'd try to fix locally, but quite a bit doesn't apply, so I'd likely just
> end up breaking something:
> {
> patching file modules/libpr0n/test/mochitest/Makefile.in
> Hunk #1 FAILED at 95
> 1 out of 1 hunks FAILED -- saving rejects to file
> modules/libpr0n/test/mochitest/Makefile.in.rej
> unable to find 'modules/libpr0n/test/mochitest/animationPolling.js' for
> patching
> 5 out of 5 hunks FAILED -- saving rejects to file
> modules/libpr0n/test/mochitest/animationPolling.js.rej
> unable to find 'modules/libpr0n/test/mochitest/test_changeOfSource.html' for
> patching
> 1 out of 1 hunks FAILED -- saving rejects to file
> modules/libpr0n/test/mochitest/test_changeOfSource.html.rej
> }
Bug 666446 was backed out while we sort out regressions, and this depends on those patches. Chances are this will be added into the set of patches that are ultimately pushed up for that bug, so this might be able to be closed.
Comment 16•13 years ago
|
||
(In reply to Scott Johnson (:jwir3) from comment #15)
> Bug 666446 was backed out while we sort out regressions
Ah yes, just spotted that in this morning's bugmail :-)
Assignee | ||
Comment 17•13 years ago
|
||
This is no longer a problem, as bug 666446 was backed out. When bug 666446 is sent back up, this patch will be included in the patches for bug 666446.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 18•13 years ago
|
||
Setting "in-testsuite?" flag to remind us to be sure we've got a test for this. (I think you've already written one, so just set the flag to "+" sometime after that test lands.)
Flags: in-testsuite?
Updated•13 years ago
|
Comment 19•13 years ago
|
||
I think this bug reappeared in Firefox 11.0. While the provided example seems to work fine in Firefox 11 I managed to write a test case where it still happens. When you click back and forth between the two buttons in the attachment "pony_gets_stuck.html" the animation gets stuck eventually (at the second or third click). The buttons change the src attribute and the width and height styles.
I used a data:-url in the example just so everything is included in the html file. The same thing occurs when it's a normal url to a gif on a web server.
Comment 20•13 years ago
|
||
When you click back and forth between the two buttons in the attachment "pony_gets_stuck.html" the animation gets stuck eventually (at the second or third click). The buttons change the src attribute and the width and height styles.
I used a data:-url in the example just so everything is included in the html file. The same thing occurs when it's a normal url to a gif on a web server.
Updated•13 years ago
|
Attachment #613206 -
Attachment mime type: text/plain → text/html
Comment 21•13 years ago
|
||
When you click back and forth between the two buttons in the attachment "pony_gets_stuck.html" the animation gets stuck eventually (at the second or third click). The buttons change the src attribute and the width and height styles.
I used a data:-url in the example just so everything is included in the html file. The same thing occurs when it's a normal url to a gif on a web server.
Attachment #613206 -
Attachment is obsolete: true
Comment 22•13 years ago
|
||
panzi: Thanks for the report!
For the record, I can't actually reproduce the problem you describe (i tried Firefox 11 & our Nightly builds, with lots of clicking back and forth, and it still animated).
However, regardless of that -- we should track the issue you describe in a new bug, rather than building off of an existing bug report.
So -- if you could file a new bug for this, that would be great. Here's the URL with product/component already filled out:
https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=ImageLib
Thanks!
Comment 23•13 years ago
|
||
Ok, I wrote a report. See bug 743598
FYI: I'm not the only one that has this bug. Actually some user of a script of mine reported it to me. I usually use Chrome and didn't notice this myself, but I was able to reproduce it. (It's not often that I find a bug that someone else also has. Usually it's "cant reproduce, must be your setup".)
You need to log in
before you can comment on or make changes to this bug.
Description
•