Weird error

What is this?
When two objects run a script, one of them doesn’t work, and when one of them is deleted, it raises this error.

If you need the script, just say so.

You access an object that was ended before (the object mentioned in the second argument of addObject).

This is like talking to a corpse. The body is still there but the soul is gone ;).

This is a sign of unclear workflow. You should make sure this does not happen. You can do that by checking if the object is still alive (KX_GameObject.invalid) or much better try to find out why the object is not there in this situation.