Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
301 views
in Technique[技术] by (71.8m points)

iphone - App rejection - Crash report says: failed to scene-create in time (badf00d) What is wrong?

my app just got rejected by apple, and I could use some help to figure out what is wrong. The app works fine on all my devices and does not crash. The app synchronizes with iCloud right when it launches. This works fine on my devices, but maybe something is up with that.

Here is the first crash report (symbolicated):

Exception Type:  00000020
Exception Codes: 0x000000008badf00d
Highlighted Thread:  0

Application Specific Information:
com.Name.App failed to scene-create in time

Elapsed total CPU time (seconds): 9.250 (user 9.250, system 0.000), 23% CPU 
Elapsed application CPU time (seconds): 0.298, 1% CPU

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib          0x0000000192f7ceb8 semaphore_wait_trap + 8
1   libsystem_platform.dylib        0x00000001930299e0 _os_semaphore_wait + 20
2   libdispatch.dylib               0x0000000192e5e3e0 _dispatch_barrier_sync_f_slow + 516
3   Foundation                      0x0000000182aedccc -[NSUbiquitousKeyValueStore _synchronizeForced:notificationQueue:] + 248
4   Foundation                      0x0000000182aedb50 -[NSUbiquitousKeyValueStore synchronize] + 88
5   Cloud-Fryser                    0x00000001000dab08 0x1000d0000 + 43784
6   UIKit                           0x000000018645ce80 -[UIViewController loadViewIfRequired] + 688
7   UIKit                           0x0000000186512374 -[UINavigationController _layoutViewController:] + 60
8   UIKit                           0x0000000186512270 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 244
9   UIKit                           0x000000018651170c -[UINavigationController _startTransition:fromViewController:toViewController:] + 108
10  UIKit                           0x00000001865113b8 -[UINavigationController _startDeferredTransitionIfNeeded:] + 636
11  UIKit                           0x00000001865110d8 -[UINavigationController __viewWillLayoutSubviews] + 52
12  UIKit                           0x0000000186511058 -[UILayoutContainerView layoutSubviews] + 196
13  UIKit                           0x0000000186459a28 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 568
14  QuartzCore                      0x0000000185db1990 -[CALayer layoutSublayers] + 164
15  QuartzCore                      0x0000000185dac560 CA::Layer::layout_if_needed(CA::Transaction*) + 316
16  QuartzCore                      0x0000000185dac404 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 28
17  QuartzCore                      0x0000000185dabc04 CA::Context::commit_transaction(CA::Transaction*) + 272
18  QuartzCore                      0x0000000185dab988 CA::Transaction::commit() + 432
19  UIKit                           0x00000001866e7014 -[UIApplication _reportMainSceneUpdateFinished:] + 56
20  UIKit                           0x00000001866e7ec0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2776
21  UIKit                           0x00000001866e6044 -[UIApplication workspaceDidEndTransaction:] + 180
22  FrontBoardServices              0x0000000189edd63c __31-[FBSSerialQueue performAsync:]_block_invoke + 24
23  CoreFoundation                  0x0000000181c66120 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
24  CoreFoundation                  0x0000000181c65228 __CFRunLoopDoBlocks + 308
25  CoreFoundation                  0x0000000181c63428 __CFRunLoopRun + 692
26  CoreFoundation                  0x0000000181b911f0 CFRunLoopRunSpecific + 392
27  UIKit                           0x00000001864c7788 -[UIApplication _run] + 548
28  UIKit                           0x00000001864c2780 UIApplicationMain + 1484
29  Cloud-Fryser                    0x00000001000dc878 0x1000d0000 + 51320
30  libdyld.dylib                   0x0000000192e7ea04 start + 0

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x0000000192f7cc94 kevent64 + 8
1   libdispatch.dylib               0x0000000192e6497c _dispatch_mgr_invoke + 272
2   libdispatch.dylib               0x0000000192e573b0 _dispatch_mgr_thread + 48

