Closed Bug 311120 Opened 20 years ago Closed 19 years ago

Preferences dialog leakes 220 refcounted strings

Categories

(Firefox :: Settings UI, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Firefox 2 beta1

People

(Reporter: whimboo, Assigned: mwu)

References

Details

(Keywords: helpwanted, memory-leak)

After stepping throught all preferences tabs I noticed a high leak count when closing my Firefox debug build Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051004 Firefox/1.6a1 When I start Firefox with about:blank and close it immediately I've following refcount: nsStringStats => mAllocCount: 18808 => mReallocCount: 2591 => mFreeCount: 18807 -- LEAKED 1 !!! => mShareCount: 18964 => mAdoptCount: 1643 => mAdoptFreeCount: 1616 -- LEAKED 27 !!! Doing the same but visiting all preferences panels the refcount is increased impressive: nsStringStats => mAllocCount: 30054 => mReallocCount: 3152 => mFreeCount: 29833 -- LEAKED 221 !!! => mShareCount: 39829 => mAdoptCount: 2280 => mAdoptFreeCount: 2247 -- LEAKED 33 !!! You can reproduce it by just opening the privacy panel within the preferences. That's enough to get the high refcount.
Depends on: 336914
Depends on: 336922
Flags: blocking-firefox2?
So, something is making us leak the whole window, most likely.
Flags: blocking-firefox2? → blocking-firefox2+
Keywords: helpwanted, mlk
Target Milestone: --- → Firefox 2 beta1
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060518 Minefield/3.0a1 I can't reproduce this in a trunk debug build. I did extensive dialog opening and still only leaked 5 windows, which was what was leaked if I just opened up with homepage set to about:config and closed the browser. Is this an issue on branch?
(In reply to comment #2) > Is this an issue on branch? > WFM on branch-linux: => mAllocCount: 14268 => mReallocCount: 3172 => mFreeCount: 14263 -- LEAKED 5 !!! => mShareCount: 15108 => mAdoptCount: 1787 => mAdoptFreeCount: 1740 -- LEAKED 47 !!!
same thing with or without prefwindow opening? if I'm reading that right, please resolve WFM and I'll clear the blocking flag.
Does this depend which tab in the preferences window you have? Note that the preferences window remembers the selected tab, so you could have been hitting tab-specific code that was triggering a leak. Did you try going through all tabs?
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060531 Minefield/3.0a1 I just went through and tried starting up with every tab in the pref. window, (yes, this was tedious) and I still only leaked 5 strings. Granted, I did not try enabling or disabling preferences that could've been calling some other code, but if anyone wants to do this, feel free!
Assignee: nobody → michael.wu
I'm not seeing this on branch. mconnor, this can be removed as a blocking bug for 2.0. Open about:blank and close. nsStringStats => mAllocCount: 12221 => mReallocCount: 2770 => mFreeCount: 12216 -- LEAKED 5 !!! => mShareCount: 11515 => mAdoptCount: 1742 => mAdoptFreeCount: 1708 -- LEAKED 34 !!! Open about:blank, open prefs dialog, open all tabs, close prefs dialog, close firefox. nsStringStats => mAllocCount: 21351 => mReallocCount: 3368 => mFreeCount: 21346 -- LEAKED 5 !!! => mShareCount: 33383 => mAdoptCount: 2508 => mAdoptFreeCount: 2461 -- LEAKED 47 !!! On trunk, open about:blank and close: nsStringStats => mAllocCount: 12219 => mReallocCount: 2023 => mFreeCount: 12214 -- LEAKED 5 !!! => mShareCount: 11755 => mAdoptCount: 1587 => mAdoptFreeCount: 1587 open about:blank, open preferences dialog to privacy, close preferences dialog, close firefox: nsStringStats => mAllocCount: 20154 => mReallocCount: 2532 => mFreeCount: 20148 -- LEAKED 6 !!! => mShareCount: 17436 => mAdoptCount: 1861 => mAdoptFreeCount: 1861 So.. it might still be an issue still on trunk, but it shouldn't be blocking 2.0 since it isn't an issue there.
So mwu can reproduce this on trunk, but not in branch. He's using KDE. Henrik, were you using GNOME or KDE when you reproduced this?
(In reply to comment #8) > So mwu can reproduce this on trunk, but not in branch. He's using KDE. Henrik, > were you using GNOME or KDE when you reproduced this? I were using KDE when I found this leak. Due to my work I had to port to Windows again, so I can't do any tests for myself at the moment. Sorry.
Thanks Michael/Adam! Resolving as WFM, please file a new bug if this reappears.
Status: NEW → RESOLVED
Closed: 19 years ago
Flags: blocking-firefox2+
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.