Closed irew closed 7 years ago
This happens even when context capture is disabled.
Getting the same crash but the stack trace looks a bit different
2016-12-05 11:16:29.431 MyApp[88137:2374618] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSDictionaryM removeObjectForKey:]: key cannot be nil'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a90f34b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010a37021e objc_exception_throw + 48
2 CoreFoundation 0x000000010a8a7993 -[__NSDictionaryM removeObjectForKey:] + 675
3 MyApp 0x00000001016e1d56 -[SMContextManager trackLocalizedStringForKey:value:table:] + 143
4 MyApp 0x00000001016def8f -[NSBundle(SMContext) smctx_localizedStringForKey:value:table:] + 126
5 UserNotifications 0x000000010d2127d7 +[UNLocalizedStringFactory localizedUserNotificationStringForKey:arguments:] + 116
6 UserNotifications 0x000000010d21a800 +[NSString(UNUserNotificationCenterSupport) localizedUserNotificationStringForKey:arguments:] + 48
7 UIKit 0x000000010766735d UILocalNotificationToUNNotificationRequest_block_invoke + 1890
8 UIKit 0x00000001072dbfa5 -[UIApplication _scheduleLocalNotification:] + 208
9 UIKit 0x00000001072dbec2 -[UIApplication scheduleLocalNotification:] + 52
10 MyApp 0x000000010119b084 _TZFC12 MyApp 24LocalNotificationManager8schedulefT5eventCS_7MyEvent_T_ + 3732
11 MyApp 0x000000010119b323 _TFZFC12 MyApp 24LocalNotificationManager27scheduleEventsClearExistingFGSaCS_7MyEvent_T_U_FS1_T_ + 51
12 MyApp 0x000000010119b363 _TTRXFo_oC12 MyApp 7MyEvent_zoPs5Error__XFo_iS0__zoPS1___ + 35
13 libswiftCore.dylib 0x000000010ad803a5 _TFEsPs8Sequence7forEachfzFzWx8Iterator7Element_T_T_ + 389
14 MyApp 0x000000010119b2c0 _TZFC12 MyApp 24LocalNotificationManager27scheduleEventsClearExistingfGSaCS_7MyEvent_T_ + 240
15 MyApp 0x0000000100d2a2fe _TFFC12 MyApp 19EventNetworkManager13fetchMyEventsFT4pageSi7perPageSi10completionFGVS_15NetworkResponseGSaCS_7MyEvent__T__CSo14URLSessionTaskU_FGS1_GSaS2___T_ + 590
16 MyApp 0x000000010113f7f8 _TFFFC12 MyApp 18BaseNetworkManager12fetchObjectsuRxS_14DeserializablerFT4typeMx4pathSS6methodOS_10HttpMethod10parametersGSqP__6unwrapGSqSS_12errorHandlerCS_19NetworkErrorHandler10completionFGVS_15NetworkResponseGSax__T__CSo14URLSessionTaskU_FTGSqV10Foundation4Data_GSqCSo11URLResponse_GSqPs5Error___T_U2_FT_T_ + 776
17 MyApp 0x000000010114a4c0 _TPA__TFFFC12 MyApp 18BaseNetworkManager12fetchObjectsuRxS_14DeserializablerFT4typeMx4pathSS6methodOS_10HttpMethod10parametersGSqP__6unwrapGSqSS_12errorHandlerCS_19NetworkErrorHandler10completionFGVS_15NetworkResponseGSax__T__CSo14URLSessionTaskU_FTGSqV10Foundation4Data_GSqCSo11URLResponse_GSqPs5Error___T_U2_FT_T_ + 688
18 MyApp 0x000000010113ee17 _TTRgRx12 MyApp 14DeserializablerXFo___XFdCb___ + 39
19 libdispatch.dylib 0x000000010b726980 _dispatch_call_block_and_release + 12
20 libdispatch.dylib 0x000000010b7500cd _dispatch_client_callout + 8
21 libdispatch.dylib 0x000000010b7308d6 _dispatch_main_queue_callback_4CF + 406
22 CoreFoundation 0x000000010a8d34f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
23 CoreFoundation 0x000000010a898f8d __CFRunLoopRun + 2205
24 CoreFoundation 0x000000010a898494 CFRunLoopRunSpecific + 420
25 GraphicsServices 0x000000010d6fba6f GSEventRunModal + 161
26 UIKit 0x00000001072b9964 UIApplicationMain + 159
27 MyApp 0x0000000100b936ad main + 125
28 libdyld.dylib 0x000000010b79c68d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Yup, looks like
-[SMContextManager trackLocalizedStringForKey:value:table:] (SMContextManager.m:59)
receiving a nil
key will crash.
What's surprising is that even without context capture turned on this is being called, ideally when it's disabled little as possible is running from within the SmartlingContextKit library.
Hi @irew, we're in the process of replacing this library with a new image capture framework. Unfortunately, we started seeing issues with the latest iOS versions and our context manager.
I'll update the README and we'll post an ETA for our updated context capture frameworks as soon as we have a solid estimate.
If
value
here isnil
:NSLocalizedString(value, @"")
The following crash happens: