- [_ NSObserverList setCursorPosition:]

问题描述 投票:16回答:1

我收到#560 NSInvalidArgumentException错误,如下所示;

-[_NSObserverList setCursorPosition:]: unrecognized selector sent to instance 0x1702a6ea0

CoreFoundation ___exceptionPreprocess

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x1854f21c0 __exceptionPreprocess
1  libobjc.A.dylib                0x183f2c55c objc_exception_throw
2  CoreFoundation                 0x1854f9278 __methodDescriptionForSelector
3  CoreFoundation                 0x1854f6278 ___forwarding___
4  CoreFoundation                 0x1853f059c _CF_forwarding_prep_0
5  UIKit                          0x18b830418 -[_UIKeyboardTextSelectionController selectTextWithGranularity:atPoint:executionContext:]
6  UIKit                          0x18b8304b0 -[_UIKeyboardTextSelectionController selectTextWithGranularity:atPoint:completionHandler:]
7  UIKit                          0x18b895928 -[_UIKeyboardBasedNonEditableTextSelectionGestureController oneFingerForcePan:]
8  UIKit                          0x18b91b59c -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:]
9  UIKit                          0x18b91eca4 _UIGestureRecognizerSendTargetActions
10 UIKit                          0x18b4e02e8 _UIGestureRecognizerSendActions
11 UIKit                          0x18b37e828 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:]
12 UIKit                          0x18b90ece8 _UIGestureEnvironmentUpdate
13 CoreFoundation                 0x18549f7dc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
14 CoreFoundation                 0x18549d40c __CFRunLoopDoObservers
15 CoreFoundation                 0x18549d89c __CFRunLoopRun
16 CoreFoundation                 0x1853cc048 CFRunLoopRunSpecific
17 GraphicsServices               0x186e52198 GSEventRunModal
18 UIKit                          0x18b3b82fc -[UIApplication _run]
19 UIKit                          0x18b3b3034 UIApplicationMain
20 MyAppName                      0x100050054 main (main.m:16)
21 libdispatch.dylib              0x1843b05b8 (Missing)

任何人都可以建议我可能是什么问题?

ios objective-c exception uikeyboard unrecognized-selector
1个回答
0
投票

这种NSInvalidArgumentException,特别是因为它在私有类上,可能是由于一个Zombie对象。您正在向一个不再存在的对象发送消息“setCursorPosition:”,但另一个对象就在其中。在本例中为“_NSObserverList”。

尝试使用“Zombie Objects”诊断对象运行,以追踪哪个对象应该接收该消息但已消失。该选项在释放时将对象保留在内存中,但标记为僵尸。

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.