- Home /
iOS 8.1.3 - Upgrading to 4.5.5p5 causes App to crash when presenting render buffer
Brief Since upgrading unity to 4.5.5p5 from 4.5.4p1 our application crashes during initialisation on a subset of iOS 8.1.3 devices
it also occurs on the iOS 8.2 beta and upgrading unity 4.6.1p4 does not fix the issue
Known affected devices iPhone 6, iPad Air, iPad Air 2 - when running iOS 8.1.3/8.2, all previous os's run without issue
Known un-affected devices iPhone 6+, iPhone 5c
Callstack + Register Dump
* thread #1: tid = 0x2307a, 0x336ef8ae libGPUSupportMercury.dylib`gpus_ReturnContextErrorKillClient + 10, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1)
frame #0: 0x336ef8ae libGPUSupportMercury.dylib`gpus_ReturnContextErrorKillClient + 10
frame #1: 0x336f03ca libGPUSupportMercury.dylib`gpusSubmitDataBuffers + 110
frame #2: 0x2f42f388 GLEngine`gliPresentViewES_Exec + 180
frame #3: 0x2f42f2ba GLEngine`gliPresentViewES + 70
frame #4: 0x2f43a064 OpenGLES`-[EAGLContext presentRenderbuffer:] + 60
frame #5: 0x02604fc6 libglInterpose.dylib`EAGLContext_presentRenderbuffer(EAGLContext*, objc_selector*, unsigned int) + 354
* frame #6: 0x010e1aa8 XXXX`-[DisplayConnection present](self=0x155a2980, _cmd=0x30705d0f) + 560 at DisplayManager.mm:207
frame #7: 0x0112266c XXXX`-[UnityAppController(self=0x1555dac0, _cmd=0x01deaf0a, frameStats=0x02434628) callbackPresent:] + 168 at UnityAppController+Rendering.mm:79
frame #8: 0x011227dc XXXX`PresentContext_UnityCallback(unityFrameStats=0x02434628) + 76 at UnityAppController+Rendering.mm:104
frame #9: 0x01461568 XXXX`PresentContextGLES() + 324 at LibEntryPoint.mm:824
frame #10: 0x014e199c XXXX`GfxDeviceGLES20::PresentFrame(this=0x00000000) + 12 at GfxDeviceGLES20.cpp:1783
frame #11: 0x014e3c10 XXXX`GfxDevice::PresentFrame(this=<unavailable>, =<unavailable>) + 20 at GfxDevice.h:483
frame #12: 0x0164eaac XXXX`PresentFrame() + 56 at Player.cpp:1446
frame #13: 0x0164eafc XXXX`PresentAndSync() + 64 at Player.cpp:1463
frame #14: 0x0164eb88 XXXX`PresentAfterDraw(presentMode=<unavailable>) + 56 at Player.cpp:1500
frame #15: 0x0164f64c XXXX`PlayerLoop(batchMode=false, performRendering=true, pHookEvt=<unavailable>) + 2332 at Player.cpp:2030
frame #16: 0x01460678 XXXX`UnityPlayerLoop + 36 at LibEntryPoint.mm:239
frame #17: 0x01122298 XXXX`-[UnityAppController(self=0x1555dac0, _cmd=0x01de72a8) repaint] + 560 at UnityAppController+Rendering.mm:55
frame #18: 0x0112200c XXXX`-[UnityAppController(self=0x1555dac0, _cmd=0x01deae8c) repaintDisplayLink] + 196 at UnityAppController+Rendering.mm:34
frame #19: 0x02604182 libglInterpose.dylib`-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 270
frame #20: 0x2f98b802 QuartzCore`CA::Display::DisplayLinkItem::dispatch() + 98
frame #21: 0x2f98b66a QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 366
frame #22: 0x3420a82a IOMobileFramebuffer`IOMobileFramebufferVsyncNotifyFunc + 90
frame #23: 0x2d97d4e0 IOKit`IODispatchCalloutFromCFMessage + 256
frame #24: 0x2ca0d0a4 CoreFoundation`__CFMachPortPerform + 132
frame #25: 0x2ca1d572 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34
frame #26: 0x2ca1d50e CoreFoundation`__CFRunLoopDoSource1 + 346
frame #27: 0x2ca1bb10 CoreFoundation`__CFRunLoopRun + 1608
frame #28: 0x2c9693c0 CoreFoundation`CFRunLoopRunSpecific + 476
frame #29: 0x2c9691d2 CoreFoundation`CFRunLoopRunInMode + 106
frame #30: 0x33cfe0a8 GraphicsServices`GSEventRunModal + 136
frame #31: 0x2ff777b0 UIKit`UIApplicationMain + 1440
frame #32: 0x0000b1e4 XXXX`main(argc=1, argv=0x02436ad0) + 308 at main.mm:37
General Purpose Registers:
r4 = 0x155a2998
r5 = 0x00000018
r6 = 0x000001a4
r7 = 0x024345f8
r8 = 0x021d6c30 XXXX.__DATA.__bss + 1076000
r10 = 0x00000001
r11 = 0x00000000
sp = 0x024344e0
lr = 0x010e1aa8 XXXX`-[DisplayConnection present] + 560 at DisplayManager.mm:207
pc = 0x010e1aa8 XXXX`-[DisplayConnection present] + 560 at DisplayManager.mm:207
cpsr = 0x20000030
6 registers were unavailable.
Useful Logs - From affected iPad Air 2
Requesting Resolution: 2048x1536
Renderer: Apple A8X GPU
Vendor: Apple Inc.
Version: OpenGL ES 2.0 Apple A8X GPU - 50.6.11
GL_OES_depth_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_vertex_array_object GL_EXT_blend_minmax GL_EXT_color_buffer_half_float GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_draw_instanced GL_EXT_instanced_arrays GL_EXT_map_buffer_range GL_EXT_occlusion_query_boolean GL_EXT_pvrtc_sRGB GL_EXT_read_format_bgra GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_texture_lod GL_EXT_shadow_samplers GL_EXT_sRGB GL_EXT_texture_filter_anisotropic GL_EXT_texture_rg GL_EXT_texture_storage GL_APPLE_clip_distance GL_APPLE_color_buffer_packed_float GL_APPLE_copy_texture_levels GL_APPLE_framebuffer_multisample GL_APPLE_rgb_422 GL_APPLE_sync GL_APPLE_texture_format_BGRA8888 GL_APPLE_texture_max_level GL_APPLE_texture_packed_float GL_IMG_read_format GL_IMG_texture_comp
ression_pvrtc
Creating OpenGLES2.0 graphics device
Initialize engine version: 4.5.5p5 (a9cacae7f864)
...
Shader warmup: 66 shaders 98 combinations 0.016s
Known Fixes
Stopping QualitySettings.antiAliasing being changed at runtime, we do this once during our applications initialisation; this causes AA to be disabled which isn't really a suitable solution
Removing the call to Shader.WarmUpAllShaders() - the crash seems to occur within the proximity of this function exiting.
Calling Shader.WarmUpAllShaders() but with only a subset of our shaders loaded, I have tried to identify what the shaders that cause the issue have in common but to no avail.
disabling the force GLES 2.0 player setting - thus allowing the affected devices to run in GLES 3.0 mode
Notes I think the iOS 8.1.3 update introduces changes to graphics drivers for a specific set of Apple devices, this coupled with our shaders on this particular unity version is causing a bug to occur within the new drivers.
We have another application which is similar in scale, design and shader usage and it is unaffected.
Instruments does not shed any light on the issue
Questions
Is their a path of investigation that I should be pursuing that might help identify the issue?
Does anyone have any ideas what might be causing the issue?
Hi, does upgrading to the 4.6.2 full release fix the issue?
upgrading to this version of unity is not on our agenda for the next couple of months due to concern over the deltas the IL2CPP and 64 bit support will introduce.
If I haven't rooted out the cause before we do this upgrade i'll let you know.
Your answer
Follow this Question
Related Questions
How to Upload a video from Android/iOS to a server without using WWW ? 3 Answers
Getting Error building Player: Exception: Invalid PBX project (parsing line 0) 0 Answers
iOS 64-bit support for unity integrated application 0 Answers
IOS app not initialising 0 Answers
Is OpenGL Causing a "applicationDidReceiveMemoryWarning" Crash? (version 4.1.2f1) 0 Answers