Two days ago I started getting catastrophic crashes on my Mac that made
Director simply vanish from my screen with a Type 2 error*. After
placing debugging commands that wrote out to a text file (so I could
read it after the crash). I tracked it down to a single line. This line
would execute fine any number of times, and then for no apparent reason,
would fail and take Director with it. Sometimes the whole machine.
Sometimes the machine would hang a couple minutes later.

The line was something very like:
 sprite(29 + x).setprops(foo, bar, rabnicky)

('setprops' is a handler in one of the behaviours attached to the sprite)
even when crashing, the values for foo, bar and rabnicky were always valid.

It was suggested that calling a handler that way, while it works most of
the time, is not actually supported and that 'call' or 'sendsprite' are
the ways to go. (thanks Dan S.)

now I use:
sendsprite(29 + x,#setprops,foo, bar, rabnicky)

and there are no more crashes.

There you go, FWIW.


* a type 2 is when a program tries to access a word of memory starting
at an odd address. It only works from even ones.

-- 
Carl West    [EMAIL PROTECTED]
617.262.8830 x246    

"Depend upon it, there comes a time when, for every addition of
knowledge, you forget something that you knew before. It is of the
highest importance, therefore, not to have useless facts elbowing out
the useful ones."
              -Sherlock Holmes in 'A Study in Scarlet'

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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