Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums will be revoked at the discretion of Oculus staff.
New to the forums? Click here to read the How To guide. -- Developers click here.

Unity app "closed unexpectedly"

I'm developing a gearVR mobile game using Unity, building on Samsung Note 5. After the game run and shows the Unity splash screen, it will "close unexpected" 7 out of 10 times. Anyone knows what would be the cause of this problem? Thanks a lot!

Comments

  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    Can you run "adb logcat" and share the output with me?
  • Thanks for reply. Here are the log related to my app "Bowl", from start process to being auto-killed:

    08-10 23:07:33.871  3515  4491 I ActivityManager: Start proc 4591:com.batstudio.
    Bowl/u0a280 for activity com.batstudio.Bowl/com.google.unity.GoogleUnityActivity

    08-10 23:07:33.891  3515  4046 D ActivityManager:  Launching com.batstudio.Bowl,
     updated priority
    08-10 23:07:34.061  3515  4698 D ActivityManager: post active user change for 0
    fullscreen true isFloatingActivity() false isHomeActivity() false
    08-10 23:07:34.131  3515  3639 I ActivityManager: Displayed com.batstudio.Bowl/c
    om.google.unity.GoogleUnityActivity: +268ms
    08-10 23:07:34.231  4591  4624 E Unity   : Unable to find libaudioplugingvrunity

    08-10 23:07:34.291  4591  4624 D Unity   :  GL_EXT_debug_marker GL_ARM_rgba8 GL_
    ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_
    cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra G
    L_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_sta
    ndard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_
    OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_
    vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_textu
    re_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element
    _index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_textur
    e_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_debug GL_EXT_o
    cclusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_di
    scard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_sto
    rage GL_EXT_multisampled_render_to_texture GL_OES_surfaceless_context GL_OES_tex
    ture_stencil8 GL_EXT_shade
    08-10 23:07:34.291  4591  4624 D Unity   : r_pixel_local_storage GL_ARM_shader_f
    ramebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_ARM_mali_progr
    am_binary GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_KH
    R_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_OES_texture
    _storage_multisample_2d_array GL_OES_shader_image_atomic GL_EXT_robustness GL_EX
    T_draw_buffers_indexed GL_OES_draw_buffers_indexed GL_EXT_texture_border_clamp G
    L_OES_texture_border_clamp GL_EXT_texture_cube_map_array GL_OES_texture_cube_map
    _array GL_OES_sample_variables GL_OES_sample_shading GL_OES_shader_multisample_i
    nterpolation GL_EXT_shader_io_blocks GL_OES_shader_io_blocks GL_EXT_tessellation
    _shader GL_OES_tessellation_shader GL_EXT_primitive_bounding_box GL_OES_primitiv
    e_bounding_box GL_EXT_geometry_shader GL_OES_geometry_shader GL_ANDROID_extensio
    n_pack_es31a GL_EXT_gpu_shader5 GL_OES_gpu_shader5 GL_EXT_texture_buffer GL_OES_
    texture_buffer GL_EXT_copy_image GL_OES_copy_image GL_EXT_color_buffer_half_floa
    t GL_EXT_color_buffer_floa
    08-10 23:07:34.291  4591  4624 D Unity   : t GL_OVR_multiview GL_OVR_multiview2
    GL_OVR_multiview_multisampled_render_to_texture
    08-10 23:07:34.431  3515  3639 D ActivityManager: mDVFSHelper.release()
    08-10 23:07:34.681  3515  4589 I ActivityManager: Killing 2187:com.samsung.andro
    id.sm/1000 (adj 15): DHA:empty #31
    08-10 23:07:34.691  3515  4491 D ActivityManager: isAutoRunBlockedApp:: com.sams
    ung.android.sm, Auto Run ON
    08-10 23:07:34.731  3515  4030 I ActivityManager: Start proc 4680:com.oculus.hor
    izon/u0a209 for service com.oculus.horizon/.service.SDKLoggingService
    08-10 23:07:35.121  3515  4507 D PackageManager: setEnabledSetting : userId = 0
    packageName = com.oculus.horizon cmp = com.facebook.rti.push.service.FbnsService
     newState = 1 callingPackage = 10209
    08-10 23:07:35.361  3135  3135 F DEBUG   : *** *** *** *** *** *** *** *** *** *
    ** *** *** *** *** *** ***
    08-10 23:07:35.361  3135  3135 F DEBUG   : Build fingerprint: 'samsung/nobleltej
    v/noblelte:6.0.1/MMB29K/N920CXXS2BPG1:user/release-keys'
    08-10 23:07:35.361  3135  3135 F DEBUG   : Revision: '9'
    08-10 23:07:35.361  3135  3135 F DEBUG   : ABI: 'arm'
    08-10 23:07:35.361  3135  3135 F DEBUG   : pid: 4591, tid: 4647, name: Thread-52
    66  >>> com.batstudio.Bowl <<<
    08-10 23:07:35.361  3135  3135 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL
    ), fault addr --------
    08-10 23:07:35.391  3515  4506 W ActivityManager: Permission Denial: opening pro
    vider com.samsung.android.hmt.vrsvc.provider.VRProvider from ProcessRecord{e27d7
    ab 4304:com.samsung.android.app.vrsetupwizard/u0a206} (pid=4304, uid=10206) requ
    ires com.samsung.android.hmt.permission.READ_SETTINGS or com.samsung.android.hmt
    .permission.WRITE_SETTINGS
    08-10 23:07:35.411  3135  3135 F DEBUG   : Abort message: 'E:\tw\33a21edae6c0e9a
    d\Software\OculusSDK\Integrations\Unity\Releases\0.1.4.0\OVRPlugin\Src\Util\Comp
    ositorVRAPI.cpp:732: virtual bool OVR::Util::CompositorVRAPI::EndFrame(int): ass
    ertion "frameIndex >= m_states[Front].m_frameIndex" failed'
    08-10 23:07:35.411  3135  3135 F DEBUG   :     r0 00000000  r1 00001227  r2 0000
    0006  r3 dadff978
    08-10 23:07:35.411  3135  3135 F DEBUG   :     r4 dadff980  r5 dadff930  r6 0000
    000b  r7 0000010c
    08-10 23:07:35.411  3135  3135 F DEBUG   :     r8 f492ebd0  r9 000027a8  sl daf4
    0040  fp dadff424
    08-10 23:07:35.411  3135  3135 F DEBUG   :     ip 00000006  sp dadff390  lr f6f2
    5365  pc f6f27754  cpsr 400f0010
    08-10 23:07:35.421  3135  3135 F DEBUG   :
    08-10 23:07:35.421  3135  3135 F DEBUG   : backtrace:
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #00 pc 00042754  /system/lib/libc
    .so (tgkill+12)
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #01 pc 00040361  /system/lib/libc
    .so (pthread_kill+32)
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #02 pc 0001ca9b  /system/lib/libc
    .so (raise+10)
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #03 pc 00019d19  /system/lib/libc
    .so (__libc_android_abort+34)
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #04 pc 0001755c  /system/lib/libc
    .so (abort+4)
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #05 pc 0001b6af  /system/lib/libc
    .so (__libc_fatal+16)
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #06 pc 00019da1  /system/lib/libc
    .so (__assert2+20)
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #07 pc 000326ec  /data/app/com.ba
    tstudio.Bowl-1/lib/arm/libOVRPlugin.so (_ZN3OVR4Util15CompositorVRAPI8EndFrameEi
    +216)
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #08 pc 0002eee0  /data/app/com.ba
    tstudio.Bowl-1/lib/arm/libOVRPlugin.so (ovrp_EndFrame+44)
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #09 pc 00799c7c  /data/app/com.ba
    tstudio.Bowl-1/lib/arm/libunity.so
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #10 pc 00493cb4  /data/app/com.ba
    tstudio.Bowl-1/lib/arm/libunity.so
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #11 pc 00494a00  /data/app/com.ba
    tstudio.Bowl-1/lib/arm/libunity.so
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #12 pc 0048f648  /data/app/com.ba
    tstudio.Bowl-1/lib/arm/libunity.so
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #13 pc 004354dc  /data/app/com.ba
    tstudio.Bowl-1/lib/arm/libunity.so
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #14 pc 0003fc63  /system/lib/libc
    .so (_ZL15__pthread_startPv+30)
    08-10 23:07:35.421  3135  3135 F DEBUG   :     #15 pc 0001a39b  /system/lib/libc
    .so (__start_thread+6)
    08-10 23:07:36.391  3135  3135 F DEBUG   :
    08-10 23:07:36.391  3135  3135 F DEBUG   : Tombstone written to: /data/tombstone
    s/tombstone_09
    08-10 23:07:36.391  3135  3135 E DEBUG   : AM write failed: Broken pipe
    08-10 23:07:36.411  3515  4800 W ActivityManager:   Force finishing activity com
    .batstudio.Bowl/com.google.unity.GoogleUnityActivity
    08-10 23:07:36.431  3515  4800 I ActivityManager: Killing 4591:com.batstudio.Bow
    l/u0a280 (adj 0): crash in vr mode
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    > assertion "frameIndex >= m_states[Front].m_frameIndex" failed'

    This means the render thread got ahead of the main thread due to a race condition in Unity 5.3.4p4 and earlier. Can you update to Unity 5.3.4p5 or later?
  • eco_editoreco_editor Posts: 7
    NerveGear
    Hi @vrdaveb
    I have a similar problem. I have 4 videos in the scene and they play together in unity editor but not on OculusGo - the app crashes the minute the 3d video done preparing and about to play.

    This is my logcat output:

    12-06 19:30:30.268  1783  1800 I Unity   : video is preparing Pushkin
    12-06 19:30:30.268  1783  1800 I Unity   :
    12-06 19:30:30.268  1783  1800 I Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
    12-06 19:30:30.268  1783  1800 I Unity   :
    12-06 19:30:30.319   969 17119 I ActivityManager: Process com.oculus.horizon (pid 2023) has died
    12-06 19:30:30.320   969 17119 D ActivityManager: cleanUpApplicationRecord -- 2023
    12-06 19:30:30.321   969 17119 W ActivityManager: Scheduling restart of crashed service com.oculus.horizon/.service_media.OVRMediaService in 30003ms
    12-06 19:30:30.321   969 17119 W ActivityManager: Scheduling restart of crashed service com.oculus.horizon/com.oculus.config.service.GkService in 40003ms
    12-06 19:30:30.321   969 17119 W ActivityManager: Scheduling restart of crashed service com.oculus.horizon/.service.SDKLoggingService in 50003ms
    12-06 19:30:30.352   969   982 I ActivityManager: Start proc 2037:com.oculus.vrshell:SystemUX/u0a21 for service com.oculus.vrshell/.SystemUXNotificationService
    12-06 19:30:30.420  2037  2037 W System  : ClassLoader referenced unknown path: /system/priv-app/VrShell/lib/arm
    12-06 19:30:30.527   560  2019 E C2DColorConvert: unknown format passed for luma alignment number
    12-06 19:30:30.573  2037  2037 D [OAR] SystemUXNotificationService: SystemUXNotificationService onCreate()
    12-06 19:30:30.591  2037  2037 I [OAR] SystemUXNotificationListenerService: SystemUXNotificationListenerService created!
    12-06 19:30:30.631  2037  2037 D [OAR] SystemUXNotificationService: SystemUXNotificationService onStartCommand()
    12-06 19:30:30.721   560   560 E OMXNodeInstance: !!! Observer died. Quickly, do something, ... anything...
    12-06 19:30:30.722   560   871 E OMXNodeInstance: !!! Observer died. Quickly, do something, ... anything...
    12-06 19:30:30.722   560  1144 E OMXNodeInstance: !!! Observer died. Quickly, do something, ... anything...
    12-06 19:30:30.723   560 31261 E OMXNodeInstance: !!! Observer died. Quickly, do something, ... anything...
    12-06 19:30:30.724   969  1357 I ActivityManager: Process com.oculus.demo (pid 1783) has died
    12-06 19:30:30.724   969  1357 D ActivityManager: cleanUpApplicationRecord -- 1783
    12-06 19:30:30.730  1330 13257 I TrackingService: Unregistering client 'pid 1783' by binder death
    12-06 19:30:30.735   969  1020 W InputDispatcher: channel '23ab57 com.oculus.demo/com.unity3d.player.UnityPlayerActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
    12-06 19:30:30.735   969  1020 E InputDispatcher: channel '23ab57 com.oculus.demo/com.unity3d.player.UnityPlayerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
    12-06 19:30:30.737  1330 13257 I TrackingService: TrackingServiceHost Unregistering client: pid 1783
    12-06 19:30:30.743   969  1357 W ActivityManager: Force removing ActivityRecord{20a8bfe u0 com.oculus.demo/com.unity3d.player.UnityPlayerActivity t634}: app died, no saved state
    12-06 19:30:30.757   969   980 I WindowManager: WIN DEATH: Window{23ab57 u0 com.oculus.demo/com.unity3d.player.UnityPlayerActivity}
    12-06 19:30:30.757   969   980 W InputDispatcher: Attempted to unregister already unregistered input channel '23ab57 com.oculus.demo/com.unity3d.player.UnityPlayerActivity (server)'
    12-06 19:30:30.767   969   980 W WindowManager: Force-removing child win Window{6dbb6ad u0 SurfaceView - com.oculus.demo/com.unity3d.player.UnityPlayerActivity} from container Window{23ab57 u0 com.oculus.demo/com.unity3d.player.UnityPlayerActivity}
    12-06 19:30:30.897   969  1287 W WindowManager: Failed looking up window callers=com.android.server.wm.WindowManagerService.windowForClientLocked:9489 com.android.server.wm.WindowState$DeathRecipient.binderDied:1807 android.os.BinderProxy.sendDeathNotice:688
    12-06 19:30:30.897   969  1287 I WindowManager: WIN DEATH: null......................
    ..............
  • eco_editoreco_editor Posts: 7
    NerveGear
    Also when looking at the logcat on videos that did play it seems there's some error there:
    1. omx-vdec-1080p: Does not handle dataspace request
    2.omxNodeInstance: getConfig (2300115:qcom.decoder.vp8, ?? (0x7f000062)) ERROR: UnsupportedSetting (0x80001019)

    Maybe I have wrong API setup in unity? 

    image:

Sign In or Register to comment.