Closed Bug 130876 Opened 23 years ago Closed 21 years ago

some .gifs don't display

Categories

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

x86
All
defect

Tracking

()

VERIFIED FIXED
mozilla1.0

People

(Reporter: Braindead, Assigned: lorenzo)

References

()

Details

(Keywords: regression)

Attachments

(2 files, 2 obsolete files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.9) Gecko/20020311 BuildID: 20020311 Some of the .gif images dont display. The one's you can[not] see, are empty. But this problem also occures with http://www.t4l-clan.de/gfx/edit.gif and http://www.t4l-clan.de/gfx/del.gif, which are not empty. With 0.9.8 everything is correct. Reproducible: Always Steps to Reproduce: 1.open the page Actual Results: The images dont display Expected Results: visible images
confirming, seeing this on win98 as well. Other people saw this on linux as well.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Summary: some .gifs dont display → some .gifs don't display
This can also be seen on perlmonks.org (search-button and logo)
Also seeing this at the following URLs (2002031104 WinME): http://forum.ngi.it/smiles/love.gif http://forum.ngi.it/smiles/insane.gif Note that this is not a network problem because those images will refuse to load from local files, too. Reporter: as this is a regression from 0.9.8, could you add the regression keyword?
As i fixed the images on my main site, i created a page with the old ones. You can find it here: http://www.t4l-clan.de/bugzilla/bugzilla.html
Hm, when loading edit.gif using The Gimp, I get this message: ** WARNING **: GIF: bogus character 0x00, ignoring (the image is displayed, though)
There is one of the images from Dr. Dobbs Algorithms Collection CD. This is quite valid (at least, it is displayed by IE and Windows Imaging without any complaint), whereas it isn't displayed by Mozilla, build 2002031104, W2K
Keywords: nsbeta1nsbeta1-
This is due to corrupt GIF images without a terminator byte. If there is no terminator byte but the file ends at the end of a data block, the decoder tolerates the file. If there are one or more extra characters after the end of a block, but no terminator, the decoder interprets them as the start of a new (invalid) block and marks the whole gif as invalid. This behaviour seems to go against the GIF87a spec, which says that "Any characters encountered between the end of a previous image and the image separator character are to be ignored."
Attached patch patch (obsolete) — Splinter Review
This patch fixes the problem by only handing setting state gif_error if 0 images were decoded. If there is a missing terminator or an invalid character but some images were decoded then it sets the state to gif_done. It seems a reasonable thing to do but I'm not sure it's exactly the right way to solve the problem. It would probably be better to continue reading the file until a valid start character (',') is found. But this is a start.
Attached patch Revised patch (obsolete) — Splinter Review
Sorry, that was the wrong patch. This is the right one.
Attachment #80251 - Attachment is obsolete: true
Seeking review. It would be nice to have this fixed for 1.0.
taking for 1.0.1. we'll try to get in for 1.0, but it might be too late. tor: can you sr= this?
Priority: -- → P2
Target Milestone: --- → mozilla1.0.1
Attachment #80253 - Flags: review+
Blocks: 137484
Comment on attachment 80253 [details] [diff] [review] Revised patch Remove the old #ifdef section and add a comment saying why you're
setting the gif_done state. Do that and sr=tor.
Attachment #80253 - Flags: superreview+
*** Bug 137484 has been marked as a duplicate of this bug. ***
One question: I am not familiar with libpr0n's memory allocation scheme. In the case of a corrupt GIF, the patch transitions to state gif_done before having read all the file. Might this be a problem for memory management? (e.g. the bytes not read might not be freed...)
Attachment #80253 - Attachment is obsolete: true
Changing URL: the images originally reported seem to be working now.
*** Bug 142436 has been marked as a duplicate of this bug. ***
Comment on attachment 81475 [details] [diff] [review] patch v3 addressing tor's comments r=pavlov tor please re-sr=
Attachment #81475 - Flags: review+
Comment on attachment 81475 [details] [diff] [review] patch v3 addressing tor's comments sr=tor
Attachment #81475 - Flags: superreview+
I can't check the patch in because I don't have CVS access. Can someone check it in for me?
*** Bug 142674 has been marked as a duplicate of this bug. ***
Checking in GIF2.cpp /cvsroot/mozilla/modules/libpr0n/decoders/gif/GIF2.cpp,v <-- GIF2.cpp new revision: 1.31; previous revision: 1.30 done checked in on trunk
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
adding adt1.0.0 and patch keywords
Keywords: adt1.0.0, patch
*** Bug 143884 has been marked as a duplicate of this bug. ***
Win2000, Mozilla Build ID 2002051304: bug no longer exist. Thanks. =^.^=
Verified win 2k trunk build 2002051508, Mac OS X trunk build 2002051508 and linux trunk build 2002051507
Status: RESOLVED → VERIFIED
Comment on attachment 81475 [details] [diff] [review] patch v3 addressing tor's comments a=chofmann,shaver for the 1.0 branch. we need to get in asap if it's going to make the 1.0 train.
Attachment #81475 - Flags: approval+
Keywords: fixed1.0.0
Target Milestone: mozilla1.0.1 → mozilla1.0
Has the fix actually been checked in to the branch? It has the fixed1.0.0 keyword, but I can't see the fix in lxr.
Verified with branch build 2002052009 Linux and branch build 2002052006 WinME. Could someone verify this on Mac?
Keywords: adt1.0.0
Verified Mac OS X build 2002052108
Keywords: verified1.0.0
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Assignee: pavlov → lorenzo
Status: REOPENED → NEW
Status: NEW → RESOLVED
Closed: 23 years ago21 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: