Can anybody elaborate on this for me:
How can an effect be deleted out from under the script, and how do you check for it? I already have so much sanity checking in place it's not funny. My "X" is RegisterForAnimationEvent(), in the OnEffectStart block of a magic effect, and it happens so rarely and intermittently it's been impossible to test well.
An effect is deleted the very next frame it is no longer required to be active. Papyrus tends to not be fast enough to keep up with that and may attempt to run the script attached to that effect after the effect has been removed from existence (the effect is gone, but the script attached to it is still in the VM). This will result in a large number of Null Pointer related errors because all of the non-persistent data the script needed to function got dumped from memory, despite the fact the script still needed the data (the game is dumb like that).
That's what is meant by the effect being "deleted out from under the script." Papyrus is occasionally too slow and won't run the OnEffectFinish() event in time, so when it does get fired, the effect is already gone and data the script needed was lost with it.