-[NSXPCConnection sendInvocation]当UITextField成为FirstResponder时,iOS 14崩溃

问题描述

崩溃仅发生在iOS 14上。

这是控制台上的崩溃说明:

Terminating app due to uncaught exception 'NSinvalidargumentexception',reason: '[nsxpcconnection sendInvocation]: A NULL reply block was passed into a message meant to be sent over a connection. (syncToKeyboardState:completionHandler:)'

调用堆栈:

0   CoreFoundation                      0x000000011404a126 __exceptionPreprocess + 242
1   libobjc.A.dylib                     0x00007fff20145f78 objc_exception_throw + 48
2   Foundation                          0x000000010fbf4729 -[nsxpcconnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 3854
3   Foundation                          0x000000010fbf3600 -[nsxpcconnection _sendSelector:withProxy:arg1:arg2:] + 135
4   Foundation                          0x000000010fc08100 _NSxpcdistantObjectSimpleMessageSend2 + 33
5   CoreFoundation                      0x000000011405092c __invoking___ + 140
6   CoreFoundation                      0x000000011404dde6 -[NSInvocation invoke] + 303
7   CoreFoundation                      0x000000011404e077 -[NSInvocation invokeWithTarget:] + 70
8   TextInput                           0x00000001291c6f7a -[TIKeyboardInputManagerClient handleRequest:] + 246
9   TextInput                           0x00000001291c6e42 -[TIKeyboardInputManagerClient forwardInvocation:] + 124
10  CoreFoundation                      0x000000011404e3f0 ___forwarding___ + 859
11  CoreFoundation                      0x0000000114050698 _CF_forwarding_prep_0 + 120
12  CoreFoundation                      0x000000011405092c __invoking___ + 140
13  CoreFoundation                      0x000000011404dde6 -[NSInvocation invoke] + 303
14  CoreFoundation                      0x000000011404e077 -[NSInvocation invokeWithTarget:] + 70
15  TextInputUI                         0x000000015551db12 -[TUIKeyboardInputManagerMux forwardInvocation:] + 81
16  CoreFoundation                      0x000000011404e3f0 ___forwarding___ + 859
17  CoreFoundation                      0x0000000114050698 _CF_forwarding_prep_0 + 120
18  TextInputUI                         0x0000000155534849 -[TUIKeyboardBackendController syncToKeyboardState:completionHandler:] + 95
19  UIKitCore                           0x00000001267a0110 -[UIKeyboardImpl syncInputManagerToKeyboardStateWithExecutionContext:] + 272
20  UIKitCore                           0x000000012679f6e5 __64-[UIKeyboardImpl updateForChangedSelectionWithExecutionContext:]_block_invoke_2 + 127
21  UIKitCore                           0x00000001267d1c11 -[UIKeyboardTaskExecutionContext returnExecutionToParentWithInfo:] + 109
22  UIKitCore                           0x000000012679f644 -[UIKeyboardImpl updateForChangedSelectionWithExecutionContext:] + 526
23  UIKitCore                           0x00000001267d3455 -[UIKeyboardTaskEntry execute:] + 147
24  UIKitCore                           0x00000001267d20e9 -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 310
25  UIKitCore                           0x0000000126792cdd -[UIKeyboardImpl setDelegate:force:] + 4514
26  UIKitCore                           0x00000001263fa6a8 -[UIInputResponderController _reloadInputViewsForKeyWindowSceneResponder:] + 2536
27  UIKitCore                           0x00000001263f9ca3 -[UIInputResponderController _reloadInputViewsForResponder:] + 148
28  UIKitCore                           0x00000001269fd9b5 -[UIResponder(UIResponderInputViewAdditions) reloadInputViews] + 133
29  UIKitCore                           0x00000001269f8ccc -[UIResponder becomeFirstResponder] + 806
30  UIKitCore                           0x0000000126f0b565 -[UIView(Hierarchy) becomeFirstResponder] + 145
31  UIKitCore                           0x0000000126d05584 -[UITextField becomeFirstResponder] + 182
32  UIKitCore                           0x0000000126caf4ef -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessaryActivatingSelection:] + 192
33  UIKitCore                           0x0000000126c8b27e -[UITextSelectionInteraction _checkForRepeatedTap:gestureLocationOut:] + 273
34  UIKitCore                           0x0000000126c8be7f -[UITextSelectionInteraction _handleMultiTapGesture:] + 1093
35  UIKitCore                           0x00000001269cb0af -[UIApplication sendAction:to:from:forEvent:] + 83
36  UIKitCore                           0x000000012645e3cc -[UITextMultiTapRecognizer onStateUpdate:] + 169
37  UIKitCore                           0x00000001264ffee7 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 49
38  UIKitCore                           0x000000012650a168 _UIGestureRecognizerSendTargetActions + 100
39  UIKitCore                           0x0000000126506a2f _UIGestureRecognizerSendActions + 294
40  UIKitCore                           0x0000000126505d8e -[UIGestureRecognizer _updateGestureForActiveEvents] + 725
41  UIKitCore                           0x00000001264f8352 _UIGestureEnvironmentUpdate + 2652
42  UIKitCore                           0x00000001264f747a -[UIGestureEnvironment _updateForEvent:window:] + 887
43  UIKitCore                           0x0000000126a0982d -[UIWindow sendEvent:] + 4752
44  UIKitCore                           0x00000001269e3376 -[UIApplication sendEvent:] + 633
45  UIKitCore                           0x0000000126a738d6 __processEventQueue + 13895
46  UIKitCore                           0x0000000126a6a26c __eventFetcherSourceCallback + 104
47  CoreFoundation                      0x0000000113fb8845 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
48  CoreFoundation                      0x0000000113fb873d __CFRunLoopDoSource0 + 180
49  CoreFoundation                      0x0000000113fb7c1f __CFRunLoopDoSources0 + 248
50  CoreFoundation                      0x0000000113fb23f7 __CFRunLoopRun + 878
51  CoreFoundation                      0x0000000113fb1b9e CFRunLoopRunSpecific + 567
52  GraphicsServices                    0x000000011912bdb3 GSEventRunModal + 139
53  UIKitCore                           0x00000001269c4af3 -[UIApplication _run] + 912
54  UIKitCore                           0x00000001269c9a04 UIApplicationMain + 101
55  JDCashierModule_Example             0x0000000108374880 main + 112
56  libdyld.dylib                       0x00007fff20225415 start + 1
57  ???                                 0x0000000000000001 0x0 + 1

有人遇到过这个吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)