Closed Bug 154066 Opened 23 years ago Closed 23 years ago

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

Categories

(Core :: XUL, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: stephend, Assigned: bryner)

Details

(Keywords: memory-leak)

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]
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.
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.
Are there any other leaks associated with this action?
I don't see this leak anymore - could've been a fluke.
Status: ASSIGNED → RESOLVED
Closed: 23 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.