EXC_BAD_ACCESS
This exception is usually caused by the previous error code and won't be interrupted immediately, but is caused by exceptions of other normal running codes, so it is difficult to debug. Common causes include:
Release double release. A released pointer is released again. The check method is to set the NSZombieEnabled variable for Executable. In this way, when a pointer that has expired is released, the program is automatically interrupted. Remember to remove this variable after finding the problem.
The writable string forgets a @, leading to the wrong memory space.
This problem also occurs when the distinct [NSString stringWithFormat:] method writes less than one parameter.
NSUnknownKeyException
The program exits due to the following exceptions:
* ** Terminating app due to uncaught exception 'nsunknownkeyexception', reason: '[<PAPrepaidViewController 0x1d978280> setValue: forUndefinedKey:]: this class is not key value coding-compliant for the key purcahseResultLabel.'
Cause: there is a problem with the association between xib and ViewController. The outlet may be changed but xib is not updated, resulting in invalid outlet. For example, in the above example, the message is: purcahseResultLabel has a problem.
From the column hufeng825