• 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
Parental Controls - [Was: NSTask Explodes. Clueless.]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parental Controls - [Was: NSTask Explodes. Clueless.]


  • Subject: Parental Controls - [Was: NSTask Explodes. Clueless.]
  • From: Seth Willits <email@hidden>
  • Date: Sun, 12 May 2013 18:08:21 -0700


Update: I *finally* got a bead on this.


The user running my main application has parental controls enabled. The user is allowed to run the main application, and can, but the helper task that is bundled inside the main application's bundle is not allowed to run. When the *task* launches, *it* crashes, but since it happens *while* fork/exec'ing, the crash *appears* to be main application crashing, but it's not.

When the task launches, the user is shown a dialog by the OS: "You don't have permission to use the application "mytask."" There are options to Always allow, allow once, and just ignore and move on. Allowing once, and even "Always allow" always results in the same message, and the task crashing. The permissions do not stick at all, probably because it's bundled inside the main .app package's Resource folder?

Any ideas what to do?


--
Seth Willits





On Feb 4, 2013, at 11:26 AM, Seth Willits wrote:

>
> In my app I have to launch background processes (bundled within my app's Resources folder) to do some things, and I launch them with NSTask. Every now and then I get a crash report which shows NSTask throws some fatal exception which is not caught by a wrapping @try block.
>
>
> For example:
>
>
>
> @try {
> 	NSString * taskPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"mytask"];
> 	task = [[NSTask alloc] init];
> 	task.launchPath = taskPath;
> 	task.arguments = @[aUUIDString];
> 	[task launch];
> }
> @catch (NSException * e) {
> 	...
> }
>
>
>
> And it crashes:
>
>
> Exception Type:  EXC_BREAKPOINT (SIGTRAP)
> Exception Codes: 0x0000000000000002, 0x0000000000000000
>
> *** NSTask: Task create for path '/Applications/App.app/Contents/Resources/mytask' failed: 22, "Invalid argument". Terminating temporary process.
> *** multi-threaded process forked ***
>
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> 0   com.apple.Foundation          	0x978142d8 ___NEW_PROCESS_COULD_NOT_BE_EXECD___ + 7
> 1   com.apple.Foundation          	0x976d2e16 -[NSConcreteTask launchWithDictionary:] + 4698
> 2   com.apple.Foundation          	0x97744447 -[NSConcreteTask launch] + 40
>

>




--
Seth Willits




_______________________________________________

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: Parental Controls - [Was: NSTask Explodes. Clueless.]
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Validate core data sqlite file
  • Next by Date: Re: Parental Controls - [Was: NSTask Explodes. Clueless.]
  • Previous by thread: Re: Validate core data sqlite file
  • Next by thread: Re: Parental Controls - [Was: NSTask Explodes. Clueless.]
  • Index(es):
    • Date
    • Thread