问题
How to find where exactly did -[NSNull length]: unrecognized selector sent to instance happen i mean the line number.
回答1:
Try putting a All Exception Breakpoint by:
1) Opening the left hand side panel (project navigator)
2) Click on the Breakpoints tab in the project navigator (it's the small icon next to the speech bubble)
3) Click the "+" sign on the bottom left of Xcode and choose Add Exception Breakpoint. It should default to All Exception.
4) Run your program again and try to make it crash like you normally do.
Hopefully this will catch it before it crashes. If it did, it'll take you straight to the crashing line in your Xcode coding area.
来源:https://stackoverflow.com/questions/24738421/nsnull-length-unrecognized-selector-sent-to-instance