Memory leak of 52 bytes from 1 block allocated in nsScrollBoxFrame::PostScrollPortEvent

VERIFIED WORKSFORME

Status

()

VERIFIED WORKSFORME
16 years ago
16 years ago

People

(Reporter: stephend, Assigned: bryner)

Tracking

({memory-leak})

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

Firefox Tracking Flags

(Not tracked)

Details

bryner, if you're not the lottery winner of this lucky bug, pass it like a hot 
potato.

Trunk, Windows 2000, under Purify

I had:

nsmail-2 (dredd) IMAP account collapsed
nsmail-1 (judge) POP3 account collapsed
Local Folders expanded

All I did to incur this was opening a draft message (window was maximized, so 
the only scrollbar possible was the Folder Pane's):

[W] MLK: Memory leak of 52 bytes from 1 block allocated in 
nsScrollBoxFrame::PostScrollPortEvent(nsIPresShell 
*,int,orientType::nsScrollPortEvent)
        Distribution of leaked blocks
        Allocation location
            new(UINT)      [MSVCRT.DLL]
            nsScrollBoxFrame::PostScrollPortEvent(nsIPresShell 
*,int,orientType::nsScrollPortEvent) [nsScrollBoxFrame.cpp:573]
                  if (!mContent)
                    return;
                
             =>   nsScrollPortEvent* event = new nsScrollPortEvent();
                  event->eventStructType = NS_SCROLLPORT_EVENT;
                  event->widget = nsnull;
                  event->orient = aType;
            nsScrollBoxFrame::DoLayout(nsBoxLayoutState&) 
[nsScrollBoxFrame.cpp:485]
                      if (mVerticalOverflow == mHorizontalOverflow)
                      {
                        // both either overflowed or underflowed. 1 event
             =>         PostScrollPortEvent(shell, mVerticalOverflow, 
nsScrollPortEvent::both);
                      } else {
                        // one overflowed and one underflowed
                        PostScrollPortEvent(shell, mVerticalOverflow, 
nsScrollPortEvent::vertical);
            nsBox::Layout(nsBoxLayoutState&) [nsBox.cpp:1060]
                {
                  BeginLayout(aState);
                
             =>   DoLayout(aState);
                
                  EndLayout(aState);
                
            nsContainerBox::LayoutChildAt(nsBoxLayoutState&,nsIBox *,nsRect 
const&) [nsContainerBox.cpp:645]
            nsGfxScrollFrameInner::LayoutBox(nsBoxLayoutState&,nsIBox *,nsRect 
const&) [nsGfxScrollFrame.cpp:1080]
            ???            [ip=0x0013f604]
            nsGfxScrollFrameInner::Layout(nsBoxLayoutState&) 
[nsGfxScrollFrame.cpp:1233]
            nsGfxScrollFrame::DoLayout(nsBoxLayoutState&) 
[nsGfxScrollFrame.cpp:1089]
            nsBox::Layout(nsBoxLayoutState&) [nsBox.cpp:1060]
            nsBoxFrame::Reflow(nsIPresContext 
*,nsHTMLReflowMetrics&,nsHTMLReflowState const&,UINT&) [nsBoxFrame.cpp:999]
            nsGfxScrollFrame::Reflow(nsIPresContext 
*,nsHTMLReflowMetrics&,nsHTMLReflowState const&,UINT&) 
[nsGfxScrollFrame.cpp:776]
            nsContainerFrame::ReflowChild(nsIFrame *,nsIPresContext 
*,nsHTMLReflowMetrics&,nsHTMLReflowState const&,int,int,UINT,UINT&) 
[nsContainerFrame.cpp:802]
            ViewportFrame::Reflow(nsIPresContext 
*,nsHTMLReflowMetrics&,nsHTMLReflowState const&,UINT&) [nsViewportFrame.cpp:576]
            PresShell::InitialReflow(int,int) [nsPresShell.cpp:2861]
            HTMLContentSink::StartLayout(void) [nsHTMLContentSink.cpp:3742]
            HTMLContentSink::OpenBody(nsIParserNode const&) 
[nsHTMLContentSink.obj:2970]
            CNavDTD::OpenBody(nsCParserNode const*) [CNavDTD.cpp:3168]
            CNavDTD::OpenContainer(nsCParserNode 
const*,nsHTMLTag,int,nsEntryStack *) [CNavDTD.cpp:3413]
            CNavDTD::HandleDefaultStartToken(CToken *,nsHTMLTag,nsCParserNode 
*) [CNavDTD.cpp:1343]
(Assignee)

Comment 1

16 years ago
I'm fairly sure DOM events are supposed to be stack-allocated, not heap-allocated...
Status: NEW → ASSIGNED
To be more clear, I believe this leak happens if you have Account Central set to
display for the default account.  What happens in this case, is we draw the
message pane window (with scrollbars, etc), then suddenly collapse it and show
Account Central.
(Assignee)

Comment 3

16 years ago
I spoke too soon.  For a call to PostDOMEvent, the event needs to be
heap-allocated.  It sounds like something is causing the presshell to never
delete the event.
(Assignee)

Comment 4

16 years ago
Are there any other leaks associated with this action?
I don't see this leak anymore - could've been a fluke.  
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → WORKSFORME
I still don't see this.  Verified WFM.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.