Re: AppleScript - occasional crashes on Leopard
Re: AppleScript - occasional crashes on Leopard
- Subject: Re: AppleScript - occasional crashes on Leopard
- From: Steve Cronin <email@hidden>
- Date: Tue, 22 Apr 2008 15:17:24 -0500
Mark;
10 months after the first Leopard seed to developers,
6 months after commercial release, and
after 2 system updates to the commercial product,
the message to developers using ANY AppleScript in Cocoa is:
"No Garbage Collection for you!"
Perhaps you can try and understand how this might be potentially
irritating to some....
Turning off Garbage collection has profound impacts on the rest of the
code base NOT just AppleScript.
As I am sure you are aware, turning off Garbage Collection is WAY more
than a compiler switch!
For my ongoing better understanding of Cocoa, could you provide a link
to where I SHOULD have researched so that I would not end up in this
corner.
Politely,
Steve
On Apr 22, 2008, at 2:53 PM, Mark Piccirelli wrote:
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@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
_______________________________________________
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