我正在使用 Flurry 跟踪我的 iPhone 应用程序的统计信息,最近我看到了几个非常奇怪的错误。看似随机的对象正在接收“numberOfSectionsInTableView”消息,我不知道如何/为什么。该应用程序是使用 4.2.1 SDK 构建的,面向 iOS 4.0 设备。以下是一些示例的片段:
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
我只在我常用的 UITableView 委托方法中指定 numberOfSectionsInTableView,而不是直接调用它。我发现直接调用此方法的唯一代码在 ASIHTTPRequest 库中:
if (section == [self numberOfSectionsInTableView:aTableView]-1) {
return 30;
}
return 0;
但这是在“ASIAuthenticationDialog.m”中,我没有将身份验证与 ASIHTTPRequest 一起使用。
有没有人见过这样的事情?我对任何和所有建议持开放态度,在这里很困惑,到目前为止无法重现它。
谢谢。