Skip to main content

Bug Tracker

Side navigation

#10137 closed bug (worksforme)

Opened August 25, 2011 04:01PM UTC

Closed June 26, 2012 03:20AM UTC

jQuery 1.6.2 leaks memory in support.js, when used inside iframe's

Reported by: mmaass@intersoft.de Owned by: rwaldron
Priority: undecided Milestone: None
Component: support Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

Hi,

it looks like support.js is leaking memory, when jQuery is included inside an iframe. I've searched the bug tracker and found this ticket http://bugs.jquery.com/ticket/9471, but the problem still exists in 1.6.2.

I've used sIEve-0.0.8 with this test case:

outer.html:

<!doctype html>
<html>
    <head>
        <title></title>
    </head>
    <body>      
        <iframe id="container" width="1024px" height="768px" src="inner1.html" />
    </body>
</html>

inner1.html:

<!DOCTYPE html>
<html>
	<head>
		<title>Page1</title>
		<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.jss"></script>
	</head>
	<body>
		<a href="inner2.html">goto page2</a>	
	</body>
</html>

inner2.html:

<!DOCTYPE html>
<html>
	<head>
		<title>Page2</title>
		<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.js"></script>
	</head>
	<body>
		<a href="inner1.html">goto page1</a>	
	</body>
</html>

To reproduce the leak you need to click "goto page2" and then "goto page1". Just clicking "goto page2" won't be enough.

I've uploaded an screenshot http://imageshack.us/photo/my-images/38/sieve.png/ of SIEve's "Detected DOM Leaks and Cycles" page.

Attachments (0)
Change History (8)

Changed August 25, 2011 04:06PM UTC by mmaass@intersoft.de comment:1

I've forgot to mention browser and os version. The leak affects IE7 (7.0.5730.13) on Windows XP Professional SP3. It's Microsoft's standard IE7 image for VirtualPC.

Changed August 25, 2011 04:32PM UTC by rwaldron comment:2

component: unfiledsupport
owner: → rwaldron
status: newassigned

Changed August 26, 2011 03:39PM UTC by mmaass@intersoft.de comment:3

My second snipet contains a bug. I've mistyped the file extension. The leak is still there but you don't need to navigate twice.

Changed December 29, 2011 10:17PM UTC by lpahwa <lpahwa@hotmail.com> comment:4

Is this being addressed in the next JQUERY release or Patch?

Changed May 30, 2012 01:28PM UTC by anonymous comment:5

Dear sir or madam,

My team is programming a system which is based on jquery1.5.2, but now we got a very serious problem which is bug #10137(http://bugs.jquery.com/ticket/10137) on IE9 (we used dtd of xhtml1.0, but we think it's not much bearing on this problem).

This problem is so serious that will impact the performance of our system on IE9. Because of the day of product release is very close, we don't want to solve the problem by updating to 1.7.2. Could you tell us which parts were modified? Cause we want to solve this problem on jquery1.5.2 if we can. However, if the parts have to be modified are too much that we have to update to 1.7.2, could you tell us if there are any other changes or parts that might cause some bugs, which are not listed on the Relese Notes?

Changed May 30, 2012 01:39PM UTC by sindresorhus comment:6

Here's the comparison of 1.5.2 and 1.7.2. Enjoy! ;)

You can see what's been modified:

https://github.com/jquery/jquery/compare/a507f719ab...754bda21cb

Changed May 30, 2012 04:35PM UTC by dmethvin comment:7

Also, the ticket in #9471 has a link to the changeset, it is relatively small and should be easy to add if that is the cause of the problem.

Changed June 26, 2012 03:20AM UTC by dmethvin comment:8

resolution: → worksforme
status: assignedclosed

I am not seeing this problem in 1.8b1, we have landed several fixes for memory leaks in the meantime.