Re: Out of Memory
Re: Out of Memory
- Subject: Re: Out of Memory
- From: "Jason W. Bruce" <email@hidden>
- Date: Tue, 13 Feb 2001 11:30:54 +0000
Have you tried increasing the memory of PreFab Player? That might help. In
addition, AppleScript can develop a memory leak when manipulating lists
extensively. In your dostuff handler, are you concatenating lists (set
xlist to xlist & foobar) -- which generates multiple copies of xlist in
memory and can lead to a memory leak, or are you adding to the end of them
(set end of xlist to foobar) -- which is the recommended method?
Jason Bruce
>
Message: 11
>
Date: Mon, 12 Feb 2001 17:18:38 -0600 (CST)
>
From: Gerry Brush <email@hidden>
>
Reply-To: Gerry Brush <email@hidden>
>
Subject: Out of Memory
>
To: email@hidden
>
>
I'm getting an Out of Memory error, "PreFab Player got an error: Out of
>
Memory.", with a script that uses PreFab Player to manipulate an application
>
called Genotyper (Genotyper is not scriptable for what I need to do).
>
>
The structure of the script is something like:
>
>
on dostuff(xlist)
>
tell application "Genotyper" to activate
>
tell application "PreFab Player"
>
repeat with i in xlist
>
--do stuff
>
end repeat
>
end tell
>
end dostuff
>
>
-- run dostuff 156 times with 156 different lists
>
dostuff({...}) -- list 1
>
dostuff({...}) -- list 2
>
...
>
dostuff({...}) -- list 156
>
>
>
>
I get the out of memory error at the same place each time, in the 27th call to
>
dostuff(). In case there is something wrong with the 27th list, I ran
>
dostuff() repeatedly with list 1 as its only argument, and again it runs out
>
of
>
memory.
>
>
I've doubled the memory allocated to Genotyper to 50 Mb but the script again
>
stops at the same place. I've also increased the memory of the script and
>
again
>
it stops at the same place. Have even inserted script commands to tell
>
Genotyper to Quit and Save after every 5 successive calls to dostuff() but
>
again
>
it fails on the 27th call. Have just now split the script file into several
>
files, each calling dostuff only about 8 times, and running them manually.
>
After each script ends, I save the results in Genotyper, quit Script Editor
>
and
>
open and run the next script. Again on the 27th list PreFab Player got the
>
out
>
of memory error.
>
>
I'd be grateful for any help on how to get past this memory problem?
>
>
Thanks.
>
>
Gerry Brush