Despite the recent excellent efforts of developers tracking down memory leaks, I've still noticed problems in the latest Safari builds with some sites, and I think I have narrowed it down to sites using Flash animations. Specifically, www.foodtv.com exhibit these kinds of issues. I tried the steps outlined in the WebKit blog and I have traced down the leaks to the WebBaseNetscapePluginView class, although for some reason the stack trace doesn't go any farther (it just gives hex addresses). This is 100% reproducable on my PB AL G4 12", and has happened ever since 10.3/Safari 1. Steps to reproduce: 1. Run Safari using MallocStackLogging=YES. 2. View site with Flash content, such as foodtv.com 3. Navigate around a few pages for good measure (I went to the Turkey section, but which part doesn't seem to matter). 4. Print leaks with "leaks Safari". The memory leaks seem to be bad enough that after a few hours of usage, if the visited sites contain enough Flash, I get the beachball and eventually have to quit Safari and restart. Even closing every window in Safari does not help. I have a text file of the print from "leaks Safari", which is 56K, and would be happy to send it to anyone as necessary. Just let me know. A sample entry from the file: Process 5074: 110292 nodes malloced for 18887 KB Process 5074: 25 leaks for 5152 total leaked bytes. Leak: 0x07b9f200 size=1024 string 'THRD' Call stack: [thread 265b]: | 0x0 | 0x56d1c | 0x265c | NSApplicationMain | -[NSApplication run] | 0x6ef0 | -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] | _DPSNextEvent | BlockUntilNextEventMatchingListInMode | ReceiveNextEventCommon | RunCurrentEventLoopInMode | CFRunLoopRunSpecific | __CFRunLoopRun | __CFRunLoopDoObservers | _handleWindowNeedsDisplay | 0x1729c | -[NSWindow displayIfNeeded] | -[NSView displayIfNeeded] | -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] | 0x18f44 | -[NSNotificationCenter postNotificationName:object:userInfo:] | _CFXNotificationPostNotification | __CFXNotificationPost | _nsnote_callback | 0x353c0 | 0x356e0 | _NSStartSimpleThread | pthread_create Leak: 0x0aff6140 size=480 0x00680074 0x00740070 0x003a002f 0x002f0077 .h.t.t.p.:././.w 0x00650062 0x002e006c 0x00690067 0x00680074 .e.b...l.i.g.h.t 0x006e0069 0x006e0067 0x00630061 0x00730074 .n.i.n.g.c.a.s.t 0x002e006e 0x00650074 0x002f0073 0x00650072 ...n.e.t./.s.e.r 0x0076006c 0x00650074 0x0073002f 0x00670065 .v.l.e.t.s./.g.e 0x00740050 0x006c0061 0x0079006c 0x00690073 .t.P.l.a.y.l.i.s 0x0074003f 0x00760065 0x0072003d 0x0032002e .t.?.v.e.r.=.2.. 0x00300026 0x006e0077 0x00690064 0x003d0037 .0.&.n.w.i.d.=.7 ...
I've noticed this as well. To add to the oddness of the plugin-based leak behavior, the "leaks" report doesn't include most of the memory that's leaked by plugins. For example, just before writing this report, leaks reported Process 1688: 530288 nodes malloced for 156599 KB Process 1688: 1822 leaks for 94944 total leaked bytes. Activity Monitor however reports 232MB of allocated Real Memory for Safari (2.0.2). All windows under the Safari application were closed prior to fetching these numbers. A couple days ago I noticed Safari had hogged 760MB of RAM, none of which was released by closing all windows. Since the plugin leaks aren't reported as leaks, I guess this means the instances of the plugins are referred to somewhere even after the containing window is closed, leading to the longer term unreported leaking? Could you consider increasing the priority of the issue, it's causing severe instability on Safari. At least people here at the office are losing confidence in Safari due to having to restart the app over and over again every day.
(In reply to comment #0) > I have a text file of the print from "leaks Safari", which is 56K, and would be > happy to send it to anyone > as necessary. Just let me know. Do you still have this dump from "leaks Safari"? Can you still reproduce this? I would like to see the leaks output. Can you attach it to this bug, or email it to timo@apple.com?
Do you see the same issue when using Firefox and Opera. I ask in order to be able to work out whether it is webkit related or Flash related.
Reassigning to webkit-unassigned, to make sure more people see this.
No reply to questions withing 2 weeks, closing. Please reopen when you have answered and bug still exists.
check out my entry. I include a simple code fix. http://bugs.webkit.org/show_bug.cgi?id=11523