Open
Bug 339784
Opened 19 years ago
Updated 3 years ago
In <mailWindow.js>, |nsMsgStatusFeedback.prototype| leaks when Seach Messages window is closed, as reported by Leak Monitor extension
Categories
(MailNews Core :: Search, defect)
MailNews Core
Search
Tracking
(Not tracked)
ASSIGNED
People
(Reporter: aha, Assigned: aceman)
References
(Blocks 1 open bug, )
Details
(Keywords: memory-leak)
Attachments
(1 file, 1 obsolete file)
|
1.98 KB,
patch
|
mkmelin
:
review+
sgautherie
:
feedback+
|
Details | Diff | Splinter Review |
2006052401/1.8-branch/SeaMonkey1.1a with Leak Monitor 2.0 (SM port)
Repro:
1. select any folder with messages
2. open Search Messages window (Ctrl+Shift+S)
3. enter for example "s" into search dialog
4. hit search
5. close Search Messages window
Actual:
[+] [leaked object] (8e96130) = [object Object]
[ ] statusTextFld (8d8c258) = [object XULElement]
[ ] statusBar (8f438d8) = [object XULElement]
[ ] statusPanel (8d8c250) = [object XULElement]
[ ] throbber = null
[ ] stopCmd = null
[ ] meteorsSpinning = false
[ ] startTimeoutID = null
[ ] myDefaultStatus =
[ ] stopTimeoutID = null
[ ] [leaked object] (8f43b08) = [object Object]
Comment 1•19 years ago
|
||
Could you try a current Trunk build (too) ?
Comment 2•19 years ago
|
||
(In reply to comment #1)
> Could you try a current Trunk build (too) ?
I can confirm this with latest trunk.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060530 SeaMonkey/1.5a
Comment 3•19 years ago
|
||
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1a2) Gecko/20060518 SeaMonkey/1.1a] (nightly) (W98SE)
(Confirmed, on branch.)
This happens at each closing.
Simpler steps:
*At step 1: you can be on a folder, or on an account.
*Step 3 is optional, step 4 is enough (searching for blank, getting no result).
For the record, simply opening and closing the Search window gives me the following report:
[ ] [leaked object] (2603a60) = [object Object]
[ ] [leaked object] (16b5118) = [object Object]
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → mozilla1.8.1beta1
Version: 1.8 Branch → Trunk
Comment 4•19 years ago
|
||
<http://landfill.bugzilla.org/mxr-test/seamonkey/search?string=nsMsgStatusFeedback&find=.*js>
[[
nsMsgStatusFeedback
/mailnews/base/search/resources/content/SearchDialog.js, line 56 -- var gStatusFeedback = new nsMsgStatusFeedback();
/mailnews/base/resources/content/subscribe.js, line 11 -- var gStatusFeedback = new nsMsgStatusFeedback;
/mailnews/base/resources/content/mailWindow.js, line 146 -- window.MsgStatusFeedback = new nsMsgStatusFeedback();
/mailnews/base/resources/content/mailWindow.js, line 315 -- function nsMsgStatusFeedback()
/mailnews/base/resources/content/mailWindow.js, line 319 -- nsMsgStatusFeedback.prototype =
/mail/base/content/subscribe.js, line 11 -- var gStatusFeedback = new nsMsgStatusFeedback;
/mail/base/content/mailWindow.js, line 151 -- window.MsgStatusFeedback = new nsMsgStatusFeedback();
/mail/base/content/mailWindow.js, line 274 -- function nsMsgStatusFeedback()
/mail/base/content/mailWindow.js, line 278 -- nsMsgStatusFeedback.prototype =
]]
Summary: memory leak after closing Seach Messages window → In <mailWindow.js>, |nsMsgStatusFeedback.prototype| leaks each time a Seach Messages window is closed, as reported by Leak Detector Extension
Comment 5•19 years ago
|
||
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1a2) Gecko/20060524 SeaMonkey/1.1a] (nightly) (W98SE)
This fixes the "detailed" object (leak).
Assignee: nobody → gautheri
Status: NEW → ASSIGNED
Attachment #223999 -
Flags: review?(iann_bugzilla)
Comment 6•19 years ago
|
||
The following test shows where the "undetailed" object leak comes from:
[[
function setupDatasource() {
RDF = Components.classes[rdfServiceContractID].getService(Components.interfaces.nsIRDFService);
gSearchView = Components.classes["@mozilla.org/messenger/msgdbview;1?type=search"].createInstance(Components.interfaces.nsIMsgDBView);
var count = new Object;
var cmdupdator = new nsMsgSearchCommandUpdater();
// gSearchView.init(messenger, msgWindow, cmdupdator);
gSearchView.init(messenger, msgWindow, null);
]]
but I don't know how to release (properly) this |cmdupdator|: helpwanted.
(Call |.init()| again in the |function searchOnUnload()| ??)
Keywords: helpwanted
Comment 7•19 years ago
|
||
Comment 8•19 years ago
|
||
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1a3) Gecko/20060603 SeaMonkey/1.1a] (nightly) (W98SE)
(Bug still there, with L.M. v0.3.0.)
Summary: In <mailWindow.js>, |nsMsgStatusFeedback.prototype| leaks each time a Seach Messages window is closed, as reported by Leak Detector Extension → In <mailWindow.js>, |nsMsgStatusFeedback.prototype| leaks each time a Seach Messages window is closed, as reported by Leak Monitor extension
Comment on attachment 223999 [details] [diff] [review]
(Av1) <SearchDialog.js>
Sorry, I do not know this part of the code, perhaps bienvenu or neil@parkwaycc ?
Attachment #223999 -
Flags: review?(iann_bugzilla)
Comment 10•17 years ago
|
||
Serge, does this still apply?
Neil, are you OK to review?
Severity: major → normal
Comment 11•17 years ago
|
||
Does this leak on trunk? Is it only this nsMsgStatusFeedback that leaks?
(Other windows also use nsMsgStatusFeedback.)
Comment 12•17 years ago
|
||
(In reply to comment #11)
> Does this leak on trunk? Is it only this nsMsgStatusFeedback that leaks?
> (Other windows also use nsMsgStatusFeedback.)
>
Having just been looking at some items not too far from this this afternoon, I wouldn't be surprised if this does leak.
I would expect the correct fix would be to call msgWindow.closeWindow (like mailWindow.js does) - which would automatically drop the nsMsgStatusFeedback - but I'm not sure if that is entirely the right fix in this case.
Updated•17 years ago
|
Product: Core → MailNews Core
| Assignee | ||
Comment 13•14 years ago
|
||
What needs to be done here? Is this still valid?
OS: Windows XP → All
Hardware: x86 → All
Target Milestone: mozilla1.8.1beta1 → ---
Comment 14•14 years ago
|
||
Comment on attachment 223999 [details] [diff] [review]
(Av1) <SearchDialog.js>
> // release this early because msgWindow holds a weak reference
> msgWindow.rootDocShell = null;
>+
>+ // Unhook instanciated prototype.
>+ msgWindow.statusFeedback = null;
As per comment #12 we should use msgWindow.closeWindow(); instead (which also conveniently clears rootDocShell as well).
Comment 15•14 years ago
|
||
(In reply to :aceman from comment #13)
> What needs to be done here? Is this still valid?
Give me some time to get back to this bug...
Comment 16•14 years ago
|
||
Right:
http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsMsgWindow.cpp#134
135 NS_IMETHODIMP nsMsgWindow::CloseWindow()
http://mxr.mozilla.org/comm-central/search?string=rootDocShell+%3D+null&case=1&find=%2Fmail
"Found 2 matching lines in 2 files"
Keywords: helpwanted
Target Milestone: --- → Thunderbird 13.0
| Assignee | ||
Comment 17•14 years ago
|
||
Ok, I assume you take this to finish it.
Updated•14 years ago
|
Severity: normal → minor
Summary: In <mailWindow.js>, |nsMsgStatusFeedback.prototype| leaks each time a Seach Messages window is closed, as reported by Leak Monitor extension → In <mailWindow.js>, |nsMsgStatusFeedback.prototype| leaks when Seach Messages window is closed, as reported by Leak Monitor extension
Comment 18•10 years ago
|
||
(In reply to :aceman from comment #17)
> Ok, I assume you take this to finish it.
not so far :)
Whiteboard: [patchlove:jsf]
Target Milestone: Thunderbird 13.0 → ---
Updated•10 years ago
|
Whiteboard: [patchlove:jsf] → [patchlove:js]
| Assignee | ||
Comment 19•10 years ago
|
||
Patch incorporating the suggestions.
Attachment #223999 -
Attachment is obsolete: true
Attachment #8696244 -
Flags: review?(neil)
Attachment #8696244 -
Flags: review?(neil) → review?(mkmelin+mozilla)
Comment 20•10 years ago
|
||
Thanks for taking this over, aceman :-)
Assignee: bugzillamozillaorg_serge_20140323 → acelists
Whiteboard: [patchlove:js]
Comment 21•10 years ago
|
||
Comment on attachment 8696244 [details] [diff] [review]
patch v2
Review of attachment 8696244 [details] [diff] [review]:
-----------------------------------------------------------------
f+ : this looks like exactly what was suggested in previous comments.
Attachment #8696244 -
Flags: feedback+
Comment 22•10 years ago
|
||
Comment on attachment 8696244 [details] [diff] [review]
patch v2
Review of attachment 8696244 [details] [diff] [review]:
-----------------------------------------------------------------
Looks reasonable. Did you verify it removes the leak?
Attachment #8696244 -
Flags: review?(mkmelin+mozilla) → review+
| Assignee | ||
Comment 23•10 years ago
|
||
No, I couldn't get the addon to work in TB. While I forced to to install, it can't load its binary component (on Linux). Maybe that one needs recompiling for current releases. The homepage http://dbaron.org/mozilla/leak-monitor/ seems to imply it no longer works.
Updated•3 years ago
|
Severity: minor → S4
You need to log in
before you can comment on or make changes to this bug.
Description
•