Thread 2 name:  Dispatch queue: com.apple.sydprotection
Thread 2:
0   libsystem_kernel.dylib          0x0000000192f96e50 __open + 8
1   libsystem_kernel.dylib          0x0000000192f95dbc open + 12
2   Foundation                      0x0000000182ab1ebc _NSReadBytesFromFileWithExtendedAttributes + 132
3   Foundation                      0x0000000182ab1ddc -[NSData(NSData) initWithContentsOfFile:] + 76
4   Foundation                      0x0000000182ad87fc -[NSData(NSData) initWithContentsOfURL:] + 384
5   Foundation                      0x0000000182ab1cf0 +[NSDictionary(NSDictionary) newWithContentsOf:immutable:] + 112
6   SyncedDefaults                  0x000000018dbab224 -[SYDRemotePreferencesSource _cachePlistFromDisk] + 104
7   SyncedDefaults                  0x000000018dbabedc -[SYDRemotePreferencesSource _synchronizeForced:] + 160
8   SyncedDefaults                  0x000000018dbabdac __48-[SYDRemotePreferencesSource synchronizeForced:]_block_invoke + 36
9   libdispatch.dylib               0x0000000192e55368 _dispatch_client_callout + 12
10  libdispatch.dylib               0x0000000192e5e6e4 _dispatch_barrier_sync_f_invoke + 72
11  SyncedDefaults                  0x000000018dbabd5c -[SYDRemotePreferencesSource synchronizeForced:] + 116
12  Foundation                      0x0000000182aecc74 -[NSUbiquitousKeyValueStore synchronizeWithSourceForced:] + 32
13  Foundation                      0x0000000182aecbe0 __46-[NSUbiquitousKeyValueStore _registerToDaemon]_block_invoke + 72
14  libdispatch.dylib               0x0000000192e553a8 _dispatch_call_block_and_release + 20
15  libdispatch.dylib               0x0000000192e55368 _dispatch_client_callout + 12
16  libdispatch.dylib               0x0000000192e5f4bc _dispatch_queue_drain + 1212
17  libdispatch.dylib               0x0000000192e58470 _dispatch_queue_invoke + 128
18  libdispatch.dylib               0x0000000192e61220 _dispatch_root_queue_drain + 660
19  libdispatch.dylib               0x0000000192e62758 _dispatch_worker_thread3 + 104
20  libsystem_pthread.dylib         0x00000001930312e0 _pthread_wqthread + 812
21  libsystem_pthread.dylib         0x0000000193030fa4 start_wqthread + 0

Thread 3:
0   libsystem_kernel.dylib          0x0000000192f97c78 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x0000000193031390 _pthread_wqthread + 988
2   libsystem_pthread.dylib         0x0000000193030fa4 start_wqthread + 0

Thread 4:
0   libsystem_kernel.dylib          0x0000000192f97c78 __workq_kernreturn + 8
1   libsystem_pthread.dylib         0x0000000193031390 _pthread_wqthread + 988
2   libsystem_pthread.dylib         0x0000000193030fa4 start_wqthread + 0

Thread 5:
0   libsystem_kernel.dylib          0x0000000192f7ce7c mach_msg_trap + 8
1   libsystem_kernel.dylib          0x0000000192f7ccf4 mach_msg + 68
2   CoreFoundation                  0x0000000181c655c8 __CFRunLoopServiceMachPort + 196
3   CoreFoundation                  0x0000000181c6351c __CFRunLoopRun + 936
4   CoreFoundation                  0x0000000181b911f0 CFRunLoopRunSpecific + 392
5   CoreFoundation                  0x0000000181be32a8 CFRunLoopRun + 108
6   CoreMotion                      0x000000018258a9d4 0x182548000 + 272852
7   libsystem_pthread.dylib         0x0000000193033e7c _pthread_body + 160
8   libsystem_pthread.dylib         0x0000000193033dd8 _pthread_start + 156
9   libsystem_pthread.dylib         0x0000000193030fac thread_start + 0

Here is the second crash report:

Application Specific Information:
com.Name.App failed to scene-create in time

