1

Just found these crashes using the MarketingCloudSDK 5.0.0:

1)

Crashed: com.apple.root.default-qos
0  CoreData                       0x186d027a0 -[NSKnownKeysDictionary1 release] + 88
1  CoreData                       0x186d2e340 -[NSManagedObject(_NSInternalMethods) _setLastSnapshot__:] + 104
2  CoreData                       0x186d2dd30 -[NSManagedObjectContext(_NSInternalChangeProcessing) _establishEventSnapshotsForObject:] + 220
3  CoreData                       0x186d2db50 _PFFastMOCObjectWillChange + 212
4  CoreData                       0x186d2d874 _PF_ManagedObject_WillChangeValueForKeyIndex + 244
5  CoreData                       0x186d2d68c _sharedIMPL_setvfk_core + 208
6  CoreData                       0x186dc0d84 _sharedIMPL_copying_setvfk_core + 72
7  MyApp                     0x1030eda70 -[SFMCRegistrationEntity setDst:] (SFMCRegistrationEntity.m:131)
8  MyApp                     0x1030debdc -[MarketingCloudSDKFoundation updateRegistrationWithConfiguration:] (MarketingCloudSDKFoundation.m:375)
9  MyApp                     0x1030ddce4 -[MarketingCloudSDKFoundation setupWithConfiguration:error:] (MarketingCloudSDKFoundation.m:267)
10 MyApp                     0x103006730 __86-[MarketingCloudSDK sfmc_configureWithURL:configurationIndex:error:completionHandler:]_block_invoke (MarketingCloudSDK+Base.m:270)

2) Considering that probably MarketingCloud is the only part of the code that uses CoreData, this one may be caused by it:

Crashed: com.apple.main-thread
0  CoreData                       0x1849de7a0 -[NSKnownKeysDictionary1 release] + 88
1  CoreData                       0x184a105a0 -[NSManagedObject(_NSInternalMethods) _nilOutReservedCurrentEventSnapshot__] + 52
2  CoreData                       0x184a0c744 -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:] + 2016 

The next 2 have this info on Crashlytics: The stack trace indicates that heap corruption may have caused your app to crash. Memory corruption can occur pretty easily from freeing a dangling pointer, a thread race, or bad pointer arithmetic. The important thing to keep in mind is that the resulting crash may happen long after the initial corruption. As a result, the stack trace for this crash might not provide any clues to the location of the bug in your code. However, you can still fix memory issues with tools from Apple. For speedy resolution of memory corruption issues, we recommend regularly auditing your app with Xcode’s memory debugging facilities: Visual Memory Debugger, Zombies Instrument, Address Sanitizer, Thread Sanitizer and malloc diagnostics.

Crashed: com.apple.usernotifications.UNUserNotificationServiceConnection.call-out
0  libobjc.A.dylib                0x181fb81a0 objc_retain + 16
1  JustFlyApp                     0x100f33bc4 -[MarketingCloudSDKFoundation observeValueForKeyPath:ofObject:change:context:] (MarketingCloudSDKFoundation.m:515)
2  Foundation                     0x18365a894 NSKeyValueNotifyObserver + 304
3  Foundation                     0x18365a3bc NSKeyValueDidChange + 404
4  Foundation                     0x18371268c NSKeyValueDidChangeWithPerThreadPendingNotifications + 140
5  CoreData                       0x18551b128 _PF_ManagedObject_DidChangeValueForKeyIndex + 132
6  CoreData                       0x1855196f4 _sharedIMPL_setvfk_core + 312
7  CoreData                       0x1855acd84 _sharedIMPL_copying_setvfk_core + 72
8  JustFlyApp                     0x100f41450 -[SFMCRegistrationEntity setPushEnabled:] (SFMCRegistrationEntity.m:82)
9  JustFlyApp                     0x100f35e48 -[MarketingCloudSDKFoundation setPushEnabled:] (MarketingCloudSDKFoundation.m:709)
10 JustFlyApp                     0x100f5ff34 __50-[MarketingCloudSDKNotification setupOnMainThread]_block_invoke_2 (MarketingCloudSDKNotification.m:77)

and,

Crashed: com.apple.root.default-qos
0  libsystem_kernel.dylib         0x182f802e8 __pthread_kill + 8
1  libsystem_pthread.dylib        0x183099748 pthread_kill$VARIANT$armv81 + 360
2  libsystem_c.dylib              0x182eeefbc abort + 140
3  libsystem_malloc.dylib         0x182fc6a00 nanozone_default_reader + 330
4  libsystem_malloc.dylib         0x182fc7d18 _nano_malloc_check_clear + 412
5  libsystem_malloc.dylib         0x182fc6c5c nano_malloc + 44
6  libsystem_malloc.dylib         0x182fb5b88 malloc_zone_malloc + 172
7  CoreFoundation                 0x18332b33c _CFRuntimeCreateInstance + 348
8  CoreFoundation                 0x1833412c4 CFStringCreateMutable + 80
9  CoreFoundation                 0x183359e20 CFStringCreateMutableCopy + 168
10 CoreFoundation                 0x1833730b4 _CFBundleCopyFindResources + 628
11 CoreFoundation                 0x183372e34 CFBundleCopyResourceURL + 60
12 Foundation                     0x183d90144 -[NSBundle URLForResource:withExtension:subdirectory:] + 116
13 JustFlyApp                     0x100658020 -[MarketingCloudSDKFoundation sdkVersionString] (MarketingCloudSDKFoundation.m:86)
14 JustFlyApp                     0x10065acb4 -[MarketingCloudSDKFoundation updateRegistrationWithConfiguration:] (MarketingCloudSDKFoundation.m:377)
15 JustFlyApp                     0x100659ce4 -[MarketingCloudSDKFoundation setupWithConfiguration:error:] (MarketingCloudSDKFoundation.m:267)
16 JustFlyApp                     0x100582730 __86-[MarketingCloudSDK sfmc_configureWithURL:configurationIndex:error:completionHandler:]_block_invoke (MarketingCloudSDK+Base.m:270)

Does anyone knows how to avoid those crashes, or if they're already mapped to be solved into next releases? They all happened in different iPhones on iOS 11.

0

Please verify that you have included the file "MarketingCloudSDK.bundle" in your application. This can be done in the "copy bundle resources" Build Phase within Xcode. See step 5 at https://salesforce-marketingcloud.github.io/MarketingCloudSDK-iOS/get-started/apple.html

  • this step is only applicable to the option 2 of the 3rd step. I'm using cocoapods. – JRafaelM Apr 4 '18 at 20:22
  • Please open an investigation with Salesforce and provide the crash logs, details on OS version, Xcode version used and sample code to reproduce the issue. Thank you. – Jeff Sylvia Apr 5 '18 at 13:35
  • Hey man, how can I do that ? – JRafaelM Apr 5 '18 at 14:19
  • 1
    You will need to contact your Salesforce support contact and have them initiate a support investigation. – Jeff Sylvia Apr 6 '18 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.