----- Original Message -----
From: "Daniel Plaenitz" <[EMAIL PROTECTED]>
>
> Even subtle details may matter here. Therefore, the above notation has to
> be corrected. Pranav's example
> (http://www.geocities.com/pranav_negandhi/freaky_chakra_2.jpg) reads:
>
> -- Welcome to Director --
> put value("")
> -- <Void>

Well, I don't think that's important. If you look at the way I reproduced
Pranav's original results, I typed my own code into an exitFrame handler and
ran it. It continually returned VOID. Then I saved it, closed it and opened
it again, with *no changes* either to the movie, my version of Director, or
my system - that time it gave 0's. I have not since been able to get it to
return VOID, but the *exact same code* gave different results at different
times with the exact same configuration.

A bug is one thing, but an intermittent bug is somewhat more worrying - it
suggests the bug is not related to the value function so much as the way the
reference to the static string value "" is handled, which could have wider
implications.

Most likely what we are seeing is a problem in the reference table where two
identical but separate strings are accidentally given the same reference, or
two strings with the same reference are incorrectly believed to be two
identical but separate strings. That could potentially lead to inexplicable
crashes that cannot be reproduced easily, as well as bugs like the one we
are seeing. I can't think of anything else that could cause it, other than
code with something really stupid in it, like:

if random(100)<2 then return "silly result"

I don't think that's likely though.

One thing that may be important is whether or not your code is the first
thing to ever refer to the static string "". That can be the difference
between a reference to an existing string, or the creation of a new one.
Because the value is static, there is nothing to say that Director is
creating a new string each time, it may simply be recycling references,
which is where the sort of bug I suspect may be causing this could creep in.
I suspect that saving the movies sorted out these static references, which
produced the differing results that I saw.

I'm going to try reproducing the result again later after a cold boot to see
if that makes a difference. There may be things hanging around in memory
that make a difference.

- Robert

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to