iZettle / sdk-ios

Add card payments from Zettle to your own app
https://developer.zettle.com/docs/ios-sdk
Other
83 stars 38 forks source link

Frequent crash with iZettle SDK #74

Closed ls-david-clerc closed 8 years ago

ls-david-clerc commented 8 years ago

iZettle SDK version 1.2.3, but this crash happened with all the SDK versions we used in the last 12 months. Crashes on iOS 8 & 9, iPad or iPod.

We get more than 50 crashes per month for this stacktrace. We would like this to be resolved ASAP please.

Date: 2016-06-28T21:26:54Z

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000010

Crashed: com.apple.main-thread 0 iOSPos 0x1007590d4 -SelectPaymentTypeController(Future) preCheckCardInReader: 1 iOSPos 0x10075a9b4 -SelectPaymentTypeController(Future) selectPaymentUsingAccount:amount:options: 2 iOSPos 0x1007762e4 -UINavigationController(SelectAndCollect) selectAndCollectUsingAccount:amount:options: 3 iOSPos 0x10074fdf0 128-[UINavigationController(PurchaseFlow) chargeAccount:amount:paymentMethodOptions:paymentReferencesFunction:postPaymentFunction:]_block_invoke (PurchaseFlow.m:90) 4 iOSPos 0x10083002c 28-[IZFuture(Operations) then]_block_invoke_2 (IZFuture.m:301) 5 iOSPos 0x10082f764 __37-[IZFuture(Operations) thenComplete:]_block_invoke_2 (IZFuture.m:243) 6 iOSPos 0x10082f6a0 37-[IZFuture(Operations) thenComplete:]_block_invoke123 (IZFuture.m:280) 7 iOSPos 0x10082e6e8 -IZTask setCompletion: 8 iOSPos 0x10082f24c -IZFuture(Operations) thenComplete: 9 iOSPos 0x10082ff84 28-[IZFuture(Operations) then]_block_invoke (IZFuture.m:297) 10 iOSPos 0x10074f770 -UINavigationController(PurchaseFlow) purchaseFlowUsingFunction: 11 iOSPos 0x10074fcfc -UINavigationController(PurchaseFlow) chargeAccount:amount:paymentMethodOptions:paymentReferencesFunction:postPaymentFunction: 12 iOSPos 0x1007cd554 -UINavigationController(PurchaseFlowExternal) chargeExternalAccount:amount:currency:paymentReferences: 13 iOSPos 0x100741ef4 95-[iZettleSDK(Operations) chargeAmount:currency:reference:presentFromViewController:completion:]_block_invoke (iZettleSDK.m:219) 14 iOSPos 0x100741648 74-[iZettleSDK _presentOperationFromViewController:withFunction:completion:]_block_invoke (iZettleSDK.m:163) 15 iOSPos 0x1007cea78 128-[UIViewController(PurchaseFlowExternal) presentExternalFlowUsingPresentationOptions:account:enforcedUserAccount:usingFunction:]_block_invoke149 (PurchaseFlow+External.m:155) 16 iOSPos 0x10083002c 28-[IZFuture(Operations) then]_block_invoke_2 (IZFuture.m:301) 17 iOSPos 0x10082f764 37-[IZFuture(Operations) thenComplete:]_block_invoke_2 (IZFuture.m:243) 18 iOSPos 0x10082f6a0 37-[IZFuture(Operations) thenComplete:]_block_invoke123 (IZFuture.m:280) 19 iOSPos 0x10082e6e8 -IZTask setCompletion: 20 iOSPos 0x10082f24c -IZFuture(Operations) thenComplete: 21 iOSPos 0x10082ff84 28-[IZFuture(Operations) then]_block_invoke (IZFuture.m:297) 22 iOSPos 0x1007ce3b4 128-[UIViewController(PurchaseFlowExternal) presentExternalFlowUsingPresentationOptions:account:enforcedUserAccount:usingFunction:]_block_invoke_2 (PurchaseFlow+External.m:134) 23 iOSPos 0x1007dfa94 +IZFuture(Utilities) _repeatFunction:completeOnTask: 24 iOSPos 0x1007dfd98 +IZFuture(Utilities) repeatFunction: 25 iOSPos 0x1007cdf6c 128-[UIViewController(PurchaseFlowExternal) presentExternalFlowUsingPresentationOptions:account:enforcedUserAccount:usingFunction:]_block_invoke (PurchaseFlow+External.m:105) 26 iOSPos 0x100806460 -UIViewController(OperationPresentation) presentOperationFlowWithOptions:usingFunction: 27 iOSPos 0x1007cddac -UIViewController(PurchaseFlowExternal) presentExternalFlowUsingPresentationOptions:account:enforcedUserAccount:usingFunction: 28 iOSPos 0x1007412e8 -iZettleSDK _presentOperationFromViewController:withFunction:completion: 29 iOSPos 0x100741dc4 -iZettleSDK(Operations) chargeAmount:currency:reference:presentFromViewController:completion: 30 iOSPos 0x10017d578 -IKPayiZettle payWithParams:callback: 31 iOSPos 0x100103c40 -IKGapPay pay:withDict:callback: 32 iOSPos 0x10009cff4 -IKGapPlugin executeMethod:arguments:options: 33 iOSPos 0x100083398 __30-[IKPGap phoneGapExecCommand:]_block_invoke (IKPGap.m:58) 34 libdispatch.dylib 0x195a19994 _dispatch_call_block_and_release + 24 35 libdispatch.dylib 0x195a19954 _dispatch_client_callout + 16 36 libdispatch.dylib 0x195a1e20c _dispatch_main_queue_callback_4CF + 1608 37 CoreFoundation 0x183ed37f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12 38 CoreFoundation 0x183ed18a0 __CFRunLoopRun + 1492 39 CoreFoundation 0x183dfd2d4 CFRunLoopRunSpecific + 396 40 GraphicsServices 0x18d4c36fc GSEventRunModal + 168 41 UIKit 0x1889c2fac UIApplicationMain + 1488 42 iOSPos 0x1000803e8 main (main.m:14) 43 libdyld.dylib 0x195a46a08 start + 4

