Closed Bug 185171 Opened 22 years ago Closed 13 years ago

using image cache leads to corrupted images displayed

Categories

(Core :: Graphics: ImageLib, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE
Future

People

(Reporter: stan, Unassigned)

References

()

Details

Attachments

(7 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130

Sometimes, one or several images are uncorrectly displayed.
I've put several images to show the cases.

-First screenshot shows an image which is displayed instead of the correct one.
For this case, reloading the page successfully fixed the problem (see screenshot 2).

-Third screenshot shows no image loaded at all, just the ALT description.
For this case, reloading doesnt work. Clearing the memory cache doesnt work.
Clearing the disk cache fixes the problem (screenshot 4)




Reproducible: Sometimes

Steps to Reproduce:
I have found no way for reproducing this bug.
I can only say that it happened several times in a week.
The URL I've put in the URL field has got a form. If you put no parameter in the
form and validate it, you'll get 239 images on the page. You may reproduce the
problem by playing with it and having your browser open during some time, but
not sure.

Actual Results:  
Sometimes, an image is not displayed or another image is displayed instead.

Expected Results:  
display the correct image.

This bug looks like Bug 58535 which is marked as FIXED. Maybe this is a regression ?
Attached image wrong image displayed
Comment on attachment 109219 [details]
the correct image (4th screenshot) after a clear disk cache

ooops, this is refered as "4th image" in my bug report, sorry.
Attached image image is not displayed at all ! (obsolete) —
ooops this image is refered as "3rd image" in my bug report, sorry.
Attachment #109220 - Attachment is obsolete: true
Attachment #109219 - Attachment description: image is not displayed at all ! → the correct image (4th screenshot) after a clear disk cache
Sorry for messing up with the attachments.

I remember having this image cache problem on another static page as well.
The image displayed correctly once, but, for some reason, could not be displayed
anymore when I get back to the same page. The only way to show it again has been
to clear the disk cache.
I am seeing this using 1.3b on Linux (OS: All probably). Mozilla seems to take
some images from cache instead of fetching them. 

Attachment 114319 [details] shows the problem on amazon.com. Refreshing does not help.

I have seen it also for background images for a completely static site (sic!).
More interestingly it depended on from where I have entered the site. 

This bug seems to be around for ages (I have seen this for some websites long
ago), but only now became really visible (happens often).

I think we have got enough to confirm it.
Status: UNCONFIRMED → NEW
Ever confirmed: true
As per Attachment 114319 [details] it shows two problems actually: images being loaded
wrongly and some images not being loaded at all. The latter is covered by bug
117475. The former is mentioned as one of several problems in bug 162889. 

This bug is mainly about incorrect images appearing and as such is not a dup of
bug 117475. It might be considered a dup of bug 162889,  also I have the
impression that it actually separates one of many (possibly independent)
problems described there. Can anybody with more insight and permissions check if
it should not be duped?
This appears to be an imageLib problem, possibly involving interaction with HTTP
(which explains the impact of clearing the disk cache).

I would be surprised if it's a duplicate.
Assignee: gordon → jdunn
Component: Networking: Cache → ImageLib
QA Contact: tever → tpreston
Make that "wouldn't be surprised if it's a duplicate."
Am marking target as future (i am trying to focus my buglist on
the 1.4 timeframe), but hopefully in dealing with the other cache/http 
related bugs we can nick this as well.  
Target Milestone: --- → Future
Changed OS to All because I have been experiencing this problem for quite a long
time now on Linux 2.4.20 (Gentoo) with Mozilla 1.3.  This has been especially
problematic on Google and Amazon.com.
OS: Windows XP → All
I have similar problem, when I'm browsing many pages with lot of images
sometimes mozilla displays them corrupted and/or outside the window.

Clicking reload doesn't change anything.

Here there is an example.

Win 2000
3dfx voodoo5 lastest drivers.
512MB ram
PIII 733, intel815
I see this problem regularly as well on http://www.myfonts.com, throughout the
site.  Clearing the image cache makes the problem go away, but it comes back
relatively quickly, within a few browsing sessions.  Symptoms are exactly like
the Amazon.com attachment.  I'm using Mac OS X nightly build 2004011005.
I've got this bug also in one forum. It's the second time that an image is
displayed with a wrong one. Screenshot:
http://www.stud.uni-giessen.de/~su2754/sonst/forum.jpg

There shouldn't be so much smilies. If you want to see the correct page, go to
http://www.mitrax.net/phpBB2/

I'm using Mozilla 1.6 under Windows2000.

Greetings, Dominik
I cannot reproduce the bad behaviour with my current version of mozilla (Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.7.12) Gecko/20050915).

This problem has probably been fixed because it was a side effect of another, yet to identify, bug ?

Should we mark this bug as FIXED ?
Since firefox 1.0 this problem has been fixed on my system.

Don't know for mozilla, but i think that the mozilla engine brother of firefox 1.0 is the one that solves the bug :)
I'm also seeing this problem on both Macintosh and Linux on this site: <http://www.greenfelt.net/sht.html>. I'm currently running 1.5.0.1 but I've seen it in much older versions (even before 1.5). There are a couple symptoms, but they can all be fixed by shift-reload (plain reload does not help):
  * One of the cards shows up with the wrong image (even though it's img src is pointing to the correct image). The card that *should* be showing that image is given the broken image icon.
  * Same as above, but no broken image icon, just 2 of the same card.

This happens relatively often, probably once every few days or so.
I've seen this more than a few times on Firefox 1.5, and I think Firefox 1.0 as well.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

I have yet to be able to figure out the cause or to reproduce it. I just saw it again today, and decided to investigate. I took a bunch of screenshots of hopefully useful information and will attach them. Someone let me know what other information would be helpful so that I can collect it the next time I see this bug.

I was able to find the URLs of the image that was replaced and the image that partially replaced it. I say partially, because it looks like the image only loaded half way. I saved both files and attached those as well. mt is the correct image and logo_left is the image that got replaced. It should have been the phpMyAdmin logo, but was instead a half loaded Google Maps tile.
Assignee: jdunn → nobody
QA Contact: tpreston → imagelib
I've recently launched a new website, http://worldofsolitaire.com
The problem described here (with the wrong image showing up, or Firefox thinking the image cannot be found when it can) has been reported by several Firefox users.
No other browser users (Opera, IE6, IE7, Safari, Konqueror) have reported the problem.
I have come across this weird bug some times already, even filed a bug in launchpad (for Firefox in Ubuntu). Since I'm using Swiftweasel they would probably  just shun my bug report.
As I said, this bug is been present since some versions already. I couldn't reproduce the bug before, but now I think I have some idea as to how make it happen: the bug ocurred when Firefox closed unproperly (I accidentaly pressed ctrl+alt+backspace and restarted X) and the session is restored with the Session Manager extension (or with the normal session recovery from Firefox). Then the images where changed with something taken randomly from the cache.

I took some screenshots too:
Bugged: http://img227.imageshack.us/img227/4497/ccowrongxg4.jpg
How it should be: http://img86.imageshack.us/img86/5682/ccorightyi4.jpg
I have also come across this bug several times during the latest months. But a reload does not work for me, not a restart of FF or a reboot of my system. Only clearing the cache will make the right picture show. I have no idea how to reproduce it and i do not have any screenshots but it's exactly as shown above by Khristian. It has not been a common error but it shows up within a few weeks period. 
So I was unable to find a way to modify my Javascript or Web code to prevent this from happening.

The way I fixed it for my users, was to DISABLE caching of images for Firefox users. It's a horrible horrible thing to do, ESPECIALLY since my site is so reliant on images being a web game, but it's much better to have the site take slightly longer to load on each visit, than show the users the wrong cards all the time.

The .htaccess file I used to do this is:

#Check if gecko
SetEnvIfNoCase User-Agent ".*gecko.*" gecko
SetEnvIfNoCase User-Agent ".*konqueror.*" !gecko
SetEnvIfNoCase User-Agent ".*safari.*" !gecko
SetEnvIfNoCase User-Agent ".*applewebkit.*" !gecko
SetEnvIfNoCase User-Agent ".*msie.*" !gecko
SetEnvIfNoCase User-Agent ".*opera.*" !gecko

#If gecko disable caching for images to prevent 
<FilesMatch "\.(png)$">
    Header unset Cache-Control: env=gecko
    Header append Cache-Control: "no-store, no-cache, must-revalidate" env=gecko
    Header append Cache-Control: "post-check=0, pre-check=0" env=gecko
    Header unset Pragma: env=gecko
    Header append Pragma: "no-cache" env=gecko
    Header unset Last-Modified: env=gecko
    Header set Last-Modified: "Mon, 26 Jul 2008 05:00:00 GMT" env=gecko
    Header unset Expires: env=gecko
    Header set Expires: "Mon, 26 Jul 1997 05:00:00 GMT" env=gecko
    Header unset Etag: env=gecko
</FilesMatch>
Still have this issue in Firefox 2.0.0.11 (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071204 Ubuntu/7.10 (gutsy) Firefox/2.0.0.11)

Maybe, the problem is in incorrect handling of cache collisions?
This seems to be duplicate of bug #321361 and/or bug #355567. Please retest with latest trunk.
(In reply to comment #28)
> This seems to be duplicate of bug #321361 and/or bug #355567. Please retest
> with latest trunk.

Yes, seems to be a duplicate of BUG #355567

I've re-tested and it still fails.

See my comment in BUG #355567 for details.
There is possibly a hashing bug still here, but this bug seems to be incomplete. Please reopen if that's wrong.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: