memory leak of XPCWrappedNative - not garbage collected?

VERIFIED DUPLICATE of bug 21056

Status

()

Core
XPConnect
P3
normal
VERIFIED DUPLICATE of bug 21056
19 years ago
18 years ago

People

(Reporter: dbaron, Assigned: John Bandhauer)

Tracking

({memory-leak})

Trunk
x86
Linux
memory-leak
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

19 years ago
I really don't know against which component to file this...

DESCRIPTION:  I was working with the refcount balancer last weekend, and I was
trying to figure out why an nsAppShell was leaking (since that seems like it
could hold on to other things).  It *seemed to me* that the nsAppShell was held
on to by an nsAppShellService, which was held on to by an XPCWrappedNative. 
This XPCWrappedNative seemed to be leaking because it wasn't being garbage
collected by the JS GC.  (Looking at one that didn't leak showed the garbage
collection.)

I'm not 100% sure of this analysis, but it's worth looking into.  (In
particular, it could be a different XPCWrappedNative than the one I'm looking at
that's leaking the appshell, and it *could* be leaking in a different way.)

STEPS TO REPRODUCE:
 * start mozilla with XPCOM_MEM_LEAK_LOG setenv'd to 1
 * click "Exit" when you see the profile manager

ACTUAL RESULTS:
 * the following objects leak:
    1 nsAppShellService
    1 nsAppShell
   13 nsXPCWrappedNative

EXPECTED RESULTS:
 * no leaks :-)

DOES NOT WORK CORRECTLY ON:
 * my mozilla build from last weekend

ADDITIONAL INFORMATION:
Some refcount balancer output available **when my PC is on**:

an XPCWrappedNative that was not leaked:
http://dbaron.student.harvard.edu/u/david/leaks/nsXPCWrappedNative.balance-good5.txt
an XPCWrappedNative that was leaked (with ignore-balanced-subtrees):
http://dbaron.student.harvard.edu/u/david/leaks/nsXPCWrappedNative.balance-ib1.txt
an XPCWrappedNative that was leaked (without ignore-balanced-subtrees):
http://dbaron.student.harvard.edu/u/david/leaks/nsXPCWrappedNative.balance1.txt

The nsAppShellService that was leaked:
http://dbaron.student.harvard.edu/u/david/leaks/nsAppShellService.balance-ib.txt

(and there are other files in the same directory if you want to poke around)
(Reporter)

Updated

19 years ago
Keywords: mlk
(Assignee)

Comment 1

19 years ago

*** This bug has been marked as a duplicate of 21056 ***
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → DUPLICATE

Comment 2

18 years ago
Verified duplicate.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.