无法识别的选择器发送到实例

发布于 2024-10-19 21:18:35 字数 1637 浏览 7 评论 0原文

可能的重复:
发送到实例的选择器无法识别

谁能告诉我此错误代码中发生了什么?男人苹果很神秘。我刚刚通过 ObjectiveResource 调用了我知道没问题的数据。

-[NSDecimalNumber allKeys]: unrecognized selector sent to instance 0x5c671f0
2011-03-02 02:07:56.169 Mobile[13839:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSDecimalNumber allKeys]: unrecognized selector sent to instance 0x5c671f0'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x0133bbe9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x014905c2 objc_exception_throw + 47
    2   CoreFoundation                      0x0133d6fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    3   CoreFoundation                      0x012ad366 ___forwarding___ + 966
    4   CoreFoundation                      0x012acf22 _CF_forwarding_prep_0 + 50
    5   Mobile                      0x00013aa5 +[NSObject(JSONSerializableSupport) deserializeJSON:] + 832
    6   Mobile                      0x000138ad +[NSObject(JSONSerializableSupport) deserializeJSON:] + 328
    7   Mobile                      0x00012f0e +[NSObject(JSONSerializableSupport) fromJSONData:] + 161
    8   Mobile                      0x0000c8fa +[NSObject(ObjectiveResource) findAllRemoteWithResponse:] + 336
    9   Mobile                      0x0000c933 +[NSObject(ObjectiveResource) findAllRemote] + 43
    10  Mobile                      0x00004732 -[AllTableViewController refresh] + 103

Possible Duplicate:
Unrecognized selector sent to instance

Can anyone tell me what is going on in this error code? Man apple is cryptic. I have just made a call via ObjectiveResource to data I know is fine.

-[NSDecimalNumber allKeys]: unrecognized selector sent to instance 0x5c671f0
2011-03-02 02:07:56.169 Mobile[13839:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSDecimalNumber allKeys]: unrecognized selector sent to instance 0x5c671f0'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x0133bbe9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x014905c2 objc_exception_throw + 47
    2   CoreFoundation                      0x0133d6fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    3   CoreFoundation                      0x012ad366 ___forwarding___ + 966
    4   CoreFoundation                      0x012acf22 _CF_forwarding_prep_0 + 50
    5   Mobile                      0x00013aa5 +[NSObject(JSONSerializableSupport) deserializeJSON:] + 832
    6   Mobile                      0x000138ad +[NSObject(JSONSerializableSupport) deserializeJSON:] + 328
    7   Mobile                      0x00012f0e +[NSObject(JSONSerializableSupport) fromJSONData:] + 161
    8   Mobile                      0x0000c8fa +[NSObject(ObjectiveResource) findAllRemoteWithResponse:] + 336
    9   Mobile                      0x0000c933 +[NSObject(ObjectiveResource) findAllRemote] + 43
    10  Mobile                      0x00004732 -[AllTableViewController refresh] + 103

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

单挑你×的.吻 2024-10-26 21:18:35

正如其他人指出的那样,NSDecimalNumber 不响应 allKeys 选择器,从而导致崩溃。

发生这种情况可能是因为 NSDictionary 的实例(预期的消息响应者)由于某种原因(缺少保留?)而被过早释放,并且它在内存中的地址被获取错误消息的 NSDecimalNumber 实例占用。

因此,要解决该问题,请尝试找到该消息行并检查该代码中的内存管理是否一切正常。

As others pointed NSDecimalNumber does not respond to allKeys selector and that causes a crash.

That may happen because the instance of NSDictionary, the intended message responder was prematurely deallocated for some reason (lack of retain?) and its address in memory got occupied by NSDecimalNumber instance that gets that wrong message.

So to fix that problem try locating the line that message and check if everything is ok with memory management in that code.

月下伊人醉 2024-10-26 21:18:35

您在 NSDecimalNumber 上调用 allKeys 方法,并且 NSDecimalNumber 不能使用此方法,这就是您崩溃的原因。

使用 NSDictionaryNSMutableDictionary 调用 allKeys 方法。

因此,在获取此日志后输入 where ,您将在此处获得需要编辑代码的行号。

You calling allKeys method on NSDecimalNumber,and NSDecimalNumber can,t use this method thats why you having a crash.

allKeys method call with NSDictionary or NSMutableDictionary.

so type where after getting this log you get line number at there you need to edit the code.

扬花落满肩 2024-10-26 21:18:35

NSDecimalNumber 不支持 allKeys 方法。

NSDecimalNumber does not support the method allKeys.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文