iOS 8上的神秘崩溃

我正在使用这个堆栈跟踪在iOS 8上收到很多崩溃报告:
Date/Time:       2014-09-17T20:26:15Z
OS Version:      iPhone OS 8.0 (12A365)
Report Version:  104

Exception Type:  SIGSEGV
Exception Codes: SEGV_ACCERR at 0x1
Crashed Thread:  0

Thread 0 Crashed:
0   libGPUSupportMercury.dylib           0x2a4f88fe gldGetBufferAllocationIdentifiers + 194
1   libGPUSupportMercury.dylib           0x2a4f93cb gpusSubmitDataBuffers + 108
2   libGPUSupportMercury.dylib           0x2a4f9249 gldCreateContext + 206
3   GLEngine                             0x2613c93b gliCreateContextWithShared + 600
4   OpenGLES                             0x26218ab3 glGetFramebufferParameteriAPPLE + 776
5   CoreImage                            0x23e88b8b 0x23dea000 + 650123
6   libdispatch.dylib                    0x314558b7 0x31454000 + 6327
7   libdispatch.dylib                    0x314564fb dispatch_once_f + 60
8   CoreImage                            0x23e88afb 0x23dea000 + 649979
9   CoreImage                            0x23e06c79 0x23dea000 + 117881
10  CoreUI                               0x29478837 CUIEqualRenditionKeysIgnoringAttribute + 71800
11  libsystem_pthread.dylib              0x315b9dcf sched_get_priority_min + 64
12  libsystem_platform.dylib             0x315b2867 _os_once + 40
13  libsystem_pthread.dylib              0x315b7f8b pthread_once + 48
14  CoreUI                               0x294787d9 CUIEqualRenditionKeysIgnoringAttribute + 71706
15  CoreUI                               0x2947faf7 CUIEqualRenditionKeysIgnoringAttribute + 101176
16  UIKit                                0x26f649db _UIGraphicsEndLetterpressWithStyle + 20792
17  UIKit                                0x26cf2875 UIGraphicsEndImageContext + 7838
18  UIKit                                0x26cf1fb5 UIGraphicsEndImageContext + 5598
19  UIKit                                0x26fe3db9 _UINavigationButtonUpdateAccessibilityBackgroundsForBlendMode + 287838
20  UIKit                                0x26cf19c7 UIGraphicsEndImageContext + 4080
21  UIKit                                0x26d8c1b1 UICeilToViewScale + 55778
22  UIKit                                0x26d70143 _UIBarHairlineShadowColorForBarStyle + 10164
23  UIKit                                0x26ce2b37 0x26cd6000 + 52023
24  QuartzCore                           0x2670accd CABackingStoreGetTypeID + 894
25  QuartzCore                           0x267066b5 CARenderServerGetServerPort + 5366
26  UIKit                                0x26cf5183 UIGraphicsGetImageFromCurrentImageContext + 2068
27  UIKit                                0x26cf1fb5 UIGraphicsEndImageContext + 5598
28  UIKit                                0x26d6efc5 _UIBarHairlineShadowColorForBarStyle + 5686
29  UIKit                                0x26d6ec63 _UIBarHairlineShadowColorForBarStyle + 4820
30  UIKit                                0x26d6e3cd _UIBarHairlineShadowColorForBarStyle + 2622
31  UIKit                                0x26fd5a6f _UINavigationButtonUpdateAccessibilityBackgroundsForBlendMode + 229652
32  UIKit                                0x26d6b837 _UIAccessibilityReduceMotion + 16948
33  UIKit                                0x26ce53d9 _UIApplicationLinkedOnOrAfter + 2526
34  UIKit                                0x26ce535d _UIApplicationLinkedOnOrAfter + 2402
35  UIKit                                0x26d6b24d _UIAccessibilityReduceMotion + 15434
36  UIKit                                0x26fd7ef9 _UINavigationButtonUpdateAccessibilityBackgroundsForBlendMode + 239006
37  UIKit                                0x26d6b0b3 _UIAccessibilityReduceMotion + 15024
38  UIKit                                0x26dc516f UIRectIntegralWithScale + 1040
39  Pogoplug                             0x001bccc9 __41-[InitialSlidingViewController didSignIn]_block_invoke (InitialSlidingViewController.m:216)
40  libdispatch.dylib                    0x314558cb 0x31454000 + 6347
41  libdispatch.dylib                    0x314558b7 0x31454000 + 6327
42  libdispatch.dylib                    0x314590bf _dispatch_main_queue_callback_4CF + 720
43  CoreFoundation                       0x2380dbe9 CFRunLoopTimerSetTolerance + 3370
44  CoreFoundation                       0x2380c2e9 _CFRunLoopGet2b + 2926
45  CoreFoundation                       0x2375a621 CFRunLoopRunSpecific + 474
46  CoreFoundation                       0x2375a433 CFRunLoopRunInMode + 104
47  GraphicsServices                     0x2ab080a9 GSEventRunModal + 134
48  UIKit                                0x26d44809 UIApplicationMain + 1438
49  Pogoplug                             0x0012c4bf main (main.m:11)
50  libdyld.dylib                        0x31475aaf _tlv_atexit + 8

任何可能出错的线索将不胜感激.
这里216行

MenuViewController *menuVC = [[MenuViewController alloc] initWithNibName:nil bundle:nil];
NavControllerPortrait *navController = [[NavControllerPortrait alloc] initWithRootViewController:menuVC];

主要在iPhone 5和iPad 3 gen(不确定它限于这些设备).

更多信息
另一个崩溃发生频率较低的类似堆栈跟踪并由此代码引起:

CELoginViewController *loginVC = [[CELoginViewController alloc] initWithNibName:nil bundle:nil];
NavControllerPortrait *nav = [[NavControllerPortrait alloc] initWithRootViewController:loginVC];

所以我强烈怀疑或我的定制UINavigationController或苹果的变化.鉴于我不是唯一遇到这次崩溃的人 – 我更倾向于责怪苹果:-)

谢谢.

解决方法

我没有足够的声誉来评论和要求细节,但是我遇到了同样的问题,主要是在iPhone 5上,也是5c,4s,iPad 3和iPod 5G,我相信我要说的是即使没有回答这个问题也是有帮助的.

首先,这是当您尝试使用OpenGL绘制某些东西或调整大小或在后台移动MKMapView时发生的崩溃.在崩溃日志中可能不明显,但是我遇到的每一个崩溃报告都是应用程序在后台启动的.看起来它是一样的,考虑到UIViewController被称为InitialSlidingViewController.在我的情况下,大部分时间都是使用“重要的位置更新”,但是在您的情况下,它可能是“背景获取”或“访问”更新或“静默远程通知”.

在我的应用程序中注意到的一件事是,当它崩溃时设置导航栏,更具体地说是试图渲染图像,我已经在导航栏中绘制了图像.对于你而言,这是别的东西,但需要OpenGL的东西,也许像视差这样的运动效果,我在堆栈跟踪中看到_UIAccessibilityReduceMotion?

无论你是什么,或者我在做,事实上,它发生在一些设备上,从来没有在某些设备上,这意味着它可能是一个iOS错误.我也在我的堆栈跟踪中看到“CI :: can_use_gpu()”,它崩溃,因为它使用gpu检查是否可以使用gpu.

那么我们如何防止它崩溃?

您可以尝试禁用您正在使用的功能,对于我,我将用正确的彩色图像替换图像,而不是使用色彩.或者您可以尝试加载另一个视图控制器,也许只是一个空视图控制器,当应用程序在后台启动时,然后当它的前景与现在正在使用的视图控制器交换.

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...