• 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: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]


  • Subject: Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]
  • From: Steve Mills <email@hidden>
  • Date: Fri, 23 Jan 2015 13:40:02 -0600

On Jan 23, 2015, at 13:25:58, Jerry Krinock <email@hidden> wrote:
>
> Can anyone explain this weird crash report I got from a user and symbolized?  The last thing my code does (frame 24 in the call stack below), is to send -[NSAppleScript executeAndReturnError:].  The crash says someone tried to set a *dictionary* object with a nil key.  How could I have done that?
>
> NSString* source ;
> source = [NSString stringWithFormat:
> 		  @"tell application \"%@\"\n"
> 		  @"activate\n"
> 		  @"present last logged error\n"
> 		  @"end tell",
> 		  [[NSBundle mainAppBundle] bundlePath]
> 		  ] ;
>
> where [[NSBundle mainAppBundle] bundlePath] returns “com.mycompany.MyApp”.  MyApp indeed has a 'present last logged error’ AppleScript command defined, and it works.

I can't find any docs for "present last logged error". How do I set up a state so that it will do something? I'm trying your code here and it executes fine, probably because there is no last logged error. I tried first sending an AppleScript that asked for document 1, which generated an error because there is no document.

--
Steve Mills
Drummer, Mac geek


_______________________________________________

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: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]
      • From: Jerry Krinock <email@hidden>
References: 
 >Inexplicable Crash in -[NSAppleScript executeAndReturnError:] (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]
  • Next by Date: Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]
  • Previous by thread: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]
  • Next by thread: Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]
  • Index(es):
    • Date
    • Thread