有时,显然是随机的,在我的 IMessageExtension 中使用 MSStickerView 时,会引发以下错误:
Fatal Exception: NSInvalidArgumentException
*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]
它似乎是 MSStickerView 中的一个错误,但我没有成功确定是什么导致它和/或捕捉它并救援(因为它似乎是关于异步执行的私有方法)
有人知道会发生什么吗?
这是堆栈跟踪:
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x19387d1b8 __exceptionPreprocess
1 libobjc.A.dylib 0x1922b455c objc_exception_throw
2 CoreFoundation 0x19375b870 -[__NSPlaceholderArray initWithObjects:count:]
3 CoreFoundation 0x1937675fc +[NSArray arrayWithObjects:count:]
4 Messages 0x1af2bf688 -[MSStickerView _loadSticker]
5 Messages 0x1af2becc8 -[MSStickerView layoutSubviews]
6 UIKit 0x19972fa80 -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
7 QuartzCore 0x196bdd9d8 -[CALayer layoutSublayers]
8 QuartzCore 0x196bd24cc CA::Layer::layout_if_needed(CA::Transaction*)
9 QuartzCore 0x196bd238c CA::Layer::layout_and_display_if_needed(CA::Transaction*)
10 QuartzCore 0x196b4f3e0 CA::Context::commit_transaction(CA::Transaction*)
11 QuartzCore 0x196b76a68 CA::Transaction::commit()
12 QuartzCore 0x196b77488 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
13 CoreFoundation 0x19382a0c0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
14 CoreFoundation 0x193827cf0 __CFRunLoopDoObservers
15 CoreFoundation 0x193828180 __CFRunLoopRun
16 CoreFoundation 0x1937562b8 CFRunLoopRunSpecific
17 GraphicsServices 0x19520a198 GSEventRunModal
18 UIKit 0x19979d7fc -[UIApplication _run]
19 UIKit 0x199798534 UIApplicationMain
20 libxpc.dylib 0x19295bcc8 _xpc_objc_main
21 libxpc.dylib 0x19295d944 xpc_main
22 Foundation 0x1944a23c4 service_connection_handler
23 PlugInKit 0x19bf4e128 -[PKService run]
24 PlugInKit 0x19bf4dc90 +[PKService main]
25 PlugInKit 0x19bf4e14c +[PKService _defaultRun:arguments:]
26 Foundation 0x1944880d4 NSExtensionMain
27 libdispatch.dylib 0x1927395b8 (Missing)