iOS 8.x SDK App crashes on background task app start in -[UINavigationBar layoutSubviews] by gpus_ReturnNotPermittedKillClient

Originator:JSM_2001
Number:rdar://20423016 Date Originated:03-Apr-2015 05:18 PM
Status:Open Resolved:
Product: Product Version:
Classification: Reproducible:
 
Our top reported crash at the moment is due to a background crash that appears to be caused by UINavigationBar attempting to create a GL surface while it is in the background. In the latest release, this issue has had an alarming number of instances, so we've started looking into the issue more. It is currently believed to only be an issue that impacts 32-bit devices running iOS 8.

We've found a post on the apple dev forums that we believe describes other users hitting this same issue:
https://devforums.apple.com/thread/246744?tstart=0

Steps to Reproduce: (Closest guess to the repro)
1. Have the app backgrounded
2. The app requires "background fetch" capability
3. The app gets restored by iOS at background fetch time
4. On launch, the app attempts to load the default UI, which contains a UINavigationBar

Expected Results:
The app shouldn't crash when being launched in the background.

Actual Results:
The app crashes with gpus_ReturnNotPermittedKillClient.

Version:
iOS 8.x

Configuration:
32-bit iOS devices

Stack:
Thread : Crashed: com.apple.main-thread
0  libGPUSupportMercury.dylib     0x2b6448fe gpus_ReturnNotPermittedKillClient
1  libGPUSupportMercury.dylib     0x2b6453cb gpusSubmitDataBuffers
2  libGPUSupportMercury.dylib     0x2b645249 gldCreateContext
3  GLEngine                       0x2709391b gliCreateContextWithShared
4  OpenGLES                       0x2716fab3 -[EAGLContext initWithAPI:properties:] + 406
5  CoreImage                      0x24d7da8b ___ZN2CI11can_use_gpuEv_block_invoke + 142
6  libdispatch.dylib              0x32b3d2cf _dispatch_client_callout + 22
7  libdispatch.dylib              0x32b3df13 dispatch_once_f + 62
8  CoreImage                      0x24d7d9fb CI::can_use_gpu() + 98
9  CoreImage                      0x24cfbb79 +[CIContext contextWithOptions:] + 188
10 CoreUI                         0x2a55760f CreateSharedCIContext + 78
11 libsystem_pthread.dylib        0x32ca6d5f __pthread_once_handler + 50
12 libsystem_platform.dylib       0x32c9f867 _os_once + 42
13 libsystem_pthread.dylib        0x32ca4f1b pthread_once + 50
14 CoreUI                         0x2a5575b1 +[CUIShapeEffectStack sharedCIContext] + 28
15 CoreUI                         0x2a55e9c7 -[CUICatalog imageByStylingImage:stylePresetName:styleConfiguration:foregroundColor:scale:] + 82
16 UIKit                          0x27ed8bcb -[UIImage _imageWithStylePresets:withTintColor:] + 542
17 UIKit                          0x27c66665 -[UIImageView _setImageViewContents:] + 1076
18 UIKit                          0x27c65da5 +[UIView(Animation) performWithoutAnimation:] + 72
19 UIKit                          0x27f58efd -[UIImageView _updateImageViewForOldImage:newImage:] + 676
20 UIKit                          0x27c657b7 -[UIImageView setImage:] + 266
21 UIKit                          0x27cffd85 -[UINavigationBar _updateBackIndicatorImage] + 348
22 UIKit                          0x27ce3ccb -[UINavigationBar layoutSubviews] + 2514
23 App                            0x0039901f
24 UIKit                          0x27c567ff -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 514
25 QuartzCore                     0x2767c835 -[CALayer layoutSublayers] + 136
26 QuartzCore                     0x2767820d CA::Layer::layout_if_needed(CA::Transaction*) + 360
27 UIKit                          0x27c68f77 -[UIView(Hierarchy) layoutBelowIfNeeded] + 138
28 UIKit                          0x27c65da5 +[UIView(Animation) performWithoutAnimation:] + 72
29 UIKit                          0x27ce2b2d -[UINavigationController _positionNavigationBarHidden:edge:initialOffset:] + 788
30 UIKit                          0x27ce27cb -[UINavigationController _positionNavigationBarHidden:edge:] + 202
31 UIKit                          0x27ce1f49 -[UINavigationController setNavigationBar:] + 800
32 UIKit                          0x27f4aacb -[UINavigationController _navigationBarHiddenByDefault:] + 142
33 App                            0x00399e5d
34 App                            0x00399adf
35 App                            0x005adf77
36 App                            0x005da203
37 App                            0x000f7577
38 App                            0x0071f38b
39 App                            0x000f690b
40 App                            0x007203a9
41 App                            0x0071f039
42 UIKit                          0x27c6eb1f -[UIViewController _setViewAppearState:isAnimating:] + 438
43 CoreFoundation                 0x2466846d __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 48
44 CoreFoundation                 0x246614c3 -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 234
45 UIKit                          0x27c6ec9b -[UIViewController _setViewAppearState:isAnimating:] + 818
46 CoreFoundation                 0x2466846d __53-[__NSArrayI enumerateObjectsWithOptions:usingBlock:]_block_invoke + 48
47 CoreFoundation                 0x246614c3 -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 234
48 UIKit                          0x27c6ec9b -[UIViewController _setViewAppearState:isAnimating:] + 818
49 App                            0x006ff9ef
50 App                            0x006fea41
51 App                            0x006ff0f3
52 App                            0x0097d94d
53 App                            0x0097d759
54 libdispatch.dylib              0x32b3d2e3 _dispatch_call_block_and_release + 10
55 libdispatch.dylib              0x32b3d2cf _dispatch_client_callout + 22
56 libdispatch.dylib              0x32b40d2f _dispatch_main_queue_callback_4CF + 1330
57 CoreFoundation                 0x24702619 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
58 CoreFoundation                 0x24700d19 __CFRunLoopRun + 1512
59 CoreFoundation                 0x2464e3b1 CFRunLoopRunSpecific + 476
60 CoreFoundation                 0x2464e1c3 CFRunLoopRunInMode + 106
61 GraphicsServices               0x2bc7b201 GSEventRunModal + 136
62 UIKit                          0x27cb843d UIApplicationMain + 1440
63 App                            0x000ecd4b

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!