Skip navigation.
 
mlRe: AppleScript - occasional crashes on Leopard
FROM : Mark Piccirelli
DATE : Tue Apr 22 21:53:28 2008

Is this a garbage-collected app? If so the crash is a known bug.

               -- Mark

On Apr 22, 2008, at 10:47 AM, Steve Cronin wrote:
> Folks;
>
> I've seen some inconsistent behavior on AppleScript running under 
> Leopard.
>
> Here's an example:
> ...
>     NSString *theScript =@"some valid dynamic script text"
>     NSDictionary *errorDict = [NSDictionary dictionary];
>     NSAppleScript *appleScriptObject = [[NSAppleScript alloc] 
> initWithSource:theScript];    
>     NSAppleEventDescriptor *eventDescriptor = [appleScriptObject 
> executeAndReturnError: &errorDict];
> ...
>
> will OCCASIONALLY crash at the NSAppleEventDescriptor specification:
>
> #0    0x932c3d5c in getDescDataType
> #1    0x932c7ab7 in aeCoerceDescInternal
> #2    0x932cc055 in AECoerceDesc
> #3    0x1d4a8150 in ComponentCoerceDesc
> #4    0x1d48cbec in ASCompile
> #5    0x903bacb8 in CallComponentFunction
> #6    0x1d487ae2 in AppleScriptComponent
> #7    0x1d4a3927 in AGenericManager::HandleOSACall
> #8    0x903755cd in CallComponentDispatch
> #9    0x953fc513 in OSACompile
> #10    0x93e6edaf in -[NSAppleScript compileAndReturnError:]
> #11    0x93e6f096 in -[NSAppleScript(NSPrivate) 
> _executeWithMode:andReturnError:]
> #12    0x93e6ee51 in -[NSAppleScript executeAndReturnError:]
>
> Is there a new/better means in Leopard of accomplishing the 
> execution of dynamic scripts?
> NO the crash is NOT related to the validity of the script, of this I 
> am absolutely certain!  (It only crashes sometimes using the same 
> resulting script!!)
> Is a dual processor Intel creating a risk here?
> Is there something better I can do to handle the error?
> Why should I have to use a @try block here?
> I thought that was what the executeAndReturnError  parameter was 
> for!!  But I don't get a chance to examine the errorDict.
>
> It will crash only every so often....
> My hunch is that crashes are more likely when machine is under load 
> and memory swapping might be involved.
> This is running on a 4G MacBook...
>
> Any wisdom appreciated!
> Steve
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>

Related mailsAuthorDate
mlAppleScript - occasional crashes on Leopard Steve Cronin Apr 22, 19:47
mlRe: AppleScript - occasional crashes on Leopard Nick Zitzmann Apr 22, 20:10
mlRe: AppleScript - occasional crashes on Leopard Steve Cronin Apr 22, 20:31
mlRe: AppleScript - occasional crashes on Leopard Michael Watson Apr 22, 20:31
mlRe: AppleScript - occasional crashes on Leopard Michael Watson Apr 22, 21:01
mlRe: AppleScript - occasional crashes on Leopard Bill Cheeseman Apr 22, 21:19
mlRe: AppleScript - occasional crashes on Leopard Mark Piccirelli Apr 22, 21:53
mlRe: AppleScript - occasional crashes on Leopard Michael Watson Apr 22, 22:01
mlRe: AppleScript - occasional crashes on Leopard Mark Piccirelli Apr 22, 22:16
mlRe: AppleScript - occasional crashes on Leopard Steve Cronin Apr 22, 22:17