This blog will be updated from time to time, I will be in the project to organize the breakdown of common crashes after sharing to everyone:
1.unrecognized Seletor. Error: This is a simple situation where a message is sent to an object that it does not know. For example, your. h declares a method, but there is no implementation in. m, and you do not have the Exception message processing (message forwarding) to cause this behavior. WORKAROUND: First troubleshoot whether some of your own methods are implemented, and then see which objects receive messages that they should not receive.
2.index 1 Beyond Nsarramu [0,0] array out of bounds: array out of bounds that's not much to say.
3.NSNul length This exception can be categorized as the first and an unrecognized message is sent to an object. Common reasons are: The text is set to the Uilabel object, the text content is empty string null, and then you take the length of text to throw an exception.
4.exc_bad_access Exceptions: Most of this is an error that the object is released early and accesses the wild pointer. WORKAROUND: Troubleshoot all claims that are declared as weak objects, whether you have accessed the object again without holding it (the object has been disposed), and second in the MRC case, troubleshoot the object that has already been released (declare a point, The global variables in the MRC are best released in the Dealloc method, and the third is to check all blocks, whether the block is properly assigned, and so on.
5. Crash in the main function. This is the hardest and hardest to find the bug, in which case the main function is wrapped with @try @catch, which throws the exception stack information, or by adding a global breakpoint to track the bug.
Welcome to iOS Technology group: Love Crazy, Love coding group number: 209476515
Common crash scenarios for iOS and bug debug workarounds