Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

iOS Cardboard build crashes on launch

Discussion in 'AR/VR (XR) Discussion' started by reddo, Feb 20, 2018.

  1. reddo

    reddo

    Joined:
    Jul 1, 2015
    Posts:
    39
    Unity iOS app for Google Cardboard crashing. It builds out ok in XCode but crashes on launch.
    Android version deploys fine.

    Using:
    • Google VR SDK version: 1.120.0
    • Unity version: 2017.3.1p1
    To reproduce the issue:
    1. In Unity build settings include HelloVR include demo scene and build project for iOS
    2. Open *.xcworkspace file in Xcode
    3. Build and run

    In XCode, a line of code in main.mm comes up with a Thread 1:signal SIGABRT error

    UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String: AppControllerClassName]);

    Console Log:

    2018-02-17 15:58:48.777601+0800 CirclescapesiOSTest[301:20710] [DYMTLInitPlatform] platform initialization successful
    2018-02-17 15:58:49.030654+0800 CirclescapesiOSTest[301:20630] -> registered mono modules 0x1424560
    -> applicationDidFinishLaunching()
    2018-02-17 15:58:49.585051+0800 CirclescapesiOSTest[301:20630] Metal GPU Frame Capture Enabled
    2018-02-17 15:58:49.586083+0800 CirclescapesiOSTest[301:20630] Metal API Validation Disabled
    -> applicationDidBecomeActive()
    Renderer: PowerVR SGX 543
    Vendor: Imagination Technologies
    Version: OpenGL ES 2.0 IMGSGX543-129
    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 ; Context level <OpenGL ES 2.0> ; Context handle 359056256
    Initialize engine version: 2017.3.1p1 (6c5ba423732e)
    WARNING: 0:4: extension 'GL_EXT_frag_depth' is not supported
    ERROR: 0:38: Use of undeclared identifier 'gl_FragDepthEXT'

    Note: Creation of internal variant of shader 'Hidden/Internal-MotionVectors' failed.
    WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/BlitToDepth' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/BlitToDepth' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/BlitToDepth_MSAA' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/BlitToDepth_MSAA' - Setting to default shader.
    WARNING: 0:4: extension 'GL_EXT_frag_depth' is not supported
    ERROR: 0:14: Use of undeclared identifier 'gl_FragDepthEXT'

    Note: Creation of internal variant of shader 'Hidden/BlitCopyWithDepth' failed.
    WARNING: Shader Unsupported: 'Hidden/BlitCopyWithDepth' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/BlitCopyWithDepth' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/VR/BlitTexArraySlice' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/VR/BlitTexArraySlice' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/VR/BlitTexArraySliceToDepth' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/VR/BlitTexArraySliceToDepth' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/VR/BlitTexArraySliceToDepth_MSAA' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/VR/BlitTexArraySliceToDepth_MSAA' - Setting to default shader.
    2018-02-17 15:58:51.743081+0800 CirclescapesiOSTest[301:20630] INFO [vr/gvr/capi/src/gvr.cc:115] Initialized GVR version 1.100.0
    2018-02-17 15:58:52.402158+0800 CirclescapesiOSTest[301:20630] Uncaught exception: UIApplicationInvalidInterfaceOrientation: Supported orientations has no common orientation with the application, and [UnityLandscapeRightOnlyViewController shouldAutorotate] is returning YES
    (
    0 CoreFoundation 0x1c0f3b55 + 152
    1 libobjc.A.dylib 0x1b37b067 objc_exception_throw + 38
    2 CoreFoundation 0x1c0f3a85 + 0
    3 UIKit 0x213980b9 + 760
    4 UIKit 0x213a0e67 + 34
    5 UIKit 0x213a0e07 + 124
    6 UIKit 0x2139f427 + 510
    7 UIKit 0x21322aeb + 1242
    8 UIKit 0x21321ee5 + 124
    9 Foundation 0x1c992983 + 262
    10 UIKit 0x21321d8d + 742
    11 UIKit 0x2132d27f + 1640
    12 UIKit 0x2132cc03 + 730
    13 CirclescapesiOSTest 0x00045c45 -[UnityAppController(ViewHandling) showGameUI] + 112
    14 CirclescapesiOSTest 0x00042c7b -[UnityAppController startUnity:] + 210
    15 Foundation 0x1ca2606f __NSFireDelayedPerform + 458
    16 CoreFoundation 0x1c0b0637 + 14
    17 CoreFoundation 0x1c0b0339 + 832
    18 CoreFoundation 0x1c0afd37 + 188
    19 CoreFoundation 0x1c0addd5 + 780
    20 CoreFoundation 0x1c0011af CFRunLoopRunSpecific + 470
    21 CoreFoundation 0x1c000fd1 CFRunLoopRunInMode + 104
    22 GraphicsServices 0x1d7abb41 GSEventRunModal + 80
    23 UIKit 0x21389a53 UIApplicationMain + 150
    24 CirclescapesiOSTest 0x00028fbf main + 206
    25 libdyld.dylib 0x1b7ee4eb + 2
    )
    (lldb)


    Any workarounds for this?
     
  2. Deleted User

    Deleted User

    Guest

    Your log looks pretty obvious on what's problematic in the app...

    WARNING: 0:4: extension 'GL_EXT_frag_depth' is not supported
    ERROR: 0:38: Use of undeclared identifier 'gl_FragDepthEXT'

    Note: Creation of internal variant of shader 'Hidden/Internal-MotionVectors' failed.
    WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/BlitToDepth' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/BlitToDepth' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/BlitToDepth_MSAA' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/BlitToDepth_MSAA' - Setting to default shader.
    WARNING: 0:4: extension 'GL_EXT_frag_depth' is not supported
    ERROR: 0:14: Use of undeclared identifier 'gl_FragDepthEXT'

    Note: Creation of internal variant of shader 'Hidden/BlitCopyWithDepth' failed.
    WARNING: Shader Unsupported: 'Hidden/BlitCopyWithDepth' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/BlitCopyWithDepth' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/VR/BlitTexArraySlice' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/VR/BlitTexArraySlice' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/VR/BlitTexArraySliceToDepth' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/VR/BlitTexArraySliceToDepth' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/VR/BlitTexArraySliceToDepth_MSAA' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/VR/BlitTexArraySliceToDepth_MSAA' - Setting to default shader.

    Try using standard or mobile shaders and changing the graphics API in your player settings.

    Or else, build an empty scene (default skybox + default cube) and, if you don't get any errors, debug by adding in parts by parts of your other scene.
     
  3. reddo

    reddo

    Joined:
    Jul 1, 2015
    Posts:
    39
    Same errors building empty scene with cube and only internal XR support with no extra GoogleVR SDK imported.
    Same shader errors as well.
    An extra point I noticed is the AppControllerClassName points to the GvrAudioAppController. See screenshot.

    Am wondering if this has to do with deprecation of GvrAudio components as stated in the release notes - https://github.com/googlevr/gvr-unity-sdk/releases
     

    Attached Files:

  4. reddo

    reddo

    Joined:
    Jul 1, 2015
    Posts:
    39
    The error went away by only selecting Landscape Right in Device Orientation in XCode. It used to be Landscape Left for Cardboard build???

    Worked it out after spotting this in the debug log

    Uncaught exception: UIApplicationInvalidInterfaceOrientation: Supported orientations has no common orientation with the application, and [UnityLandscapeRightOnlyViewController shouldAutorotate] is returning YES
    (