1

I added an index search to a core data backed UITableView. the search works fine, however after navigating back to the tableView I get this error:

-[NSSQLRow controllerDidChangeContent:]: unrecognized selector sent to instance 0x815edf0

I can post more code if this is too little information to go on.

thanks for any help

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
hanumanDev
  • 6,592
  • 11
  • 82
  • 146
  • Possible duplicate of [How can I debug 'unrecognized selector sent to instance' error](https://stackoverflow.com/questions/25853947/how-can-i-debug-unrecognized-selector-sent-to-instance-error) – Cœur Jul 08 '19 at 05:50

1 Answers1

4

In Xcode (3), enable:

Run > Stop on Objective-C Exceptions

run your program in Debug.

Ultimately what is happening is an (objc) object is requested to perform a message which it does not respond to (i.e. is not implemented).

Typically, this happens as a programmer's mistake (at least, for me), such as an argument passed as another type, which slips through a cast, id, or objc_object container (e.g. any collection class - NSArray, NSSet, NSDictionary).

Sometimes this happens if you forget to implement the instance method.

Sometimes this happens if you are testing against an earlier release of the software, which did not implement the instance method (i.e. it was added in a following release).

justin
  • 104,054
  • 14
  • 179
  • 226
  • thanks for your reply. after Run > Stop on Objective-C Exceptions I get the following error : -[NSSQLRow controllerDidChangeContent:]: unrecognized selector sent to instance 0x6d6e190 I'll see if I can find what exactly is causing this error. – hanumanDev Sep 05 '10 at 07:08
  • 11
    if you type in `po 0x6d6e190` (the actual address will change) into the debugger, it will tell you what object is being sent the wrong selector. If you scroll down in the debugger stack it will show you the line of your code causing the error. – TechZen Sep 05 '10 at 11:56