0

I recently upgraded to Xcode 8, and the app crashes on the configureSDKWithAppID in the simulator with any of the 9.3 or 8.4 iOS versions. I'm using JB4ASDK 4.5.0.

It dumps me in the debugger with something like this:

0x1021a4ade <+2544>:  movl   %eax, %r15d
0x1021a4ae1 <+2547>:  movq   %r12, %rdi
0x1021a4ae4 <+2550>:  callq  *0x461dae(%rip)           ; (void *)0x00000001074999b0: objc_release
0x1021a4aea <+2556>:  movq   %r13, %rdi
0x1021a4aed <+2559>:  movq   0x461da4(%rip), %r13      ; (void *)0x00000001074999b0: objc_release
0x1021a4af4 <+2566>:  callq  *%r13
0x1021a4af7 <+2569>:  cmpq   $0x0, 0x28(%rbp)
0x1021a4afc <+2574>:  je     0x1021a4e2a               ; <+3388> at ETPush.m:718
0x1021a4b02 <+2580>:  testl  %r15d, %r15d
0x1021a4b05 <+2583>:  je     0x1021a4e2a               ; <+3388> at ETPush.m:718
0x1021a4b0b <+2589>:  movq   0x5e74fe(%rip), %rdi      ; (void *)0x00000001048438e0: NSString
0x1021a4b12 <+2596>:  movl   %r15d, (%rsp)
0x1021a4b16 <+2600>:  leaq   0x496333(%rip), %rdx      ; @"%@\n%s [Line %d] error = %d"
0x1021a4b1d <+2607>:  leaq   0x49636c(%rip), %rcx      ; @"CCKeyDerivationPBKDF Failure"
0x1021a4b24 <+2614>:  leaq   0x3db218(%rip), %r8       ; "-[ETPush configureSDKWithAppID:andAccessToken:withAnalytics:andLocationServices:andProximityServices:andCloudPages:withPIAnalytics:error:]"

If I use the iOS 10 simulator, it works fine in the simulator. I can do something like not call this if we're in the simulator or on a lower iOS version with preprocessor macros, but I'm a little concerned, since we don't necessarily have older iOS devices to test on.

Also, this could be an Xcode or simulator bug, but I'm not sure how to tell where the problem is. The exception is EXC_BAD_ACCESS (code=1, address=0x84a).

Per the response, here is the code from the offending line:

[[ETPush pushManager] configureSDKWithAppID:@"myappid"
                             andAccessToken:@"myaccesstoken"
                              withAnalytics:YES
                        andLocationServices:NO
                       andProximityServices:NO
                              andCloudPages:NO
                            withPIAnalytics:NO
                                      error:&error];

I'm not sure how this is off topic, because it crashes on the Salesforce SDK line.

Update:

This looks like a problem specifically with JB4ASDK 4.5.0. I can reproduce with Xcode 7.3, Xcode 8.0, and Xcode 8.1 beta. With JB4ASDK 4.4.0, it works fine in the simulator for those Xcode versions. So, I believe this is a bug with the Salesforce mobile push SDK or an interactivity problem with it and the simulator.

  • So...which line is the Salesforce SDK line? Did you include it? I'm no expert here and would vote to reopen if it were a little more clear to me. I do think you'll have better luck on Stack Overflow though. – Adrian Larson Sep 30 '16 at 22:40
  • [[ETPush pushManager] configureSDKWithAppID is the line. This is the Salesforce mobile push SDK. The "ET" comes from ExactTarget, which was acquired by Salesforce and rebranded. I have seen (an answered) another question about this SDK on this Stack Exchange. And I'm pretty sure this is a bug in the 4.5.0 version of the SDK. – zerodiff Oct 1 '16 at 16:05
1

The error is CCKeyDerivationPBKDF Failure. ETPush's call to CCKeyDerivationPBKDF failed and the SDK either did not properly handle the error, or chose to crash instead of continuing in an inconsistent state.

The docs give us some reasons why CCKeyDerivationPBKDF may fail:

kCCParamError can result from bad values for the password, salt,
and unwrapped key pointers as well as a bad value for the prf
function.

It is unlikely that ETPush is using a bad prf algorithm or that the problem is in Xcode 8; instead you may be passing some bad values to ETPush's configure method. We'd know more if you could share your code from the call site.

  • Thanks for the response -- I added the offending code. Like I said, it works in some simulators and not others, but I'm not sure why it would behave differently. – zerodiff Sep 30 '16 at 16:57

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