我的一个应用程序仅在 iOS 14 真实设备上崩溃(模拟器工作得很好),UITextField
或者becomeFirstResponder
,即使触摸UISearchBar
文本区域也会导致崩溃。
仅在真实设备上发生(无模拟器)仅在操作系统键盘上发生。试过语法键盘。它工作正常。在 Xcode 11.* 版本上构建也会使应用程序在 iOS14 设备上崩溃尝试在不同的计算机上构建应用程序。不工作。尝试连接外接键盘。不工作
堆栈跟踪没有帮助。最后,我能够在控制台上打印此消息。
*** Assertion failure in -[UIKBCacheToken stringForConstruction:], UIKBCacheToken.m:204
上面的消息被递归打印。
下面的崩溃日志也无济于事。我尝试过符号断点,各种调试技术,重新启动设备,甚至重置设备设置,还尝试使用UITextField
.
Exception Subtype: KERN_PROTECTION_FAILURE at 0x000000016d6a3ff0
VM Region Info: 0x16d6a3ff0 is in 0x16d6a0000-0x16d6a4000; bytes after start: 16368 bytes before end: 15
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
mapped file 11b8b8000-11bb00000 [ 2336K] r--/r-- SM=PRV ...ct_id=598bee3
GAP OF 0x51ba0000 BYTES
---> STACK GUARD 16d6a0000-16d6a4000 [ 16K] ---/rwx SM=NUL ... for thread 0
Stack 16d6a4000-16d7a0000 [ 1008K] rw-/rwx SM=COW thread 0
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [1013]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_notify.dylib 0x0000000189b42b20 notify_check + 8
1 libsystem_c.dylib 0x00000001879cda78 notify_check_tz + 40
2 libsystem_c.dylib 0x00000001879cd61c tzsetwall_basic + 76
3 libsystem_c.dylib 0x00000001879cf640 localtime_r + 52
4 libsystem_trace.dylib 0x00000001879364c8 _os_activity_stream_reflect + 348
5 libsystem_trace.dylib 0x0000000187942530 _os_log_impl_stream + 456
6 libsystem_trace.dylib 0x0000000187942034 _os_log_impl_flatten_and_send + 7084
7 libsystem_trace.dylib 0x00000001879436f0 _os_log_with_args_impl + 388
8 CoreFoundation 0x0000000187d4a2a8 _CFLogvEx3 + 188
9 Foundation 0x000000018819e894 _NSLogv + 124
10 Foundation 0x000000018819e8e4 NSLog + 56
11 Foundation 0x00000001880e45ec -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 84
12 UIKitCore 0x000000018c124a20 0x18b92e000 + 8350240
13 UIKitCore 0x000000018c124aac 0x18b92e000 + 8350380
14 UIKitCore 0x000000018c1250b0 0x18b92e000 + 8351920
15 CoreFoundation 0x0000000187c6b93c -[NSObject+ 153916 (NSObject) _copyDescription] + 48
16 CoreFoundation 0x0000000187d08ab0 __CFStringAppendFormatCore + 12640
17 CoreFoundation 0x0000000187d09738 _CFStringCreateWithFormatAndArgumentsReturningMetadata + 164
18 CoreFoundation 0x0000000187c706f4 +[NSException raise:format:arguments:] + 64
19 Foundation 0x00000001880e461c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 132
20 UIKitCore 0x000000018c124a20 0x18b92e000 + 8350240
21 UIKitCore 0x000000018c124aac 0x18b92e000 + 8350380
22 UIKitCore 0x000000018c1250b0 0x18b92e000 + 8351920
23 CoreFoundation 0x0000000187c6b93c -[NSObject+ 153916 (NSObject) _copyDescription] + 48
24 CoreFoundation 0x0000000187d08ab0 __CFStringAppendFormatCore + 12640
25 CoreFoundation 0x0000000187d09738 _CFStringCreateWithFormatAndArgumentsReturningMetadata + 164
26 CoreFoundation 0x0000000187c706f4 +[NSException raise:format:arguments:] + 64
27 Foundation 0x00000001880e461c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 132
28 UIKitCore 0x000000018c124a20 0x18b92e000 + 8350240
29 UIKitCore 0x000000018c124aac 0x18b92e000 + 8350380
30 UIKitCore 0x000000018c1250b0 0x18b92e000 + 8351920
31 CoreFoundation 0x0000000187c6b93c -[NSObject+ 153916 (NSObject) _copyDescription] + 48
32 CoreFoundation 0x0000000187d08ab0 __CFStringAppendFormatCore + 12640
33 CoreFoundation 0x0000000187d09738 _CFStringCreateWithFormatAndArgumentsReturningMetadata + 164
34 CoreFoundation 0x0000000187c706f4 +[NSException raise:format:arguments:] + 64
35 Foundation 0x00000001880e461c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 132
36 UIKitCore 0x000000018c124a20 0x18b92e000 + 8350240
37 UIKitCore 0x000000018c124aac 0x18b92e000 + 8350380
38 UIKitCore 0x000000018c1250b0 0x18b92e000 + 8351920
39 CoreFoundation 0x0000000187c6b93c -[NSObject+ 153916 (NSObject) _copyDescription] + 48
40 CoreFoundation 0x0000000187d08ab0 __CFStringAppendFormatCore + 12640
41 CoreFoundation 0x0000000187d09738 _CFStringCreateWithFormatAndArgumentsReturningMetadata + 164
42 CoreFoundation 0x0000000187c706f4 +[NSException raise:format:arguments:] + 64