stripe / stripe-terminal-ios

Stripe Terminal iOS SDK
https://stripe.com/docs/terminal/sdk/ios
Other
104 stars 65 forks source link

SCPLog crash !!! #237

Closed WenzhaoTan-Chowbus closed 1 year ago

WenzhaoTan-Chowbus commented 1 year ago

Summary

Sometimes our App will become very stuck, and then crash directly.

iOS version

16.3

Installation method

cocoapods running 3.0 beta 5

Other information

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Incident Identifier: E7FB489A-DE9D-4CEC-BD12-9307A9FC7DE7
CrashReporter Key:   989d109590dd475a1e6079778321be8201115462
Hardware Model:      iPad12,1
Process:             ChowbusPOS [655]
Path:                /private/var/containers/Bundle/Application/6F833CD9-88FD-4833-BB20-D37955860879/ChowbusPOS.app/ChowbusPOS
Identifier:          com.chowbus.posTestEnt
Version:             1.0.6 (3076)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.chowbus.posTestEnt [433]

Date/Time:           2023-06-07 04:29:38.0460 -0500
Launch Time:         2023-06-07 03:50:28.4455 -0500
OS Version:          iPhone OS 16.3 (20D47)
Release Type:        User
Report Version:      104

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: FRONTBOARD 2343432205 
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-update watchdog transgression: application<com.chowbus.posTestEnt>:655 exhausted real (wall clock) time allowance of 10.00 seconds
ProcessVisibility: Foreground
ProcessState: Running
WatchdogEvent: scene-update
WatchdogVisibility: Foreground
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 15.240 (user 15.240, system 0.000), 25% CPU",
"Elapsed application CPU time (seconds): 11.155, 19% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>

Triggered by Thread:  0

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_malloc.dylib                 0x1cf96cc48 nanov2_calloc + 64
1   CoreFoundation                         0x1c14ef144 _CFRuntimeCreateInstance + 436
2   CoreFoundation                         0x1c14ef144 _CFRuntimeCreateInstance + 436
3   CoreFoundation                         0x1c14ecda4 __CFStringCreateImmutableFunnel3 + 2216
4   CoreFoundation                         0x1c14f6720 _CFNonObjCStringCreateCopy + 556
5   CoreFoundation                         0x1c14edc14 _CFStringCreateWithFormatAndArgumentsReturningMetadata + 200
6   CoreFoundation                         0x1c14ea570 _CFStringCreateWithFormatAndArgumentsAux2 + 44
7   Foundation                             0x1bb868c5c +[NSString stringWithFormat:] + 68
8   StripeTerminal                         0x104f677dc __58+[NSString(StripeTerminal) scp_remoteLineWithConsoleLine:]_block_invoke + 184
9   Foundation                             0x1bb853380 -[NSBlockPredicate evaluateWithObject:substitutionVariables:] + 196
10  Foundation                             0x1bb8517a0 _filterObjectsUsingPredicate + 252
11  Foundation                             0x1bb8f5d98 -[NSArray(NSPredicateSupport) filteredArrayUsingPredicate:] + 192
12  StripeTerminal                         0x104f676a8 +[NSString(StripeTerminal) scp_remoteLineWithConsoleLine:] + 1756
13  StripeTerminal                         0x10501d11c -[SCPLog logEvent:scope:level:readerSerialNumber:params:] + 256
14  StripeTerminal                         0x10501cfec -[SCPLog methodCall:readerSerialNumber:] + 144
15  StripeTerminal                         0x10501efc4 +[SCPLog methodCall:readerSerialNumber:] + 84
16  StripeTerminal                         0x104f922b0 -[SCPReader updateBatteryInfo] + 108
17  CoreFoundation                         0x1c149f3b4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
18  CoreFoundation                         0x1c1546444 ___CFXRegistrationPost_block_invoke + 88
19  CoreFoundation                         0x1c15296f4 _CFXRegistrationPost + 440
20  CoreFoundation                         0x1c14b39b8 _CFXNotificationPost + 704
21  Foundation                             0x1bb8aad0c -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
22  UIKitCore                              0x1c38ce068 -[UIApplication _stopDeactivatingForReason:] + 1236
23  UIKitCore                              0x1c38cdb18 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 280
24  UIKitCore                              0x1c38cd904 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 620
25  UIKitCore                              0x1c38cd4b4 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 252
26  UIKitCore                              0x1c38cd380 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 148
27  UIKitCore                              0x1c3fb156c +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 736
28  UIKitCore                              0x1c404b568 _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 224
29  UIKitCore                              0x1c3779374 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 316
30  UIKitCore                              0x1c3bec294 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.214 + 556
31  UIKitCore                              0x1c384b9a0 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 216
32  UIKitCore                              0x1c384b810 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 244
33  UIKitCore                              0x1c384b650 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 336
34  FrontBoardServices                     0x1d71e166c -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 420
35  FrontBoardServices                     0x1d71e14a8 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 144
36  FrontBoardServices                     0x1d71e4c24 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168
37  FrontBoardServices                     0x1d71e4b40 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 340
38  libdispatch.dylib                      0x1c8a88f88 _dispatch_client_callout + 20
39  libdispatch.dylib                      0x1c8a8ca08 _dispatch_block_invoke_direct + 264
40  FrontBoardServices                     0x1d71eed40 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52
41  FrontBoardServices                     0x1d71ee8dc -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220
42  FrontBoardServices                     0x1d71f1184 -[FBSSerialQueue _performNextFromRunLoopSource] + 28
43  CoreFoundation                         0x1c153df24 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
44  CoreFoundation                         0x1c154a2fc __CFRunLoopDoSource0 + 176
45  CoreFoundation                         0x1c14ce1c0 __CFRunLoopDoSources0 + 244
46  CoreFoundation                         0x1c14e3b7c __CFRunLoopRun + 836
47  CoreFoundation                         0x1c14e8eb0 CFRunLoopRunSpecific + 612
48  GraphicsServices                       0x1fae30368 GSEventRunModal + 164
49  UIKitCore                              0x1c39de668 -[UIApplication _run] + 888
50  UIKitCore                              0x1c39de2cc UIApplicationMain + 340
51  ChowbusPOS                             0x1007c9158 main + 176
52  dyld                                   0x1dfdd4960 start + 2528
bric-stripe commented 1 year ago

Hi, this crash is fixed in 3.0-b7 (see stripe.com/docs/terminal/features/operate-offline/collect-payments for latest private beta podspec URL) and 2.20.1+.