hey dawg, when you going to fix your memory leaks?

The Growl forums have moved to Google Groups, this forum is read only.
spaznode
Harmless
Posts: 3
Joined: Sat Sep 19, 2009 2:43 pm

hey dawg, when you going to fix your memory leaks?

Postby spaznode » Sat Sep 19, 2009 2:47 pm

Even with the 1.2b3 version I'm still finding to my shock and horror that GrowlHelperApp is consuming much more memory than it should. As of yesterday I noticed it at 89mb after a normal day of coding and listening to music.

Wtf? ..

Maybe step through the debugger and assert what you think is happening is really happening instead of relying on shark/mallocdebug to report things to you?

User avatar
boredzo
Cocoaforge Admin
Posts: 796
Joined: Mon Dec 06, 2004 7:49 am
Contact:

Re: hey dawg, when you going to fix your memory leaks?

Postby boredzo » Sat Sep 19, 2009 3:39 pm

Stepping through the debugger would be a really slow way to find leaks.

The output you get from heap or leaks in the terminal would be much more helpful.

spaznode
Harmless
Posts: 3
Joined: Sat Sep 19, 2009 2:43 pm

Re: hey dawg, when you going to fix your memory leaks?

Postby spaznode » Sat Sep 19, 2009 7:04 pm

Hmm.. Fair enough.

Just after starting it, paused and resumed playing on a song twice and then progressed to one new song.
Attachments
GrowlHelperApp_leaks.txt
(37.23 KiB) Downloaded 252 times
GrowlHelperApp_heap.txt
(32.82 KiB) Downloaded 192 times

User avatar
boredzo
Cocoaforge Admin
Posts: 796
Joined: Mon Dec 06, 2004 7:49 am
Contact:

Re: hey dawg, when you going to fix your memory leaks?

Postby boredzo » Sat Sep 19, 2009 10:31 pm

Interesting. I'm actually not sure how strings like those can make it into GrowlHelperApp. What iTunes-notifier application are you using?

If you can kill GrowlHelperApp and then run it with MallocStackLogging turned on, that may help even more, as it would reveal where in GHA those objects are being allocated.

User avatar
The_Tick
Cocoaforge Admin
Posts: 4642
Joined: Thu Dec 02, 2004 6:06 am
Contact:

Re: hey dawg, when you going to fix your memory leaks?

Postby The_Tick » Sun Sep 20, 2009 7:03 pm

Which display are you using?

rudy
Growl Team
Posts: 50
Joined: Tue Dec 07, 2004 12:33 am

Re: hey dawg, when you going to fix your memory leaks?

Postby rudy » Tue Sep 22, 2009 1:27 pm

Process 16357: 24113 nodes malloced for 14867 KB
Process 16357: 1 leak for 80 total leaked bytes.
Leak: 0x10050c2c0 size=80 zone: DefaultMallocZone_0x10009a000 instance of 'NSCFString', type ObjC, implemented in Foundation
0x70a113c0 0x00007fff 0x0000078c 0x00000001 ...p............
0x45384139 0x35434131 0x35372d38 0x342d4436 9A8E1AC58-756D-4
0x2d433245 0x31334542 0x4332422d 0x45303130 E2C-BE31-B2C010E
0x30373332 0x38312d43 0x30302d36 0x39313030 2370C-186-000019
0x37343035 0x37383437 0x00004345 0x00000000 50477487EC......
Call stack: [thread 0x114c81000]: | thread_start | _pthread_start | __NSThread__main__ | -[NSConnection run] | CFRunLoopRunSpecific | __CFRunLoopRun | __CFRunLoopDoSource1 | __CFMachPortPerform | __NSFireMachPort | -[NSConcretePortCoder dispatch] | -[NSConnection handlePortCoder:] | -[NSConnection handleRequest:sequence:] | _NSWalkData2 | -[NSConcretePortCoder decodeRetainedObject] | -[NSConcretePortCoder decodeInvocation] | _NSWalkData2 | -[NSConcretePortCoder decodeRetainedObject] | -[NSDictionary(NSDictionary) initWithCoder:] | _NSWalkData2 | -[NSConcretePortCoder decodeRetainedObject] | -[NSString initWithCoder:] | -[NSPlaceholderString initWithBytes:length:encoding:] | CFStringCreateWithBytes | __CFStringCreateImmutableFunnel3 | _CFRuntimeCreateInstance | malloc_zone_malloc

our DO is leaking.
C4 & Demolitions Expert / Ambrosia Software, Inc. / http://www.AmbrosiaSW.com/

rudy
Growl Team
Posts: 50
Joined: Tue Dec 07, 2004 12:33 am

Re: hey dawg, when you going to fix your memory leaks?

Postby rudy » Tue Sep 22, 2009 1:31 pm

export MallocStackLogging=1 && ~/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app/Contents/MacOS/GrowlHelperApp

let a bunch of notifications fly and run the leaks command again.
C4 & Demolitions Expert / Ambrosia Software, Inc. / http://www.AmbrosiaSW.com/

spaznode
Harmless
Posts: 3
Joined: Sat Sep 19, 2009 2:43 pm

Re: hey dawg, when you going to fix your memory leaks?

Postby spaznode » Tue Sep 22, 2009 6:07 pm

boredzo wrote:Interesting. I'm actually not sure how strings like those can make it into GrowlHelperApp. What iTunes-notifier application are you using?

If you can kill GrowlHelperApp and then run it with MallocStackLogging turned on, that may help even more, as it would reveal where in GHA those objects are being allocated.


Nevermind, culprit seems to be http://github.com/mxcl/lastfm-cocoa. Using an alternate client results in GrowlHelperApp staying fairly consistently at 16mb.

Sorry for disparaging your library, seems to run perfectly for me now.

Unrelated: Maybe there is a general image related core leak in 10.6.1 that's related to the previous issues? (Had to turn off cover flow in itunes to avoid f-ing 500mb memory allocation, compared to the 60mb it's taking with cover flow off)


Return to “Growl”

Who is online

Users browsing this forum: No registered users