mansbernhardt commented 8 years ago

Thanks a lot of reporting. I went through our crash history for our own app to see if it could be found there as well, and I found a couple of matches. The good thing is that it does no longer show up on our latest releases, so it really seems it has been solved already for the iZettle app. We a currently working on a major update to the SDK that we plan to release in the coming weeks, that will be based on our latest iZettle app code-base and hence should include the same fix.

ls-david-clerc commented 8 years ago

The latest SDK still crashes with apparently the same stack trace:

0. Crashed: com.apple.main-thread

0 iZettlePayments 0xc69d6e -[SelectPaymentTypeController(Future) preCheckCardInReader:] + 491 1 libobjc.A.dylib 0x34d35a37 objc_object::sidetable_retain() + 82 2 iZettlePayments 0xc6b379 -[SelectPaymentTypeController(Future) selectPaymentUsingAccount:amount:options:] + 1468 3 iZettlePayments 0xc36b4d -[UINavigationController(SelectAndCollect) selectAndCollectUsingAccount:amount:options:] + 286 4 iZettlePayments 0xc99d67 128-[UINavigationController(PurchaseFlow) chargeAccount:amount:paymentMethodOptions:paymentReferencesFunction:postPaymentFunction:]_block_invoke + 318 5 iZettleShared 0xda759f 28-[IZFuture(Operations) then]_block_invoke_2 + 30 6 iZettleShared 0xda6edd 37-[IZFuture(Operations) thenComplete:]_block_invoke_2 + 60 7 iZettleShared 0xda6e27 37-[IZFuture(Operations) thenComplete:]_block_invoke.145 + 346 8 iZettleShared 0xda5dd3 -[IZTask setCompletion:] + 266 9 iZettleShared 0xda6a63 -[IZFuture(Operations) thenComplete:] + 582 10 iZettleShared 0xda7535 28-[IZFuture(Operations) then]_block_invoke + 110 11 iZettlePayments 0xc9981d -[UINavigationController(PurchaseFlow) purchaseFlowUsingFunction:] + 548 12 iZettlePayments 0xc99bc3 -[UINavigationController(PurchaseFlow) chargeAccount:amount:paymentMethodOptions:paymentReferencesFunction:postPaymentFunction:] + 346 13 iZettlePayments 0xc77a6b -[UINavigationController(PurchaseFlowExternal) chargeExternalAccount:amount:currency:paymentReferences:] + 442 14 iZettleSDK 0xe7ff15 95-[iZettleSDK(Operations) chargeAmount:currency:reference:presentFromViewController:completion:]_block_invoke + 134 15 iZettleSDK 0xe7f7bf 74-[iZettleSDK _presentOperationFromViewController:withFunction:completion:]_block_invoke + 106 16 iZettlePayments 0xc78bc3 128-[UIViewController(PurchaseFlowExternal) presentExternalFlowUsingPresentationOptions:account:enforcedUserAccount:usingFunction:]_block_invoke.145 + 50 17 iZettleShared 0xda759f 28-[IZFuture(Operations) then]_block_invoke_2 + 30 18 iZettleShared 0xda6edd __37-[IZFuture(Operations) thenComplete:]_block_invoke_2 + 60 19 iZettleShared 0xda6e27 37-[IZFuture(Operations) thenComplete:]_block_invoke.145 + 346 20 iZettleShared 0xda5dd3 -[IZTask setCompletion:] + 266 21 iZettleShared 0xda6a63 -[IZFuture(Operations) thenComplete:] + 582 22 iZettleShared 0xda7535 28-[IZFuture(Operations) then]_block_invoke + 110 23 iZettlePayments 0xc78623 128-[UIViewController(PurchaseFlowExternal) presentExternalFlowUsingPresentationOptions:account:enforcedUserAccount:usingFunction:]_block_invoke_2 + 600 24 iZettleShared 0xdc71c3 +[IZFuture(Utilities) _repeatFunction:completeOnTask:] + 50 25 iZettleShared 0xdc7423 +[IZFuture(Utilities) repeatFunction:] + 80 26 iZettlePayments 0xc78395 __128-[UIViewController(PurchaseFlowExternal) presentExternalFlowUsingPresentationOptions:account:enforcedUserAccount:usingFunction:]_block_invoke + 200 27 iZettleShared 0xd8ae33 -[UIViewController(OperationPresentation) presentOperationFlowWithOptions:usingFunction:] + 1366 28 iZettlePayments 0xc781dd -[UIViewController(PurchaseFlowExternal) presentExternalFlowUsingPresentationOptions:account:enforcedUserAccount:usingFunction:] + 380 29 iZettleSDK 0xe7f4ed -[iZettleSDK _presentOperationFromViewController:withFunction:completion:] + 444 30 iZettleSDK 0xe7fe4b -[iZettleSDK(Operations) chargeAmount:currency:reference:presentFromViewController:completion:] + 160