刚刚发布了一个新版本的应用,它已经开始崩溃了
致命异常:NSInvalidArgumentException * - [__ NSDictionaryM setObject:forKey:]:key不能为nil
问题似乎在于在后台线程上调用-[NSExtension _reallyBeginExtensionRequestWithInputItems:listenerEndpoint:completion:]
,后者又试图设置一些nil字典键......
0 CoreFoundation __exceptionPreprocess
1 libobjc.A.dylib objc_exception_throw
2 CoreFoundation _CFArgv
3 CoreFoundation -[__NSDictionaryM setObject:forKey:]
4 Foundation -[NSExtension _reallyBeginExtensionRequestWithInputItems:listenerEndpoint:completion:]
5 libdispatch.dylib _dispatch_call_block_and_release
6 libdispatch.dylib _dispatch_client_callout
7 libdispatch.dylib _dispatch_queue_serial_drain$VARIANT$mp
8 libdispatch.dylib _dispatch_queue_invoke$VARIANT$mp
9 libdispatch.dylib _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp
10 libdispatch.dylib _dispatch_workloop_worker_thread$VARIANT$mp
11 libsystem_pthread.dylib _pthread_wqthread
12 libsystem_pthread.dylib start_wqthread
我遇到的问题是应用程序没有任何扩展 - 所以我想知道为什么调用这个方法的原因。我可以在this post中找到这个方法的唯一参考,但这没什么帮助。
应用使用在很多版本之前拥有共享和照片编辑扩展程序,但这些已经删除很久了。
根据Crashlytics的说法,这似乎发生在大约十分之一的应用会话中。我在发布时已经看过它了,所以我假设它也在发生在其他地方 - 但除此之外我无法重新创建。
有关可能导致此问题的任何想法?
更新... 3月18日
在生产应用程序中添加一些日志记录似乎表明在呈现UIIMagePickerController
然后我设法捕捉到一个异常,这似乎证实问题确实存在于图像选择器......
#0 0x000000018279c4f0 in objc_exception_throw ()
#1 0x00000001834ebc9c in _CFThrowFormattedException ()
#2 0x0000000183420ae8 in -[__NSDictionaryM setObject:forKey:] ()
#3 0x0000000183f41f5c in -[NSExtension _reallyBeginExtensionRequestWithInputItems:listenerEndpoint:completion:] ()
#4 0x00000001029dd2cc in _dispatch_call_block_and_release ()
#5 0x00000001029dd28c in _dispatch_client_callout ()
#6 0x00000001029ebf80 in _dispatch_queue_serial_drain ()
#7 0x00000001029e07ec in _dispatch_queue_invoke ()
#8 0x00000001029ecf6c in _dispatch_root_queue_drain_deferred_wlh ()
#9 0x00000001029f4020 in _dispatch_workloop_worker_thread ()
#10 0x000000018317af1c in _pthread_wqthread ()
#11 0x000000018317ab6c in start_wqthread ()
Enqueued from PlugInKit reply:com.apple.mobileslideshow.photo-picker (Thread 3) Queue : PlugInKit reply:com.apple.mobileslideshow.photo-picker (serial)
#0 0x00000001029ecabc in _dispatch_queue_push ()
#1 0x0000000183f430b4 in __79-[NSExtension beginExtensionRequestWithInputItems:listenerEndpoint:completion:]_block_invoke ()
#2 0x0000000183f4628c in __33-[NSExtension _safelyBeginUsing:]_block_invoke_4 ()
#3 0x0000000188a2a2f8 in __28-[PKHostPlugIn startPlugIn:]_block_invoke.143 ()
#4 0x0000000188a2be1c in __28-[PKHostPlugIn startPlugIn:]_block_invoke_2.292 ()
#5 0x000000018355aad0 in __invoking___ ()
#6 0x000000018343936c in -[NSInvocation invoke] ()
#7 0x00000001029dd2cc in _dispatch_call_block_and_release ()
#8 0x00000001029dd28c in _dispatch_client_callout ()
#9 0x00000001029ebf80 in _dispatch_queue_serial_drain ()
#10 0x00000001029e07ec in _dispatch_queue_invoke ()
#11 0x00000001029ecf6c in _dispatch_root_queue_drain_deferred_wlh ()
#12 0x00000001029f4020 in _dispatch_workloop_worker_thread ()
#13 0x000000018317af1c in _pthread_wqthread ()
#14 0x000000018317ab6c in start_wqthread ()
Enqueued from com.apple.NSXPCConnection.user.com.apple.mobileslideshow.photo-picker (Thread 4) Queue : com.apple.NSXPCConnection.user.com.apple.mobileslideshow.photo-picker (serial)
#0 0x00000001029ecabc in _dispatch_queue_push ()
#1 0x0000000188a28ed4 in -[PKHostPlugIn connection:handleInvocation:isReply:] ()
#2 0x0000000184071878 in -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:] ()
#3 0x0000000184075cb0 in __88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke.346 ()
#4 0x00000001831b5d44 in _xpc_connection_reply_callout ()
#5 0x00000001831b5c80 in _xpc_connection_call_reply_async ()
#6 0x00000001029ddaa4 in _dispatch_client_callout3 ()
#7 0x00000001029f7cd4 in _dispatch_mach_msg_async_reply_invoke ()
#8 0x00000001029ebd9c in _dispatch_queue_serial_drain ()
#9 0x00000001029e07ec in _dispatch_queue_invoke ()
#10 0x00000001029ecf6c in _dispatch_root_queue_drain_deferred_wlh ()
#11 0x00000001029f4020 in _dispatch_workloop_worker_thread ()
#12 0x000000018317af1c in _pthread_wqthread ()
#13 0x000000018317ab6c in start_wqthread ()
Enqueued from com.apple.root.default-qos.overcommit (Thread 4) Queue : com.apple.root.default-qos.overcommit (serial)
#0 0x00000001029f58f8 in _dispatch_mach_reply_merge_msg ()
#1 0x00000001029fadec in _dispatch_event_loop_merge ()
#2 0x00000001029f3f70 in _dispatch_workloop_worker_thread ()
#3 0x000000018317af1c in _pthread_wqthread ()
#4 0x000000018317ab6c in start_wqthread ()
这会给任何人一个线索吗?
更新... 2 201年3月8日
更多详情