- Home /
IL2CPP Crash on OpenGL graphics device creation
Hello!
The question is pretty much in the title. I finished my game and was ready to submit it for review but got an error stating that the app has to also be in 64-bit mode.
Well after some research it is now, but I can't run it on my iPhone 4s. The game freezes after it tries to proceed from the splash screen. The last lines in Xcode are:
ression_pvrtc OPENGL LOG: Creating OpenGL ES 2.0 graphics device (lldb)
EDIT:
These are the last lines before it freezes:
applicationDidBecomeActive() Requesting Resolution: 960x640 Renderer: PowerVR SGX 543 Vendor: Imagination Technologies Version: OpenGL ES 2.0 IMGSGX543-115.5 GLES: 2 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 OPENGL LOG: Creating OpenGL ES 2.0 graphics device (lldb)
The reason: I get Thread 1: EXC_BAD_ACCESS (code=1, address=0x103c) for:
extern "C" bool AllocateRenderBufferStorageFromEAGLLayer(void* eaglContext, void* eaglLayer)
{
return [(__bridge EAGLContext*)eaglContext renderbufferStorage:GL_RENDERBUFFER fromDrawable:(__bridge CAEAGLLayer*)eaglLayer];
}
In AllocateRenderBufferStorageFromEAGLLayer.
I'll be thankful if anybody is able to help me.
This specific error message seems to be unrelated to 32-bit or 64-bit options. Note that as long as you are building using the Universal option for the Architecture setting in the Unity editor Player Settings, the app should work on a 32-bit device (like the iPhone 4s). Can you see where the game actually freezes in Xcode? Check out this blog post for some Xcode debugging ideas:
http://blogs.unity3d.com/2015/05/20/il2cpp-internals-debugging-tips-for-generated-code/
Yes it is set to universal. I just thought that IL2CPP had some device restrictions since http://docs.unity3d.com/$$anonymous$$anual/iphone-64bit.html states that:
"You need 64 bit capable device to test on. These are all iOS devices with A7 or later chip (currently these are: iPhone 5S, iPad Air, iPad $$anonymous$$ini Retina, iPhone 6, iPhone 6 Plus, iPad $$anonymous$$ini 3, iPad Air 2)."
Everything looks fine in those player settings. $$anonymous$$aybe that documentation is a bit misleading. It should indicate that a 64-bit device is necessary to test the 64-bit slice of the executable. But a 32-bit device will work fine as well.
Our iOS $$anonymous$$m mentioned that this looks similar to an iOS 8.4/Xcode 6.4 problem that has been reported else where as well. Are you using iOS 8.4 on this device? We are investigating why the problem happens and are looking for a fix.
Answer by JoshPeterson · Jul 07, 2015 at 03:19 PM
As we worked out in the comments, it looks like this was a problem with iOS 8.3 Upgrading to iOS 8.4 corrected the issue.
Is the issue fixed, if yes on which version of unity3D is it fixed?
I have the exact issue except for me it's happening on iOS 8.4 also
I have updated to Unity3D 5.1.2 and still seeing the issue even on my iPhone 5 with iOS 8.4
If the suggestion from @es$$anonymous$$ju does not work, can you submit a bug report on this issue? Based on what I've heard from our iOS $$anonymous$$m, this should be corrected on iOS 8.4.
$$anonymous$$y app was approved by app store and is now fully published but still finding that it crashes on iphone 4s even when the phone is running 8.4 update. any word on this issue?
Answer by esKju · Aug 03, 2015 at 01:42 PM
Try to export your project as OTA instead of exporting to your connected device via xcode :)
Answer by ravoorinandan · Feb 24, 2016 at 05:49 PM
Please refer below link for the solution. http://stackoverflow.com/questions/31398961/exc-bad-access-at-lauch-for-eaglcontext-renderbufferstorage-fromdrawable-in-co/31483927#comment51270815_31483927