Closed Bug 397206 Opened 17 years ago Closed 9 years ago

Partially loading a feed in a frame causes an error in FW_close (FeedWriter.js) and a leak

Categories

(Firefox Graveyard :: RSS Discovery and Preview, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: jruderman, Assigned: sayrer)

References

Details

(Keywords: memory-leak, testcase)

Attachments

(3 files)

Attached file testcase (deleted) —
Steps to reproduce: 1. Launch Firefox with XPCOM_MEM_LEAK_LOG=2 2. Load the testcase. 3. Wait about six seconds for it to finish. 4. Quit. Result: while it's running: JavaScript error: , line 0: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsINavHistoryService.removeObserver]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: file:///Users/jruderman/trunk/mozilla/debug-obj/dist/MinefieldDebug.app/Contents/MacOS/components/FeedWriter.js :: FW_close :: line 792" data: no] when you quit: trace-refcnt complains about leaking BackstagePass, XPCWrappedNative, nsThread, nsSAXAttributes, etc.
Assignee: nobody → sayrer
Attached file leak log (deleted) —
Attached file trace of getElementById call (deleted) —
The exception in FW_Close is nothing to worry about, the FeedWriter is trying to remove itself as a history observer, but it never made it in because _initSubscriptionUI didn't succeed. It fails here: <http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/browser/components/feeds/src/FeedWriter.js&rev=1.46#632> > _initSubscriptionUI: function FW__initSubscriptionUI() { > var handlersMenuPopup = this._document.getElementById("handlersMenuPopup"); but wrapping this in a try/catch block doesn't catch the exception. We're calling XPCWrappedNative::CallMethod even though the ccx claims that an exception is set (though the internal cx->throwing is false). See attached.
Bug 397225 fixes the errors here. However, the test leaks more stuff with that patch applied.
Depends on: 398017
This looks like a leak related to XUL-in-XHTML, at least for the most part. I can get this to leak with all feed writing off by appending one XUL element to an XHTML div in the FeedWriter.init function.
Blocks: 398292
comment 0 talks about leaked nsSAXAttribute though, so that has to be related to the sax-parser or the feedwriter somehow, no? Or is that no longer the case with bug 397225 fixed?
Still leaks an nsSAXAttributes object.
Flags: blocking-firefox3?
Not blocking, but wanted if a fix presents itself.
Flags: wanted-firefox3+
Flags: blocking-firefox3?
Flags: blocking-firefox3-
Still leaks nsSAXAttributes on trunk. (Feeds must be set to "preview in Firefox".)
Still leaks on mozilla-central (cd23e1bd82c4+).
Still leaks on mozilla-central.
WFM on trunk. No JS errors, no trace-refcnt leaks. (I had to increase 'max' in the testcase because the feed loads more slowly now.)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: