In the past few weeks, I have spent quite some time working on an iPhone application for a client. It is a port of a J2ME project, and a rather big one at that. Since I've only been working on some parts of the application, I wasn't really interested in using my time to fix all the compile warnings that I encountered and tried to concentrate only on the features that I had to add.
From time to time the application would crash with error messages such as this one:
2009-01-29 13:32:56.306 Debugging[28349:20b] -[NSCFString doSomething]: unrecognized selector sent to instance 0x3030
2009-01-29 13:32:56.307 Debugging[28349:20b] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString doSomething]: unrecognized selector sent to instance 0x3030'
It is usually rather difficult to trace the origin of this exception using the debugger. You can of course try to search your code for the name of the selector in question, or you can look through your compiler warnings. In a fairly large project, however, the right spot in your code may not be easy to find. Read More