Memory leak of 72 bytes from 1 block allocated in nsAutoCompleteItemConstructor

VERIFIED FIXED in mozilla1.2alpha

Status

MailNews Core
Composition
--
major
VERIFIED FIXED
16 years ago
10 years ago

People

(Reporter: stephend@netscape.com (gone - use stephen.donner@gmail.com instead), Assigned: Jean-Francois Ducarroz)

Tracking

({memory-leak})

Trunk
mozilla1.2alpha
x86
Windows 2000
memory-leak

Firefox Tracking Flags

(Not tracked)

Details

Build ID:  Latest Win32 cvs trunk, pulled at 11:35 pm, December 10th.

Steps to Reproduce:  I had the user_pref("mail.compose.max_recycled_windows", 
1); set, and did a mozilla.exe -mail, fired off a single HTML compose message 
to myself (autocompleting, of course), and attached a single TXT attachment and 
sent the message.  I then waited 10 seconds and exited the client.

NOTE: This *may* go to Hewitt proper, I can't tell.

[W] MLK: Memory leak of 72 bytes from 1 block allocated in 
nsAutoCompleteItemConstructor
        Distribution of leaked blocks
        Allocation location
            new(UINT)      [msvcrt.DLL]
            nsAutoCompleteItemConstructor [nsModule.cpp:60]
                #endif
                
                // Factory constructors
             => NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteItem)
                NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteResults)
                NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsBookmarksService, Init)
                NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHTTPIndex, Init)
            nsComponentManager::CreateInstance(nsID const&,nsISupports *,nsID 
const&,void * *) [nsComponentManager.cpp:3321]
                    nsIComponentManager* cm;
                    nsresult rv = NS_GetGlobalComponentManager(&cm);
                    if (NS_FAILED(rv)) return rv;
             =>     return cm->CreateInstance(aClass, aDelegate, aIID, aResult);
                }
                
                nsresult
            nsAbAutoCompleteSession::AddToResult(WORD const*,WORD const*,WORD 
const*,WORD const*,WORD const*,WORD const*,WORD 
const*,int,MatchType::nsAbAutoCompleteSession,nsIAutoCompleteResults *) 
[nsAbAutoCompleteSession.cpp:202]
                  if (fullAddrStr && ! ItsADuplicate(fullAddrStr, results))
                  {
                    nsCOMPtr<nsIAutoCompleteItem> newItem;
             =>     rv = nsComponentManager::CreateInstance
(kAutoCompleteItemCID, nsnull, NS_GET_IID(nsIAutoCompleteItem), getter_AddRefs
(newItem));
                    if (NS_SUCCEEDED(rv))
                    {
                      nsAbAutoCompleteParam *param = new nsAbAutoCompleteParam
(pNickNameStr, pDisplayNameStr, pFirstNameStr, pLastNameStr, pEmailStr, 
pNotesStr, pDirName, bIsMailList, type);
            nsAbAutoCompleteSession::OnStartLookup(WORD 
const*,nsIAutoCompleteResults *,nsIAutoCompleteListener *) 
[nsAbAutoCompleteSession.cpp:658]
                            PRUnichar emptyStr = 0;
                            AddToResult(&emptyStr, uSearchString, &emptyStr, 
&emptyStr,
                                        &emptyStr, &emptyStr, &emptyStr, 
PR_FALSE,
             =>                         DEFAULT_MATCH, results);
                            addedDefaultItem = PR_TRUE;
                        }
                
            XPTC_InvokeByIndex [xptcinvoke.cpp:105]
            XPCWrappedNative::CallMethod
(XPCCallContext&,CallMode::XPCWrappedNative) [xpcwrappednative.cpp:2009]
            XPC_WN_CallMethod(JSContext *,JSObject *,UINT,long *,long *) 
[xpcwrappednativejsops.cpp:1266]
            js_Invoke      [jsinterp.c:832]
            js_Interpret   [jsinterp.c:2791]
            js_Invoke      [jsinterp.c:849]
            js_InternalInvoke [jsinterp.c:924]
            JS_CallFunctionValue [jsapi.c:3405]
            nsJSContext::CallEventHandler(void *,void *,UINT,void *,int *,int) 
[nsJSEnvironment.cpp:1009]
            GlobalWindowImpl::RunTimeout(nsTimeoutImpl *) 
[nsGlobalWindow.cpp:3837]
            GlobalWindowImpl::TimerCallback(nsITimer *,void *) 
[nsGlobalWindow.cpp:4146]
            nsTimerManager::FireNextReadyTimer(UINT) [nsTimerManager.cpp:130]
            nsAppShell::Run(void) [nsAppShell.cpp:130]
            nsAppShellService::Run(void) [nsAppShellService.cpp:301]
            main1          [nsAppRunner.cpp:1269]
Keywords: mlk, nsbeta1
QA Contact: sheelar → stephend
(Assignee)

Comment 1

16 years ago
looks like GC is not running during a shutdown!
Status: NEW → ASSIGNED
(Assignee)

Updated

16 years ago
Target Milestone: --- → mozilla1.0
I've been asked to mass-check bugs with no TM and priority, as to their
validity.  This bug still exits on the latest trunk.

Comment 3

16 years ago
I'm adding an nsbeta1- to this.  If this happens every time an address is
autocompleted, please remove the '-' and renominate it because that would be
pretty serious.
Keywords: nsbeta1 → nsbeta1-
Target Milestone: mozilla1.0 → mozilla1.2
(Assignee)

Comment 4

16 years ago
should be fixed now. We weren't deleting the cached compose window on shutdown.
Stephend, can you test again
Marking FIXED for Jean-Francois - to get on my QA radar for verification.
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
I no longer see this on the trunk with Purify running under Windows 2000 with 
the default caching pref.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.