Elapsed total CPU time (seconds): 20.300 (user 20.300, system 0.000), 49% CPU 
Elapsed application CPU time (seconds): 0.207, 1% CPU

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0:
0   libsystem_kernel.dylib          0x0000000192f7ceb8 semaphore_wait_trap + 8
1   libdispatch.dylib               0x0000000192e62d98 _dispatch_group_wait_slow + 244
2   CloudDocs                       0x0000000188427818 -[BRXPCSyncProxy resultWithTimeout:] + 72
3   CloudDocs                       0x0000000188418bc0 __BRIsProcessForcingUbiquity_block_invoke + 172
4   libdispatch.dylib               0x0000000192e55368 _dispatch_client_callout + 12
5   libdispatch.dylib               0x0000000192e56240 dispatch_once_f + 92
6   CloudDocs                       0x0000000188418b0c BRIsProcessForcingUbiquity + 60
7   Foundation                      0x0000000182b3ad6c ___BRIsCloudDocsUsed_block_invoke + 44
8   libdispatch.dylib               0x0000000192e55368 _dispatch_client_callout + 12
9   libdispatch.dylib               0x0000000192e56240 dispatch_once_f + 92
10  Foundation                      0x0000000182b35044 ___NSFrameworkHandleForLibrarianSymbols_block_invoke + 96
11  libdispatch.dylib               0x0000000192e55368 _dispatch_client_callout + 12
12  libdispatch.dylib               0x0000000192e56240 dispatch_once_f + 92
13  Foundation                      0x0000000182b3acec ___initializeLibrarianFunctions_block_invoke + 268
14  libdispatch.dylib               0x0000000192e55368 _dispatch_client_callout + 12
15  libdispatch.dylib               0x0000000192e56240 dispatch_once_f + 92
16  Foundation                      0x0000000182b3a5b0 -[NSFileManager URLForUbiquityContainerIdentifier:] + 544
17  Cloud-Fryser                    0x000000010003dc04 -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:20)
18  UIKit                           0x00000001864ce3cc -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 300
19  UIKit                           0x00000001866e522c -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2280
20  UIKit                           0x00000001866e79ac -[UIApplication _runWithMainScene:transitionContext:completion:] + 1476
21  UIKit                           0x00000001866e6044 -[UIApplication workspaceDidEndTransaction:] + 180
22  FrontBoardServices              0x0000000189edd63c __31-[FBSSerialQueue performAsync:]_block_invoke + 24
23  CoreFoundation                  0x0000000181c66120 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
24  CoreFoundation                  0x0000000181c65228 __CFRunLoopDoBlocks + 308
25  CoreFoundation                  0x0000000181c6384c __CFRunLoopRun + 1752
26  CoreFoundation                  0x0000000181b911f0 CFRunLoopRunSpecific + 392
27  UIKit                           0x00000001864c7788 -[UIApplication _run] + 548
28  UIKit                           0x00000001864c2780 UIApplicationMain + 1484
29  Cloud-Fryser                    0x0000000100044878 main (main.m:16)
30  libdyld.dylib                   0x0000000192e7ea04 start + 0

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x0000000192f7cc94 kevent64 + 8
1   libdispatch.dylib               0x0000000192e6497c _dispatch_mgr_invoke + 272
2   libdispatch.dylib               0x0000000192e573b0 _dispatch_mgr_thread + 48

If you need additional information, just let me know.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The issue is very simple. You just spend too much time loading your app on the splash screen and the iOS device stops your app. The reason it only happens in the review and not when you test it is because you always run it from Xcode, and when running from Xcode it won't have this behavior. If you will run your app directly from the device (by tapping its icon) you will see it will happen there as well. Assuming you spent too much time loading on that specific run.

Edit: Also I am seeing that you are stuck on a semaphore and don't use too much CPU, which might mean you have a deadlock which stalls the app on the reviewer's device and that is why it spends too much time loading and the device stops your app. Not sure...

Here is my devblog post if you are interested:

http://pompidev.net/2014/11/16/ios-app-works-on-xcode-but-crash-running-from-device/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...