Closed Bug 331173 Opened 18 years ago Closed 7 years ago

netvibes.com 'ajax' functionality leaks memory

Categories

(Core :: XML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: melinda.mcbeath, Unassigned)

References

Details

(Keywords: memory-leak, Whiteboard: [needs retest])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060320 Firefox/2.0a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060320 Firefox/2.0a1

Ok, 
netvibes.com is a rss aggregator with ajax functionality. you can add rss panels which contain the feeds. These panels update automatically at set periods of time. mozilla leaks badly and if a browser window is left open over night will 'grow' to 500mb of memory and become unusable on my system.

using the nightly test extensions built in leak-gauge

Summary

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060320 Firefox/2.0a1 ID:2006032010

Session ended Tuesday, 21 March 2006 4:40:32 PM

Leaked 102 out of 392 DOM windows
Leaked 111 out of 588 documents
Leaked 23 out of 117 docshells

Details

Leaked document at address 3dbfff0.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.quirksmode.org/blog/index.xml".
Leaked document at address 3b46cd8.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.mezzoblue.com/rss/index.xml".
Leaked document at address 49b9738.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//strangebrand.com/index.xml".
Leaked document at address 39411d8.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.snook.ca/jonathan/index.rdf".
Leaked document at address 37ca850.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.andybudd.com/index.rdf".
Leaked document at address 4781560.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//37signals.com/svn/index_full.rdf".
Leaked document at address 3b613f8.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.planetpython.org/rss20.xml".
Leaked document at address 3afe478.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.djangoproject.com/rss/weblog/".
Leaked document at address 3a6a588.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.zeldman.com/feed/zeldman.xml".
Leaked document at address 3dbfff0.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.quirksmode.org/blog/index.xml".
Leaked document at address 3b46cd8.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.mezzoblue.com/rss/index.xml".
Leaked document at address 49b9738.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//strangebrand.com/index.xml".
Leaked document at address 39411d8.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.snook.ca/jonathan/index.rdf".
Leaked document at address 37ca850.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.andybudd.com/index.rdf".
Leaked document at address 4781560.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//37signals.com/svn/index_full.rdf".
Leaked document at address 3b613f8.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.planetpython.org/rss20.xml".
Leaked document at address 27a6518.
 ... with URI "https://bugzilla.mozilla.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&product=&content=netvibes".
Leaked document at address 3afe478.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.djangoproject.com/rss/weblog/".
Leaked document at address 4cf9450.
 ... with URI "http://www.netvibes.com/xmlProxy.php?url=http%3A//www.servantleadershipblog.com/servant-leadership/blog/feed/atom.xml".
--snip---



Reproducible: Always
Keywords: mlk
Could be happening because of bug 206520.
But the only way to find out for sure is to have a simple testcase that shows the leak.
Assignee: nobody → xml
Component: General → XML
Depends on: 206520
Product: Firefox → Core
QA Contact: general → ashshbhatt
Version: unspecified → Trunk
trying to track this down better.
relivant javascript files (i think)

http://netvibes.com/modules/rssReader/rssReader.js
http://www.netvibes.com/js/App.js

in App.js 

var proxyURL = NV_PATH+'xmlProxy.php?url=';

var Request = new Object();

Request.send = function(url, method, callback, data, urlencoded) {
	var req;	
	if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		req = new ActiveXObject("Microsoft.XMLHTTP");
	}
	req.onreadystatechange = function() {
		if (req.readyState == 4) {// only if req shows "loaded"
			if (req.status < 400) {// only if "OK"
				(method=="POST") ? callback(req) : callback(req,data);
			} else {
				alert("There was a problem loading data :\n" + req.status+ "/" + req.statusText);
			}
		}
	}
	if (method=="POST") {
		req.open("POST", url, true);
		if (urlencoded) req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		req.send(data);
	} else {		
		req.open("GET", url, true);
		req.send(null);
	}
	
	return req;
}

Request.sendRawPOST = function(url, data, callback) {
	Request.send(url, "POST", callback, data, false);
}
Request.sendPOST = function(url, data, callback) {
	Request.send(url, "POST", callback, data, true);
}
Request.sendGET = function(url, callback, args) {
	return Request.send(url, "GET", callback, args);
}


then each feed is called with

Request.sendGET(proxyURL+escape(feedUrl), checkFeed);

i guess waiting for the fix for 321054 to be checked in.
Could you retest in tomorrow's trunk build?

If it still exists, leak-monitor ( http://dbaron.org/mozilla/leak-monitor ) may provide some useful information.
I still leak 1 document and 1 window after having visited vibes.com with the 2006-05-26 trunk build.
Assignee: xml → nobody
QA Contact: ashshbhatt → xml
Whiteboard: [needs retest]
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.