On May 1, 2013, at 11:29 PM, Zhuang Xu <[email protected]> wrote:
> I am using NSWorkspace launchApplicationAtURL:options:configuration:error
> launch the same app in Sandbox, sometimes there is an error:
> 
> "The operation couldn't be completed. (OSStatus error - 10810)"

What do you mean "there is an error"? Does the above message appear in the 
console? Do you get an alert?

> this error appears occasionally not all the time. Is anybody know what's
> going on? Am I missing something?

I found this:

<http://www.thexlab.com/faqs/error-10810.html>
"One cause of this error is that the MacĀ® OS X process table is full."

I haven't read the whole article, but it suggests that either your app or some 
other app is filling up the process table. It does say "One cause", not "The 
only cause", so it's possible you have a different problem, but this is the 
first thing I'd check.

You don't mention whether you tried Google. I did but got lucky. The first 
thing I searched for was "OSStatus error - 10810" (without the quotes) and the 
above link was the first result. If I had Googled for the whole message "The 
operation couldn't be completed. (OSStatus error - 10810)", the results would 
have been less useful.

When I Googled for "10810 site:developer.apple.com" (or searched for "10810" in 
the documentation, using Xcode) I only found the Launch Services Reference, 
which only told me the error means "An unknown error has occurred."

<https://developer.apple.com/library/mac/#documentation/Carbon/Reference/LaunchServicesReference/Reference/reference.html>

This is consistent with a full process table being one possible cause, not the 
only one. But it's the first thing I would check for.

> and in Mac OS 10.7.4 and 10.7.5 when I set a dictionary to the third
> parameter:
> 
> [image: Inline image 1]

It's good that you showed your code, but you know, you don't have to take a 
screen shot. You can just paste the actual code into email. :) Easier for you 
and easier for us, because we may want to show how to fix your code. If I want 
to do that I have to type the code myself, reading from your screen shot, 
instead of just copying it.

> but in new app's main function, argv array don't have
> "checkAccountArgument" parameter.

How do you know this? The docs for NSWorkspaceLaunchConfigurationArguments say 
"Ignored if a new instance of the application is not launched." So maybe the 
app isn't getting launched.

> in Mac OS 10.8.5 it seems OK.

I ran the command "ulimit -a", which I got from the article I found. On a 
10.6.8 system it shows 266 as the max user processes, which matches what the 
article says. However on a 10.8.3 system it shows 709. This might explain why 
you don't run into the problem on 10.8.x.

--Andy


_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to