Re: Applescript Stack Overflow???
Re: Applescript Stack Overflow???
- Subject: Re: Applescript Stack Overflow???
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 29 Jul 2002 12:37:52 -0700
Hi, Ramona
You will get a stack overflow in any script where you make a list (at least,
make it using certain methods) where the number of items is somewhere around
4600 - i forget the actual number (maybe it's 4060, but it's over 4000).
It's an Applescript memory issue, nothing to do with the OS. Do you possibly
have over 4000 messages in your Outbox? 4000+?
It's possible that you get a similar error if the 'whose' clause is worked
too hard, even where the number of messages is a lot lower. That used to
happen to me in Outlook Express. In this case, it would be affected by how
much memory is available to Entourage, which is affected by how many other
processes are running at the time. During the night, there are some Unix
clean-up schedules that run - I don't know how much memory they take,
probably not much. You may have some open app that is leaking memory. Do you
have Classic running? That can take a lot. The script itself may require a
lot of memory for the 'whose' operation, but you must have something on your
computer open and draining memory. There are people here you can tell you
how to track it down - I'm not proficient there.
If you really have 4000+ emails in your outbox, write back and I'll show you
how to do them in chunks.
--
Paul Berkowitz
>
From: email@hidden
>
Date: Mon, 29 Jul 2002 14:50:49 EDT
>
To: email@hidden
>
Subject: Applescript Stack Overflow???
>
>
Hello again, Applescripters. About a month ago I wrote a script (well . . .
>
I "wrote" it with enormous help from Paul Berkowit, thanks again Paul!) that
>
send mail from Entourage in chunks. I don't know if the function of the
>
script has anything to do with anything, because I'm not aware that it's the
>
problem, but here it is in case:
>
>
set max to 100
>
set n to 125
>
tell application "Microsoft Entourage"
>
set allMessages to (every message in out box folder)
>
try
>
with timeout of 30 seconds
>
set n to count allMessages
>
end timeout
>
end try
>
if n < max then
>
send
>
set enabled of schedule "SendinChunks" to false
>
else
>
set cutOff to time sent of message max of out box folder
>
send (every message in out box folder whose time sent b $ cutOff)
>
end if
>
end tell
>
>
I used this script as a repeating schedule in Entourage, which worked
>
extremely nicely for a number of weeks. However, in the middle of the night
>
last night it gave me this error:
>
>
"Could not read the file because of an Applescript Stack Overflow."
>
>
After browsing a bit in the help/discussion areas of Apple's website, it's
>
suggested that this is a memory error. However, I'm running in OS X and have
>
gobs of memory, so I can't really reassign RAM nor do I really think that
>
should be happening. Again, it didn't happen for a few weeks, and I've not
>
(intentionally or to my current knowledge) changed anything about the setup.
>
I also wasn't running a large number of applications at the time.
>
>
After this happened I just rebooted and started the thing back up, and now it
>
seems to be working fine again (with the same number of Outgoing messages).
>
However, I'd still like not to experience this again. Anyone have any tips
>
as to what I did to cause this or what I can do to avoid it in the future?
>
>
Thanks! Robin
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.