开发者社区> 问答> 正文

ios 开发时 只要UITextField 获得焦点就异常退出,大神来解决下。

xcode 7.0.1 6s模拟器上能正常运行、6s以下都崩溃
2015-10-17 14:30:55.741 *[34984:476153] -[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x7ac5aab0
2015-10-17 14:30:55.746 [34984:476153] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x7ac5aab0'
* First throw call stack:

 (
 0   CoreFoundation                      0x03be7746 __exceptionPreprocess + 182
 1   libobjc.A.dylib                     0x03199a97 objc_exception_throw + 44
 2   CoreFoundation                      0x03bef705 -[NSObject(NSObject) doesNotRecognizeSelector:] + 277
 3   CoreFoundation                      0x03b36287 ___forwarding___ + 1047
 4   CoreFoundation                      0x03b35e4e _CF_forwarding_prep_0 + 14
 5   CoreFoundation                      0x03abba5c CFArrayGetValueAtIndex + 188
 6   CoreFoundation                      0x03b579dd CFStringTokenizerCreate + 749
 7   UIKit                               0x0248853e __91-[_UITextInputControllerTokenizer _getClosestTokenRangeForPosition:granularity:downstream:]_block_invoke44 + 264
 8   UIFoundation                        0x088a56d3 -[NSTextStorage coordinateReading:] + 51
 9   UIKit                               0x024881c9 -[_UITextInputControllerTokenizer _getClosestTokenRangeForPosition:granularity:downstream:] + 276
 10  UIKit                               0x020fe6e7 -[UITextInputStringTokenizer positionFromPosition:toBoundary:inDirection:] + 93
 11  UIKit                               0x020fef1d -[TIDocumentState(UITextInputAdditions) _contextBeforePosition:inDocument:] + 81
 12  UIKit                               0x020ff073 -[TIDocumentState(UITextInputAdditions) initWithDocument:] + 125
 13  UIKit                               0x020feadf +[TIDocumentState(UITextInputAdditions) documentStateOfDocument:] + 63
 14  UIKit                               0x01e6378b -[UIKeyboardImpl syncDocumentStateToInputDelegateWithExecutionContext:] + 298
 15  UIKit                               0x01e642a7 -[UIKeyboardImpl updateForChangedSelectionWithExecutionContext:] + 326
 16  UIKit                               0x01e5d7dd __36-[UIKeyboardImpl setDelegate:force:]_block_invoke + 43
 17  UIKit                               0x02489222 -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 404
 18  UIKit                               0x024898df -[UIKeyboardTaskQueue addTask:] + 144
 19  UIKit                               0x01e5d7aa -[UIKeyboardImpl setDelegate:force:] + 2873
 20  UIKit                               0x01e5cc6c -[UIKeyboardImpl setDelegate:] + 60
 21  UIKit                               0x0216c1f9 -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:] + 1140
 22  UIKit                               0x01dd82f7 -[UIResponder(UIResponderInputViewAdditions) reloadInputViews] + 364
 23  UIKit                               0x024547c1 -[UITextField __resumeBecomeFirstResponder] + 71
 24  UIKit                               0x01f8e8ef __45-[UISearchBarTextField _becomeFirstResponder]_block_invoke + 366
 25  UIKit                               0x01f8e77f -[UISearchBarTextField _becomeFirstResponder] + 465
 26  UIKit                               0x01dd7282 -[UIResponder becomeFirstResponder] + 392
 27  UIKit                               0x01c962f8 -[UIView(Hierarchy) becomeFirstResponder] + 114
 28  UIKit                               0x02454267 -[UITextField becomeFirstResponder] + 51
 29  UIKit                               0x0205d678 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary] + 200
 30  UIKit                               0x0205fca6 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) oneFingerTap:] + 2762
 31  UIKit                               0x020534f7 _UIGestureRecognizerSendActions + 327
 32  UIKit                               0x02051d74 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 561
 33  UIKit                               0x02053dbd -[UIGestureRecognizer _delayedUpdateGesture] + 60
 34  UIKit                               0x0205773a ___UIGestureRecognizerUpdate_block_invoke661 + 57
 35  UIKit                               0x020575fd _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 317
 36  UIKit                               0x0204b506 _UIGestureRecognizerUpdate + 3720
 37  UIKit                               0x01c6b90b -[UIWindow _sendGesturesForEvent:] + 1356
 38  UIKit                               0x01c6c770 -[UIWindow sendEvent:] + 770
 39  UIKit                               0x01c2a681 -[UIApplication sendEvent:] + 242
 40  UIKit                               0x01c3aab8 _UIApplicationHandleEventFromQueueEvent + 21484
 41  UIKit                               0x01c0e2e7 _UIApplicationHandleEventQueue + 2300
 42  CoreFoundation                      0x03b0906f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
 43  CoreFoundation                      0x03afeb7d __CFRunLoopDoSources0 + 253
 44  CoreFoundation                      0x03afe0d8 __CFRunLoopRun + 952
 45  CoreFoundation                      0x03afda5b CFRunLoopRunSpecific + 443
 46  CoreFoundation                      0x03afd88b CFRunLoopRunInMode + 123
 47  GraphicsServices                    0x0649e2c9 GSEventRunModal + 192
 48  GraphicsServices                    0x0649e106 GSEventRun + 104
 49  UIKit                               0x01c120b6 UIApplicationMain + 1526
 50  公交行                           0x0008531a main + 138
 51  libdyld.dylib                       0x04187ac9 start + 1
 52  ???                                 0x00000001 0x0 + 1
 )
 libc++abi.dylib: terminating with uncaught exception of type NSException

展开
收起
杨冬芳 2016-06-27 14:45:31 4078 0
1 条回答
写回答
取消 提交回答
  • zfd

    同学,这个问题你解决没?

    2019-07-17 19:47:37
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
手淘iOS性能优化探索 立即下载
From Java/Android to Swift iOS 立即下载
深入剖析iOS性能优化 立即下载