• 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
Hang during AESend
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hang during AESend


  • Subject: Hang during AESend
  • From: Trygve Inda <email@hidden>
  • Date: Tue, 13 May 2014 13:03:17 -0700
  • Thread-topic: Hang during AESend

Sometimes, I am getting a hang. I can reproduce it by creating a lot of
Apple Events (~100) within a few seconds, but it is not predictable enough
to always happen at the same time.

Console reports:

5/13/14 12:52:59.290 PM appleeventsd[56]: Got kAELookupClientPort with no
criteria:{command=300, } (handleMessage()/appleEventsD.cp #2011)
com.apple.coreservices.appleevents.peer.0x7fc1eb307960.xpcq


Hang/Crash Report:

10 AESendMessage + 5541 (AE) [0x7fff8e8feee3]
10 sendToModernProcess(__CFMachPort*, unsigned int, AEDesc const*, long) +
431 (AE) [0x7fff8e900dd8]
10 mach_msg_trap + 10 (libsystem_kernel.dylib) [0x7fff83ad6686]
*10 hndl_mach_scall64 + 19 (mach_kernel) [0xffffff80002cf473]
*10 ??? (mach_kernel + 681286) [0xffffff80002a6546]
*10 mach_msg_overwrite_trap + 187 (mach_kernel) [0xffffff800021961b]
*10 ipc_kmsg_send + 372 (mach_kernel) [0xffffff8000210554]
*10 ipc_mqueue_send + 315 (mach_kernel) [0xffffff8000212ceb]
*10 thread_block_reason + 300 (mach_kernel) [0xffffff800022db9c]
*10 ??? (mach_kernel + 190673) [0xffffff800022e8d1]
*10 machine_switch_context + 366 (mach_kernel) [0xffffff80002b496e]


My code:

NSData* aeData = [NSKeyedArchiver archivedDataWithRootObject:myDict];

pid_t pid = [[[NSRunningApplication
runningApplicationsWithBundleIdentifier:targetIdentifier] lastObject]
processIdentifier];

NSAppleEventDescriptor* targetDescriptor = [NSAppleEventDescriptor
descriptorWithDescriptorType:typeKernelProcessID bytes:&pid
length:sizeof(pid)];

NSAppleEventDescriptor *appleEvent = [NSAppleEventDescriptor
appleEventWithEventClass: kMyAEClass
eventID: kMyAEEventID
targetDescriptor: targetDescriptor
returnID: kAutoGenerateReturnID
transactionID: kAnyTransactionID];

NSAppleEventDescriptor* record = [NSAppleEventDescriptor recordDescriptor];
[record setParamDescriptor:[NSAppleEventDescriptor
descriptorWithDescriptorType:kAEDescriptorTypeDictionary data:aeData]
forKeyword:kAEMyKeywordDictionary];

appleEvent setDescriptor:record forKeyword:keyDirectObject];

AESendMessage([appleEvent aeDesc], NULL, kAENoReply | kAENeverInteract,
kAEDefaultTimeout);


Any ideas?

Trygve



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Hang during AESend
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Share and store RSA - public key in java server and vice versa
  • Next by Date: Re: Hang during AESend
  • Previous by thread: Re: Lenient Date Formatter
  • Next by thread: Re: Hang during AESend
  • Index(es):
    • Date
    • Thread