Re: stack/table overflows on storing complex scripts
Re: stack/table overflows on storing complex scripts
- Subject: Re: stack/table overflows on storing complex scripts
- From: Christopher Nebel <email@hidden>
- Date: Thu, 22 Aug 2002 13:11:28 -0700
On Thursday, August 22, 2002, at 05:18 AM, has wrote:
I don't think the "dereferencing" theory has much of a leg to stand
on, as the point of storing to disk is to preserve state, not to
change it. Still, you may have something here, in that you can't very
well preserve memory pointers when transferring the object to file;
they'd have to be turned into some other kind of reference. So maybe
there's a recursive routine in AS somewhere responsible for this job,
and it's this that pitches over when it blows the call stack.
Of course, I'm making this up as well. Sounds like we really need a
responsible adult (<cough>Chris N.</cough>:) to step in here before us
kids start injuring ourselves on the thing.
Sorry, I was largely ignoring this thread, so I'm missing most of the
context, but I think you're pretty much correct. AppleScript has its
own internal storage format for everything; in order to send an event
anywhere (e.g., to another application or a scripting addition like
"write"), it needs to turn that into Apple event, which means
duplicating the data in memory. If said data is sufficiently complex,
you could run out of stack space or memory.
Cyclical references are not a problem in AS. It handles them just
fine. [1]
Except that they can't be turned into Apple events -- you'll get a
stack overflow error if you try.
... No, it's something wicked and cruel and deeply devious, put there
by the hellish minions of Apple Corp to beat and torture us for our
ungodly sins. "I confess! I confess! I once had an impure thought
about a Dell box back around '97, but I'm sorry now!! Stop! Stop!
Ahhhh, no! Please don't hit me with that buffer overrun...
Nooooooooooo!"
Sins? Nah, we do it for fun! That's right, we sit around and dream up
ways to torture you. We even know you all by name and write specific
bugs *just for you*. They won't happen for anyone else -- tech support
always gets a good laugh over those. (I'm joking, of course, but I've
met people who seem to think this is true!)
--Chris Nebel
AppleScript Engineering
_______________________________________________
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.