I'm using Flurry to track stats of my iPhone app, and lately I've been seeing several REALLY weird errors. Seemingly random objects are receiving a "numberOfSectionsInTableView" message, and I have no idea how/why. The app was built using the 4.2.1 SDK and targeted for iOS 4.0 devices. Here is a snippet of some examples:
NSInvalidArgumentException: -[NSCFString numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x4f3de10
NSInvalidArgumentException: -[__NSCFData numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x4f55bc0
NSInvalidArgumentException: -[NSPathStore2 numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x4f5ebc0
NSInvalidArgumentException: -[__NSCFType numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x2ac5f0
NSInvalidArgumentException: -[PLPhoto numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x2fbc30
NSInvalidArgumentException: -[PLPhotoLibrary numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x725ea20
I'm only specifying numberOfSectionsInTableView in my usual UITableView delegate methods, not calling it directly. The only code I found that calls this method directly was in the ASIHTTPRequest library:
if (section == [self numberOfSectionsInTableView:aTableView]-1) {
return 30;
}
return 0;
But this was in "ASIAuthenticationDialog.m" and I'm not using auth with ASIHTTPRequest.
Has anyone seen anything like this before? I'm open to any and all suggestions, pretty stumped here, and unable to reproduce it so far.
Thanks.
Sounds like a classic over-release problem. You have over-released an object and some other random object is being messaged instead.
Turn on zombie detection and try your test case again.