• 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: tracking EXC_BAD_ACCESS error in applescript command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tracking EXC_BAD_ACCESS error in applescript command


  • Subject: Re: tracking EXC_BAD_ACCESS error in applescript command
  • From: François Guillet <email@hidden>
  • Date: Mon, 21 Dec 2009 22:54:27 +0100

That was a copy of the original call stack before I subclass NSScriptCommand. If I subclass NSScriptCommand and call executeCommand from this subclass, then the crash occurs as before, but of course the call stack changes accordingly. Anyway I put breakpoints in my subclass' methods to make sure I get through them.

I've found a workaround which anyway is the way I originally wanted scripting to work. I have the document return an object of (say) FooClass through the property foo. Then I declare an object-first command (say check) and implement the command handler in the FooClass class. Then the applescript statement :

check foo of front document

does work fine. So I can't find a way of doing "check front document" using NSScriptCommand's executeCommand but I can do so on an object contained by the document...

Le 21 déc. 2009 à 03:19, Jerry Krinock a écrit :

>
>
> On 2009 Dec 20, at 13:50, François Guillet wrote:
>
>> EXC_BAD_ACCESS error :
>> #0  0x00007fff86951466 in -[NSScriptCommand _sendToRemainingReceivers] ()
>> #1  0x00007fff86951fe5 in -[NSScriptCommand executeCommand] ()
>> #2  0x00007fff8696902e in -[NSScriptingAppleEventHandler handleCommandEvent:withReplyEvent:] ()
>
>> I implemented a subclass of NSScriptCommand used both for verb first or object first command : everything works fine, I can call [[self evaluatedReceivers] handleCommmand:self] from  executeCommand without any problem. The EXC_BAD_ACCESS error, though, always happens if I try to call NSScriptCommand's executeCommand.
>
> Not sure about the crash, but if you've subclassed NSScriptCommand, should not your subclass name appear in the call stack shown above, instead of NSScriptCommand?  In your sdef, have you specified your subclass to be the Cocoa Class of this command?
>
> _______________________________________________
>
> 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
>

François





_______________________________________________

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

References: 
 >tracking EXC_BAD_ACCESS error in applescript command (From: François Guillet <email@hidden>)
 >Re: tracking EXC_BAD_ACCESS error in applescript command (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Core Data validateForUpdate
  • Next by Date: Re: App not stopping at _NSLockError breakpoint
  • Previous by thread: Re: tracking EXC_BAD_ACCESS error in applescript command
  • Next by thread: IKImageBrowserView managing the number of columns manually
  • Index(es):
    • Date
    • Thread