Closed Bug 115474 Opened 23 years ago Closed 23 years ago

Severe memory leak in Browser when displaying GIF animations

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
critical

Tracking

()

VERIFIED DUPLICATE of bug 110048

People

(Reporter: mmienik, Assigned: pavlov)

References

()

Details

(Keywords: memory-leak, testcase)

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) BuildID: 2001112009 The browser has a severe memory leak when displaying GIF animations. The problem is especially bad on large, infinitely looping GIF animations such as seen here: http://mirror.bom.gov.au/products/IDR502.loop.shtml http://mirror.bom.gov.au/products/IDR022.loop.shtml http://mirror.bom.gov.au/products/IDR122.loop.shtml On my Windows 2000 system, Mozilla leaks around 1Mb of memory per second, and on another FreeBSD system around 300kb/s. The only way to recover this memory is to close the browser window. Memory continues leaking until the process eats all available virtual memory. Reproducible: Always Steps to Reproduce: 1.Open a web page with a large, looping GIF animation. Links provided above. Actual Results: Mozilla Browser leaks memory at upto 1Mb per second. Expected Results: Mozilla is not deallocating memory after displaying a looping GIF animation.
Michal, is this a problem with recent builds? The build you are using is a month old....
Assignee: asa → pavlov
Component: Browser-General → ImageLib
Keywords: mlk
QA Contact: doronr → tpreston
Tentatively confirming. On build 2001121103, Win98, I see the same thing. I'm using Norton Utils' System Info to check, and Mozilla started at 31MB, then 37MB, 43MB, 51MB. When I close the browser window with the looping GIF, the memory usage no longer goes up.
Build ID: 2001 12 15 08. Windows 2000. Michal: None of the provided URLs seem to work. The image is "broken". However, this one is pretty big: < http://vortex.plymouth.edu/mollsat_ir_an.gif > (24 images @ 640 X 480 = 1.2 MB). I see no process growth, using Windows Task Manager. A slight peak when the loop is re-started, but the level immediately returns to approx. 56 MB.
More details available: Real GIF animations do not appear to cause the problem, however the links provided use Javascript to swap four seperate GIF images. http://mirror.bom.gov.au/products/IDR502.loop.shtml If you do not have Javascript enabled, the 'animation' will not work. I have just tried the same links using the very latest Mozilla (2001121508), and one of my Win2k boxes still has the memory leak while the other does not. I suspect this may be caused by an older build of Mozilla being uninstalled completely on one of my Win2k boxes but not the other. (However, both are reported as running 2001121508). I do not have the resources to further investigate this possible bug, however it would be beneficial if someone could install the latest Mozilla on several clean OS setups and verfiy this bug.
FWIW I was able to reproduce this on Mozilla 0.9.7 Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.7) Gecko/20011221 This was upgraded when 0.9.7 came out from 0.9.6 (and before than from 0.9.5). Running on w2k sp2 (build 2195) german on the test URL I get exactly the same memory gobbling effect. It is not limited to .gifs though as the same effect occrs with Jpegs The code below with 4 suitable Jpegs will cause memory usage to increase until death unless the page is closed (The imges used in my test are 640x480 and about 65Kbytes in size) <HTML> <HEAD> <TITLE>Memleak</TITLE> <script> theImageNames = new Array(); theImageNames[0] = "prag001F.jpg"; theImageNames[1] = "prag002F.jpg"; theImageNames[2] = "prag003F.jpg"; theImageNames[3] = "prag004F.jpg"; nImages = 4; var myTimeOut = 0 var imgNo = 0; function nextImg() { clearTimeout(myTimeOut); imgNo++; if (imgNo >= theImageNames.length) { imgNo = 0; } document.images[0].src=theImageNames[imgNo]; myTimeOut = setTimeout("nextImg()",1000) } function startup() { document.images[0].src=theImageNames[0]; myTimeOut = setTimeout("nextImg()",1000); } </script> </HEAD> <BODY onLoad="startup()"> <img name="animate" border=0 height=480 width=640> </BODY> </HTML>
wfm using build 2001123103 on Win2k. Memory usage stays the same when loading any of the above URLs. Reporter, can you try a recent nightly build and report if problem still occurs ? Build available here: http://ftp.mozilla.org/pub/mozilla/nightly/latest/mozilla-win32-talkback.zip There was a recent mem leak fix w/ JS but I cannot find it...
Keywords: testcase
The memory leak is still there when an existing Mozilla installation is upgraded to the latest nightly build, but a fresh install on a system where older Mozilla versions did not exist does not reproduce the memory leak. I would suggest that anyone wishing to test for this bug completely remove all traces of any existing Mozilla installations before installing the latest nightly build. I suggest that more testing on fresh installs of Windows is required.
Blocks: 119597
Confirmed, but this is a dup of 110048 *** This bug has been marked as a duplicate of 110048 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Verified Duplicate
Status: RESOLVED → VERIFIED
No longer blocks: 119597
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: