• 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: 6 seconds delay when calling AXUIElementCopyAttributeValue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 6 seconds delay when calling AXUIElementCopyAttributeValue


  • Subject: Re: 6 seconds delay when calling AXUIElementCopyAttributeValue
  • From: Greg Hughes <email@hidden>
  • Date: Mon, 31 Dec 2012 14:19:56 -0500

Accessibility inter-process-communication (IPC) calls are handled by the main thread. If the main thread of the application you are requesting information from is blocked or busy then then IPC request will timeout. This timeout can be changed. 

Sent from my iPad

On Dec 31, 2012, at 12:43 PM, Dave Poirier <email@hidden> wrote:

Hello everyone,

Has anybody else encountered situations where AXUIElementCopyAttributeValue can take up to 6 seconds before returning nil?

I'm running the following piece of code on the main thread of my background app:

-(AXUIElementRef) getElementAttribute:(CFStringRef)name
{
    NSLog(@"getElementAttribute: %@", name);
    AXUIElementRef value;
    if (AXUIElementCopyAttributeValue(_element, name, (CFTypeRef *)&value) != kAXErrorSuccess) {
        NSLog(@"getElementAttribute end with nil");
        return nil;
    }
    NSLog(@"getElementAttribute end");
    return value;
}

It works reliably until a foreground application Keychain password prompt comes up, at which point I see this starting to occur in the logs of my background app:

2012-12-31 12:13:38.770 UndisclosedApp[2554:303] getElementAttribute: AXFocusedUIElement
2012-12-31 12:13:44.771 UndisclosedApp[2554:303] getElementAttribute end with nil

I'll be filing a bug report a little later with some sample code once I can isolate the smallest combination of factors to reproduce the issue, but I was curious to see if anybody else encountered a similar situation.

Thanks,


Dave Poirier
Senior Software Developer
email: email@hidden
cell: 18192097798
skype: ekscrypto

All I need is a towel, everything else can be answered by 42.


Do not post admin requests to the list. They will be ignored. Accessibility-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: 6 seconds delay when calling AXUIElementCopyAttributeValue
      • From: Dave Poirier <email@hidden>
References: 
 >6 seconds delay when calling AXUIElementCopyAttributeValue (From: Dave Poirier <email@hidden>)

  • Prev by Date: 6 seconds delay when calling AXUIElementCopyAttributeValue
  • Next by Date: Re: 6 seconds delay when calling AXUIElementCopyAttributeValue
  • Previous by thread: 6 seconds delay when calling AXUIElementCopyAttributeValue
  • Next by thread: Re: 6 seconds delay when calling AXUIElementCopyAttributeValue
  • Index(es):
    • Date
    • Thread