Bug 4841 - LEAK: Loading a page with Shockwave causes 200+ immediate leaks
Summary: LEAK: Loading a page with Shockwave causes 200+ immediate leaks
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P2 Major
Assignee: Nobody
URL: http://www.kotska.com/swtest/
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-04 07:27 PDT by Sulka Haro
Modified: 2008-07-29 06:02 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sulka Haro 2005-09-04 07:27:02 PDT
Pulled the latest CVS version ten minutes ago, Safari reports itself as:

Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Safari/412.5

Open the linked page and check for leaks. On my machine I get 296 new leaks on that one page. I'm sure 
a lot of them are inside the plugin but I don't have the skills to check so am reporting here.
Comment 1 Mark Rowe (bdash) 2005-09-07 00:44:37 PDT
An example of the leaks is as follows

Leak: 0x011b6810  size=16       instance of 'NSCFArray' 
        0x011035e0 0x00010484 0x00000001 0x01112490     ..5...........$.
        Call stack: [thread 6]: | 0x0 | 0x56e28 | 0x21e8 | NSApplicationMain | -[NSApplication run] | 
0x6bbc | -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] | _DPSNextEvent | 
BlockUntilNextEventMatchingListInMode | ReceiveNextEventCommon | RunCurrentEventLoopInMode | 
CFRunLoopRunSpecific | __CFRunLoopRun | __CFRunLoopDoTimer | 0x9288d998 | 0x1af60 | 0x1aff0 | 
0x1b0ac | 0x92871514 | 0x9286cc80 | _CFXNotificationPostNotification | __CFXNotificationPost | 
0x92882878 | 0x6764 | 0x9286b8e0 | 0x9286b348 | _CFApplicationPreferencesCreateValueForKey | 
computeDictRep | _CFPreferencesDomainDeepCopyDictionary | copyXMLDomainDictionary | 
CFPropertyListCreateDeepCopy | CFPropertyListCreateDeepCopy | _arrayDeepImmutableCopy | 
CFArrayCreate | __CFArrayInit | _CFRuntimeCreateInstance | CFAllocatorAllocate 

The presence of 0x0 at the top of the call stack suggests to me that `leaks' isn't able to work out where 
the memory is being allocated from, which would fit in with the fact that Shockwave is a PEF bundle.  I 
don't know enough about how `leaks' works to say for sure that this is the case, but it seems logical 
enough.
Comment 2 Sulka Haro 2005-09-07 02:03:17 PDT
Most of the leaks on my machine are as follows:

Leak: 0x0cd12e30  size=32	string 'Charcoal CY'
Leak: 0x0cd12e50  size=32	instance of 'NSCFString'	
	0xa0728674 0x000107ad 0x0cd12e70 0x00000009 	.r.t.......p....
	0x00000020 0x00000020 0xa1b1c1d3 0x0a9e9f60 	... ... .......`

which seem to be a leak for every font installed into the system. Also some system-level details are 
leaked, like

Leak: 0x0a9171f0  size=16	string 'CarbonLib'
Leak: 0x00645a40  size=16	
	0x43617262 0x6f6e4c69 0x629b2d60 0x00010001 	CarbonLib.-`....
Leak: 0x0cd5b8c0  size=64	instance of 'NSCFString'	
	0xa0728674 0x0001078c 0x29636f6d 0x2e617070 	.r.t....)com.app
	0x6c652e48 0x49546f6f 0x6c626f78 0x2e77696e 	le.HIToolbox.win
	0x646f7767 0x726f7570 0x732e646f 0x63756d65 	dowgroups.docume
	0x6e740060 0x00000000 0x00000000 0x00000000 	nt.`............

and other strings which contain paths to the Application Support folder on my machine. The leaking 
appears to be slightly sporadic since yesterday I got 296 leaks / startup and today I'm getting 305 leaks 
/ startup even though the Safari build is the same and AFAIK I haven't change the system configuration.
Comment 3 Maciej Stachowiak 2005-09-20 16:39:23 PDT
I would guess most of these leaks are in Shockwave itself. One way to find out is to see if other browsers 
on Mac OS X show the same leaks when loading that page.
Comment 4 Sulka Haro 2005-09-21 00:56:17 PDT
(In reply to comment #3)
> I would guess most of these leaks are in Shockwave itself. One way to find out is to see if other 
browsers 
> on Mac OS X show the same leaks when loading that page.

True. Firefox 1.0.6 reports 176 leaks after startup before any content is loaded (!) and 487 leaks 
following the test case page load. The amount of difference in the leaks is roughly the same between 
Safari and Firefox and most of the leaks appear to be identical (for example the font leaks) so I'm 
inclined to agree majority of the leaks are within the plugin itself or in libraries the plugin calls.

I would assume Apple has more leverage on Macromedia than Joe Average so could someone in Safari 
team report this to Macromedia? The public bug report form for Shockwave bugs is at

http://www.macromedia.com/cfusion/mmform/index.cfm?name=wishform&product=28

Thanks.
Comment 5 Robert Blaut 2008-07-29 06:02:50 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > I would guess most of these leaks are in Shockwave itself. One way to find out is to see if other 
> browsers 
> > on Mac OS X show the same leaks when loading that page.
> 
> True. Firefox 1.0.6 reports 176 leaks after startup before any content is loaded (!) and 487 leaks 
> following the test case page load. The amount of difference in the leaks is roughly the same between 
> Safari and Firefox and most of the leaks appear to be identical (for example the font leaks) so I'm 
> inclined to agree majority of the leaks are within the plugin itself or in libraries the plugin calls.

So the report doesn't describe problem in WebKit and should be closed.