Null pointers, and other errors