• 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
NSAppleScript - compileAndReturnError always breaks with EXC_BAD_ACCESS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSAppleScript - compileAndReturnError always breaks with EXC_BAD_ACCESS


  • Subject: NSAppleScript - compileAndReturnError always breaks with EXC_BAD_ACCESS
  • From: Alex Wied <email@hidden>
  • Date: Sun, 6 Jul 2008 00:44:19 +0200

Greetings,

I have a trivial AppleScript that I would like to compile and run under Objective-C. When I try to compile or execute it via compileAndReturnError or executeAndReturnError I'm permanetly receiving a EXC_BAD_ACCESS.

Here's my code:

======= CODE START ===
- (IBAction) simpleScript:(id)sender
{
NSAppleScript* theScript = [[NSAppleScript alloc] initWithSource: @"beep 3"];
if (theScript != NULL)
{
NSDictionary* errDict = NULL;
// execution of the following line ends with EXC
if (YES == [theScript compileAndReturnError: &errDict])
{
NSLog(@"compiled the script");
[theScript executeAndReturnError: &errDict];
}
[theScript release];
}
}
======= CODE END ===


I did some research and found similar reports that suggested that this might be a threading or garbage collection issue. I'm calling the code in the main thread (i.e. no threading) and also disabled auto garbage collection - without success.

I also tried a variety of other NSAppleScript sample. Whatever I try, my debugger always ends up with a EXC_BAD_ACCESS.

The precise error message in the status bar of the debugger is:

GDB: Program received signal: "EXC_BAD_ACCESS".

I'm running XCode 3.1 under Leopard 10.5.4.

Any thoughts what's going wrong here? Is this a known problem?

Any help is greatly appreciated!

Thanks
-Alex
_______________________________________________

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: NSAppleScript - compileAndReturnError always breaks with EXC_BAD_ACCESS
      • From: Alex Wied <email@hidden>
  • Prev by Date: Capture Window/View created through NSTask
  • Next by Date: Re: Guidelines for Cocoa frameworks supporting garbage collection?
  • Previous by thread: Re: Capture Window/View created through NSTask
  • Next by thread: Re: NSAppleScript - compileAndReturnError always breaks with EXC_BAD_ACCESS
  • Index(es):
    • Date
    • Thread