bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Memory leak of 52 bytes from 1 block allocated in nsOutlinerBodyFrame::CheckVerticalOverflow

VERIFIED FIXED

Status

()

Core
XUL
--
major
VERIFIED FIXED
17 years ago
17 years ago

People

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

Tracking

({memory-leak})

Trunk
x86
Windows 2000
memory-leak
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Have fix])

Attachments

(1 attachment)

1.01 KB, patch
Brian Ryner (not reading)
: review+
Details | Diff | Splinter Review
I'm hoping that this isn't a bogus stack.

Summary: Memory leak of 52 bytes from 1 block allocated in 
nsOutlinerBodyFrame::CheckVerticalOverflow

Build ID: Latest trunk win32 bits running under Purify on Windows 2000.

Steps to Repro:

1.  I just launched -mail, did a CTRL-M (new compose window).
2.  Typed stephend@netscape.com into the recipient field, attached a file, and 
sent (subject was 'test).
3.  Closed the app (which consisted of the single 3-pane window).

Looking at the stack, this may be mail/news' bug.  CC:ing the crew.

[W] MLK: Memory leak of 52 bytes from 1 block allocated in 
nsOutlinerBodyFrame::CheckVerticalOverflow(void)
    Distribution of leaked blocks
    Allocation location
    new(UINT)      [MSVCRT.DLL]
    nsOutlinerBodyFrame::CheckVerticalOverflow(void) 
[nsOutlinerBodyFrame.cpp:854]
      }
    
      if (verticalOverflowChanged) {
 =>     nsScrollPortEvent* event = new nsScrollPortEvent();
        event->eventStructType = NS_SCROLLPORT_EVENT;
        event->widget = nsnull;
        event->orient = nsScrollPortEvent::vertical;
    nsOutlinerBodyFrame::RowCountChanged(int,int) [nsOutlinerBodyFrame.cpp:1495]
      }
    
      InvalidateScrollbar();
 =>   CheckVerticalOverflow();
      return NS_OK;
    }
    
    nsOutlinerBoxObject::RowCountChanged(int,int) [nsOutlinerBoxObject.cpp:383]
    {
      nsIOutlinerBoxObject* body = GetOutlinerBody();
      if (body)
 =>     return body->RowCountChanged(aIndex, aDelta);
          return NS_OK;
        }
        
    nsMsgDBView::Close(void) [nsMsgDBView.cpp:1544]
        
          // this needs to happen after we remove all the keys, since 
RowCountChanged() will call our GetRowCount()
          if (mOutliner)
     =>     mOutliner->RowCountChanged(0, -oldSize);
        
          ClearHdrCache();
          if (m_db)
    nsMsgThreadedDBView::Close(void) [nsMsgThreadedDBView.cpp:97]
        }
        
        NS_IMETHODIMP nsMsgThreadedDBView::Close()
     => {
          return nsMsgDBView::Close();
        }
        
    ???            [ip=0x0a61be20]
    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:2798]
    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:1011]
    nsJSEventListener::HandleEvent(nsIDOMEvent *) [nsJSEventListener.cpp:180]
    nsEventListenerManager::HandleEventSubType(nsListenerStruct *,nsIDOMEvent 
*,nsIDOMEventTarget *,UINT,UINT) [nsEventListenerManager.cpp:1205]
    nsEventListenerManager::HandleEvent(nsIPresContext *,nsEvent *,nsIDOMEvent 
* *,nsIDOMEventTarget *,UINT,nsEventStatus *) [nsEventListenerManager.cpp:1878]
    GlobalWindowImpl::HandleDOMEvent(nsIPresContext *,nsEvent *,nsIDOMEvent * 
*,UINT,nsEventStatus *) [nsGlobalWindow.cpp:637]
(Assignee)

Comment 1

17 years ago
Looks like my checkin.
I'll have to find out why the overflow event is not destroyed.

Comment 2

17 years ago
-> varga@utcru.sk
Assignee: jaggernaut → varga
(Assignee)

Comment 3

17 years ago
I guess we should handle overflow events in two ways:
1. If we are in reflow, post dom event asynchronously through presentation shell
2. Otherwise handle event synchronously
Status: NEW → ASSIGNED
(Assignee)

Comment 4

17 years ago
Created attachment 64180 [details] [diff] [review]
patch

stephend, could you run purify with attached patch ?
yes, that fixes the leak (at least for Purify).
Comment on attachment 64180 [details] [diff] [review]
patch

r=bryner
Attachment #64180 - Flags: review+
Keywords: mailtrack, nsbeta1
Whiteboard: [Have fix]
(Assignee)

Comment 7

17 years ago
fixed along with bug 116855 
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
verified fixed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.