MSStickerView randomly raises NSInvalidArgumentException in iMessageExtension

133 views Asked by At

Sometimes, apparently randomly, when using MSStickerView in my IMessageExtension, the following error is raised :

Fatal Exception: NSInvalidArgumentException
*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]

It seems to be a bug in MSStickerView, but I don't succeed to identify what's causing it and/or to catch it and rescue (since it seems to be about private method performing asynchronously)

Does anybody know what could be going on ?

This is the stack trace :

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)
0

There are 0 answers