These errors occur when your program tries to access the memory location of an object that no longer exists, an object which at some earlier point in the application's lifetime has had its memory released back into the heap.
If you can track down which variable is being accessed at the time of the crash, through the use of judicious comments or, better still, a debugger, then you will have a potentially easier time fixing the bugs.
In the meantime, re-read Apple's excellent Memory Management guide, which goes into memory management issues in greater detail than can fit into this comment field.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…