• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSAppleScript leaking memory?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAppleScript leaking memory?


  • Subject: Re: NSAppleScript leaking memory?
  • From: Andreas Mayer <email@hidden>
  • Date: Thu, 25 Mar 2004 23:02:44 +0100

Am 25.03.2004 um 21:11 schrieb Andreas Mayer:

My app is leaking memory and I think I have isolated it to the (repeated) use of an AppleScript.

Many thanks to Joar for pointing me to the MallocStackLoggingNoCompact environment variable.

I'll attach some leaks including backtrace at the end of this message.

It appears that

Call stack: [thread 9392316f]: | 0x0 | _pthread_body | forkThreadForFunction | -[AMiTunesTickerPlugin queryiTunes] | -[NSAppleScript executeAndReturnError:]

is the source of three types of leaks (of different size). So did I do anything wrong or should I file a bug against -[NSAppleScript executeAndReturnError:]?

Might it be a problem that I moved the script call to a separate thread? I really hope not ... :-/


Andreas







Call stack: [thread 9392316f]: | 0x0 | _pthread_body | forkThreadForFunction | -[AMiTunesTickerPlugin queryiTunes] | -[NSAppleScript executeAndReturnError:] | OSAExecute | CallComponent | GenericComponent | AGenericManager::HandleOSACall(ComponentParameters*) | CallComponent | AppleScriptComponent | CallComponentFunctionCommon | ASExecute(unsigned long, unsigned long, long, unsigned long*) | UASExecute(unsigned char) | UASExecute1() | UASGetData(unsigned char, TUASClassIdentifier*) | UASGetDataNoCircularities(unsigned char, TUASClassIdentifier*) | UASRemoteGetData(TUASObjectAlias*, TUASApplication*, TUASClassIdentifier*, unsigned char*) | UASRemoteSend(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char*) | TUASApplication::Send(TStackFrame_UASRemoteSend*, AEDesc*, AEDesc*, unsigned char, unsigned char, unsigned char) | ComponentSend(AEDesc const*, AEDesc*, long, long) | InvokeOSASendUPP | AEDefaultSendProc(AEDesc const*, AEDesc*, long, short, long, unsigned char (*)(EventRecord*, long*, OpaqueRgnHandle**), unsigned char (*)(EventRecord*, long, long, AEDesc const*), long) | AESend | aeSend | AESendMessage | waitForReply(unsigned, WaitForReplyElem*, unsigned long) | AEProcessMessage | AEImpl::decodeMessage(DescriptorBundleDecoder*) | operator new(unsigned long) | malloc | malloc_zone_malloc
Leak: 0x05ec2050 size=128
0xa167add8 0x05ec2050 0x00000005 0x00000001
0x61657674 0x9e9a898b 0x00000000 0x00000001
0x05ebf140 0x00000000 0x61657674 0x616e7372
0x29d9000d 0x00000000 0x00000000 0x00000070
0x00000000 0x00000000 0x00000000 0x03460001
0x00000000 0x00000000 0x00000000 0x70706320
0x05ec2180 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000

-[AMiTunesTickerPlugin queryiTunes] | -[NSAppleScript executeAndReturnError:] | OSAExecute | CallComponent | GenericComponent | AGenericManager::HandleOSACall(ComponentParameters*) | CallComponent | AppleScriptComponent | CallComponentFunctionCommon | ASExecute(unsigned long, unsigned long, long, unsigned long*) | UASExecute(unsigned char) | UASExecute1() | UASGetData(unsigned char, TUASClassIdentifier*) | UASGetDataNoCircularities(unsigned char, TUASClassIdentifier*) | UASRemoteGetData(TUASObjectAlias*, TUASApplication*, TUASClassIdentifier*, unsigned char*) | UASRemoteSend(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char*) | TUASApplication::Send(TStackFrame_UASRemoteSend*, AEDesc*, AEDesc*, unsigned char, unsigned char, unsigned char) | ComponentSend(AEDesc const*, AEDesc*, long, long) | InvokeOSASendUPP | AEDefaultSendProc(AEDesc const*, AEDesc*, long, short, long, unsigned char (*)(EventRecord*, long*, OpaqueRgnHandle**), unsigned char (*)(EventRecord*, long, long, AEDesc const*), long) | AESend | aeSend | AESendMessage | waitForReply(unsigned, WaitForReplyElem*, unsigned long) | AEProcessMessage | AEImpl::decodeMessage(DescriptorBundleDecoder*) | AEEventImpl::AEEventImpl[unified](DescriptorBundleDecoder*) | AERecordImpl::AERecordImpl[unified](DescriptorBundleDecoder*) | AEImpl::decodeMessage(DescriptorBundleDecoder*) | operator new(unsigned long) | malloc | malloc_zone_malloc
Leak: 0x05e508a0 size=80
0xa167ac30 0x05e508c8 0x00000002 0x00000001
0x70736e20 0x8f8c91df 0x05e508c8 0x00000008
0x00000000 0x00000000 0x00000000 0x03460001
0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000

Call stack: [thread 90a3a2c3]: | 0x0 | _pthread_body | forkThreadForFunction | -[AMiTunesTickerPlugin queryiTunes] | -[NSAppleScript executeAndReturnError:] | OSAExecute | CallComponent | GenericComponent | AGenericManager::HandleOSACall(ComponentParameters*) | CallComponent | AppleScriptComponent | CallComponentFunctionCommon | ASExecute(unsigned long, unsigned long, long, unsigned long*) | UASExecute(unsigned char) | UASExecute1() | UASGetData(unsigned char, TUASClassIdentifier*) | UASGetDataNoCircularities(unsigned char, TUASClassIdentifier*) | UASRemoteGetData(TUASObjectAlias*, TUASApplication*, TUASClassIdentifier*, unsigned char*) | UASRemoteSend(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char*) | TUASApplication::Send(TStackFrame_UASRemoteSend*, AEDesc*, AEDesc*, unsigned char, unsigned char, unsigned char) | ComponentSend(AEDesc const*, AEDesc*, long, long) | InvokeOSASendUPP | AEDefaultSendProc(AEDesc const*, AEDesc*, long, short, long, unsigned char (*)(EventRecord*, long*, OpaqueRgnHandle**), unsigned char (*)(EventRecord*, long, long, AEDesc const*), long) | AESend | aeSend | AESendMessage | waitForReply(unsigned, WaitForReplyElem*, unsigned long) | AEProcessMessage | AEImpl::decodeMessage(DescriptorBundleDecoder*) | AEEventImpl::AEEventImpl[unified](DescriptorBundleDecoder*) | AERecordImpl::AERecordImpl[unified](DescriptorBundleDecoder*) | AERecordImpl::putValue(unsigned long, unsigned long, AEImpl const*) | 0x916af328 | operator new[](unsigned long) | operator new(unsigned long) | malloc | malloc_zone_malloc
Leak: 0x0019bc90 size=16
0x6572726e 0x05e97830 0x0017d070 0x00010001
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NSAppleScript leaking memory?
      • From: Andreas Mayer <email@hidden>
References: 
 >NSAppleScript leaking memory? (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: Download MacOS 9
  • Next by Date: NSTableView
  • Previous by thread: NSAppleScript leaking memory?
  • Next by thread: Re: NSAppleScript leaking memory?
  • Index(es):
    • Date
    • Thread