Re: OSA script error
Re: OSA script error
- Subject: Re: OSA script error
- From: Stan Cleveland <email@hidden>
- Date: Mon, 11 Sep 2006 12:07:35 -0700
- Thread-topic: OSA script error
Title: Re: OSA script error
On 9/10/06 11:06 PM, Jay Louvion wrote:
Well I really don’t know what to think. When saved as a simple app (as it had been), there is obviously no content such as described in your message; so I followed the suggestion and saved my script as an app bundle, changed the perms on the aforementionned file and... It returned me the error “Out of memory” (the precise one I had tried to get rid of in the first place) just before the end of the operation and even better, instead of an english OSA script error, I now get the Klingon version.
When Script Debugger 4 was first released, I experienced memory errors with a script that had previously seemed fine. It contained just over 2000 lines of code. I filed a bug report with Late Night Software and got a helpful response from Mark Alldritt, passed on below. (Surely Mark won't mind.)
Perhaps your problem may be similar, if your script contains many style runs, as he describes. Some of what he mentions is specific to Script Debugger, but the overall problem is AppleScript’s—not Debugger’s—and could occur regardless of which script editor you are using. Personally, I prefer an error message to a silent failure.
--Stan C.
On 3/11/06 10:14 AM, Mark Alldritt wrote:
> Hello,
>
> AppleScript has a limit on the length of script it can display. The length
> is determined by the number of style runs in the source code. In the past,
> AppleScript would fail silently when this limit was reached, and slowly
> corrupt memory.
>
> As of 10.2 and later, AppleScript began issuing out of memory errors, and now
> this size check error. Enabling debugging in Script Debugger 3 or 4 makes
> this worse because Script Debugger introduces hidden code into your script
> in order to facilitate step-wise execution. This effectively shortens the
> maximum size for scripts.
>
> I think you'll have to break your script up into a series of separate
> scripts that are loaded into the main script. Script Debugger offers its
> Libraries feature for this, and then there is the AppleScript load script
> command. The downside of this is that SD cannot debug into loaded code.
>
> Cheers
> -Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden