Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Out of memory??



On 4/12/06 3:51 AM, Peter Waibel wrote:

> Well, I had simmilar problems.
> I never figured out what the reason was.
> 
> On OS 9 I got the out of memory message with some scripts latger than
> 5000 lines of code.
> After moving the scripts to OS X the same message appeared at about
> 6000 lines.
> 
> Usually those scripts run successfully in the Script Debugger but
> failed when saved as an application.
> 
> Now I divide my larger scripts in several libraries and load those
> libraries from the main script.
> 
> This works for me, but I really would like to know where the barriers
> are!
> 
> Peter


Memory problems arose for me when I upgraded from Script Debugger 3.0.9 to
4.0. Editing a script that seemed fine in Debugger 3 generated a
memory-related error when trying to compile it in Debugger 4:
    "Cannot Compile Script. Size Check failed (memSCErr:-116)").

So I filed a bug report with Late Night Software and got a helpful response
from Mark Alldritt, passed on below. (I imagine that Mark won't mind.)

--Stan Cleveland


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 of 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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden

References: 
 >Re: Out of memory?? (From: Peter Waibel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.