flutter-plugins
flutter-plugins copied to clipboard
app crash issue only on iPad with package 'pedometer'
Device / Emulator and OS
- Device: iPad Air (5th generation)
- OS: iOS 17.6.1
My app works fine with my device but iOS review keeps rejecting my app since it crash when app is on launch.
crash report that they sent me is below:
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: FRONTBOARD 2343432205
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-create watchdog transgression: app<com.chungchunon.chungchunon-ios(6C7CB146-DE35-4870-8CC5-7D42DD004FE1)>:20314 exhausted real (wall clock) time allowance of 19.65 seconds
ProcessVisibility: Foreground
ProcessState: Running
WatchdogEvent: scene-create
WatchdogVisibility: Foreground
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 96.850 (user 64.490, system 32.360), 59% CPU",
"Elapsed application CPU time (seconds): 0.316, 0% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x1e0d4d6c8 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x1e0d50ec8 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x1e0d50de0 mach_msg_overwrite + 436
3 libsystem_kernel.dylib 0x1e0d50c20 mach_msg + 24
4 libdispatch.dylib 0x1a001db18 _dispatch_mach_send_and_wait_for_reply + 544
5 libdispatch.dylib 0x1a001deb8 dispatch_mach_send_with_result_and_wait_for_reply + 60
6 libxpc.dylib 0x1f4b81ac8 xpc_connection_send_message_with_reply_sync + 264
7 LocationSupport 0x1b782a818 CLConnection::sendMessageSync(std::__1::shared_ptr<CLConnectionMessage>, bool) + 168
8 LocationSupport 0x1b782a708 CLConnectionClient::sendMessageSync(std::__1::shared_ptr<CLConnectionMessage>, bool) + 120
9 CoreMotion 0x1a51f5830 0x1a4e31000 + 3950640
10 CoreMotion 0x1a51f571c 0x1a4e31000 + 3950364
11 CoreMotion 0x1a51f613c 0x1a4e31000 + 3952956
12 CoreMotion 0x1a4e41650 0x1a4e31000 + 67152
13 CoreMotion 0x1a4e33f1c 0x1a4e31000 + 12060
14 pedometer 0x105efcd68 @objc StepDetector.init() + 92
15 pedometer 0x105efce74 specialized static SwiftPedometerPlugin.register(with:) + 52
16 pedometer 0x105efc050 @objc static SwiftPedometerPlugin.register(with:) + 32
17 Runner 0x104488588 +[GeneratedPluginRegistrant registerWithRegistry:] (in Runner) (GeneratedPluginRegistrant.m:258) + 34184
18 Runner 0x1044888b8 AppDelegate.application(_:didFinishLaunchingWithOptions:) (in Runner) (AppDelegate.swift:14) + 35000
19 Runner 0x1044889c4 @objc AppDelegate.application(_:didFinishLaunchingWithOptions:) (in Runner) (<compiler-generated>:0) + 35268
20 UIKitCore 0x19a821bac -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 320
21 UIKitCore 0x19a81f0e8 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 2856
22 UIKitCore 0x19a6ed99c -[UIApplication _runWithMainScene:transitionContext:completion:] + 856
23 UIKitCore 0x19a6a0ad8 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 132
24 UIKitCore 0x19a593708 _UIScenePerformActionsWithLifecycleActionMask + 112
25 UIKitCore 0x19a766488 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 216
26 UIKitCore 0x19a766198 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 220
27 UIKitCore 0x19a4f5360 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 608
28 UIKitCore 0x19a4c2594 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 248
29 UIKitCore 0x19a4c1ebc __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 148
30 UIKitCore 0x19a4c1868 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 736
31 UIKitCore 0x19a4c0ea8 _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 224
32 UIKitCore 0x19a594c80 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 316
33 UIKitCore 0x19a5934b8 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.226 + 612
34 UIKitCore 0x19a592e10 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 216
35 UIKitCore 0x19a65df48 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 244
36 UIKitCore 0x19a65aaac -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 508
37 UIKitCore 0x19a65a6cc -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 288
38 FrontBoardServices 0x1b0eea974 -[FBSScene _callOutQueue_didCreateWithTransitionContext:completion:] + 324
39 FrontBoardServices 0x1b0eea808 __92-[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:]_block_invoke.108 + 280
40 FrontBoardServices 0x1b0ee66cc -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 168
41 FrontBoardServices 0x1b0eeacc4 __92-[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:]_block_invoke + 352
42 libdispatch.dylib 0x1a0002dd4 _dispatch_client_callout + 20
43 libdispatch.dylib 0x1a000686c _dispatch_block_invoke_direct + 288
44 FrontBoardServices 0x1b0ee7d58 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 52
45 FrontBoardServices 0x1b0ee7cd8 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 240
46 FrontBoardServices 0x1b0ee7bb0 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 28
47 CoreFoundation 0x19812f834 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
48 CoreFoundation 0x19812f7c8 __CFRunLoopDoSource0 + 176
49 CoreFoundation 0x19812d2f8 __CFRunLoopDoSources0 + 340
50 CoreFoundation 0x19812c484 __CFRunLoopRun + 828
51 CoreFoundation 0x19812bcd8 CFRunLoopRunSpecific + 608
52 GraphicsServices 0x1dcb791a8 GSEventRunModal + 164
53 UIKitCore 0x19a765ae8 -[UIApplication _run] + 888
54 UIKitCore 0x19a819d98 UIApplicationMain + 340
55 Runner 0x104488aa0 main (in Runner) (AppDelegate.swift:6) + 35488
56 dyld 0x1bb903154 start + 2356
ChatGPT advised me regarding above crash log:
Here are some key points to consider based on the crash log:
CoreMotion Involvement: The stack trace shows that the crash involves CoreMotion, specifically in methods like CLConnection::sendMessageSync and StepDetector.init(). It suggests that the crash is related to the use of the pedometer or motion-related features within your app.
Synchronous XPC Communication: The crash occurs during synchronous XPC communication, as indicated by calls to xpc_connection_send_message_with_reply_sync. XPC is often used for communication between different processes or system services, such as Location Services.
Plugin Registration: The crash occurs during the registration of the SwiftPedometerPlugin, which could suggest that there is an issue with how the plugin interacts with CoreMotion or other system services during app launch.
So I guess this issue caused by package pedometer.
But I have used package pedometer ^4.6.1 for a long time, but all of sudden this issue happens even only on iPad.
Moreover when I run iPad Air 5th generation as simulator, it works fine.
So I assume that OS version which is iOS 17.6.1 causes error.
But Xcode version 15.4 doesn't support 17.6.1 only support until 17.5.
I tested with 17.5. OS.