Search Unity

Problem porting Gear VR project to Daydream

Discussion in 'Daydream' started by eljaydub, Oct 20, 2016.

  1. eljaydub

    eljaydub

    Joined:
    Jan 26, 2015
    Posts:
    8
    I'm working on porting our game from Gear VR to Daydream and having trouble tracking down a problem that prevents any of the scenes from running. The app builds successfully with no warnings on GVR8 but when I try to open the app on the 6p it opens to a black screen, hangs for about 5 seconds and then crashes me back to the home screen.

    Looking at the logcat output (attached and also below) I see several errors. The first is about the Oculus Spatializer but this error appears whether or not the Oculus Spatializer is selected in Project Setttings -> Audio and also whether or not Oculus is included as a VR build target. According to the Unity docs that's all I should have to do to disable it.

    I suspect that the real cause of the crash is the next error, on line 70:

    [EGL] Unable to acquire context: EGL_BAD_MATCH: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).

    I'm not sure where to go from here. Has anyone see anything similiar? Anyone have a clue what to try or look at next?

    I've been able to build, install and run the gvr-unity sample projects with 5.4.1f1-GVR8 no problem.

    Here's the log output:
    Code (CSharp):
    1. 04-06 14:14:16.083: I/ServiceManager(21288): Waiting for service AtCmdFwd...
    2. 04-06 14:14:17.084: I/ServiceManager(21288): Waiting for service AtCmdFwd...
    3. 04-06 14:14:17.198: I/ActivityManager(893): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.endspace/com.unity3d.player.UnityPlayerActivity (has extras)} from uid 10035 on display 0
    4. 04-06 14:14:17.213: I/VrManagerService(893): VR mode enabled
    5. 04-06 14:14:17.217: I/VrManagerService(893): Connecting ComponentInfo{com.google.vr.vrcore/com.google.vr.vrcore.common.VrCoreListenerService} for user 0
    6. 04-06 14:14:17.251: I/ActivityManager(893): Start proc 21417:com.endspace/u0a89 for activity com.endspace/com.unity3d.player.UnityPlayerActivity
    7. 04-06 14:14:17.267: I/art(21417): Late-enabling -Xcheck:jni
    8. 04-06 14:14:17.434: D/LightsService(893): Excessive delay setting light: 183ms
    9. 04-06 14:14:17.442: I/ActivityManager(893): Config changes=480 {1.0 ?mcc?mnc [en_US] ldltr sw411dp w683dp h387dp 560dpi nrml land finger -keyb/v/h -nav/h s.63}
    10. 04-06 14:14:17.514: I/InputReader(893): Reconfiguring input devices.  changes=0x00000004
    11. 04-06 14:14:17.514: I/InputReader(893): Device reconfigured: id=7, name='synaptics_dsx', size 1440x2560, orientation 1, mode 1, display id 0
    12. 04-06 14:14:17.561: D/ConditionProviders(893): Subscribing to condition://com.google.vr.vrcore with ComponentInfo{com.google.vr.vrcore/com.google.vr.vrcore.common.VrCoreZenConditionProvider}
    13. 04-06 14:14:17.579: I/vol.Events(3026): writeEvent external_ringer_mode_changed silent
    14. 04-06 14:14:17.611: I/vol.Events(3026): writeEvent zen_mode_changed important_interruptions
    15. 04-06 14:14:17.627: I/Unity(21417): splash_mode = 0 (integer)
    16. 04-06 14:14:17.627: I/Unity(21417): useObb = False (bool)
    17. 04-06 14:14:17.703: I/Unity(21417): onResume
    18. 04-06 14:14:17.776: D/Unity(21417): [EGL] Attaching window :0xdd483008
    19. 04-06 14:14:17.776: D/Unity(21417): [EGL] Attaching window :0xdd483008
    20. 04-06 14:14:17.809: I/Unity(21417): windowFocusChanged: true
    21. 04-06 14:14:17.824: I/ActivityManager(893): Displayed com.endspace/com.unity3d.player.UnityPlayerActivity: +588ms
    22. 04-06 14:14:17.830: I/WindowManager(893): Destroying surface Surface(name=com.google.android.googlequicksearchbox/com.google.android.launcher.GEL) called by com.android.server.wm.WindowStateAnimator.destroySurface:1992 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:885 com.android.server.wm.WindowState.destroyOrSaveSurface:2065 com.android.server.wm.WindowManagerService.tryStartExitingAnimation:3013 com.android.server.wm.WindowManagerService.relayoutWindow:2894 com.android.server.wm.Session.relayout:215 android.view.IWindowSession$Stub.onTransact:286 com.android.server.wm.Session.onTransact:136
    23. 04-06 14:14:17.833: D/Unity(21417): SystemInfo CPU = ARMv7 VFPv3 NEON, Cores = 8, Memory = 2798mb
    24. 04-06 14:14:17.833: D/Unity(21417): SystemInfo ARM big.LITTLE configuration: 4 big (mask: 240), 4 little (mask: 15)
    25. 04-06 14:14:17.843: I/WindowManager(893): Screen frozen for +553ms due to Window{e617d06 u0 com.endspace/com.unity3d.player.UnityPlayerActivity}
    26. 04-06 14:14:18.084: W/Atfwd_Sendcmd(21288): AtCmdFwd service not published, waiting... retryCnt : 3
    27. 04-06 14:14:18.547: D/Unity(21417): [SHA1] 7c61c540fc157ab3c0bfe8c76d2b463b5136639b   26181936 bytes ~ lib/armeabi-v7a/libunity.so
    28. 04-06 14:14:18.548: D/Unity(21417): [SHA1] af4a5515324d20da8654a1e9248fd4218c0eefa1      25316 bytes ~ lib/armeabi-v7a/libmain.so
    29. 04-06 14:14:18.634: D/Unity(21417): [SHA1] 6dfd6ec713a43bb3a6c27d34d1dc336b7c5a16bc    3762548 bytes ~ lib/armeabi-v7a/libmono.so
    30. 04-06 14:14:19.359: D/Unity(21417): [SHA1] bc7e519afaa5cb1dcba961af78efe304343da007   29919832 bytes ~ lib/x86/libunity.so
    31. 04-06 14:14:19.360: D/Unity(21417): [SHA1] 34848d01815a791b82163044a1c7c25785a4cb11       8120 bytes ~ lib/x86/libmain.so
    32. 04-06 14:14:19.444: D/Unity(21417): [SHA1] e9456a8e54181834beb471429cf9d95d79fa35cc    3628252 bytes ~ lib/x86/libmono.so
    33. 04-06 14:14:19.445: D/Unity(21417): Mono path[0] = '/data/app/com.endspace-2/base.apk/assets/bin/Data/Managed'
    34. 04-06 14:14:19.445: D/Unity(21417): Mono config path = 'assets/bin/Data/Managed'
    35. 04-06 14:14:19.445: D/Unity(21417): PlayerConnection initialized from /data/app/com.endspace-2/base.apk/assets/bin/Data (debug = 0)
    36. 04-06 14:14:19.446: D/Unity(21417): PlayerConnection initialized network socket : 0.0.0.0 55104
    37. 04-06 14:14:19.447: D/Unity(21417): PlayerConnection initialized unix socket : Unity-com.endspace
    38. 04-06 14:14:19.449: D/Unity(21417): Multi-casting "[IP] 0.0.0.0 [Port] 55104 [Flags] 3 [Guid] 900162433 [EditorId] 3359200004 [Version] 1048832 [Id] AndroidPlayer(Huawei_Nexus_6P@0.0.0.0) [Debug] 1" to [225.0.0.222:54997]...
    39. 04-06 14:14:19.449: D/Unity(21417): Waiting for connection from host on [0.0.0.0:55104]...
    40. 04-06 14:14:19.857: I/art(893): Starting a blocking GC Explicit
    41. 04-06 14:14:19.967: I/art(893): Explicit concurrent mark sweep GC freed 32721(2MB) AllocSpace objects, 5(100KB) LOS objects, 33% free, 19MB/29MB, paused 1.414ms total 109.490ms
    42. 04-06 14:14:24.471: D/Unity(21417): Timed out. Continuing without host connection.
    43. 04-06 14:14:24.471: D/Unity(21417): Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56433
    44. 04-06 14:14:24.534: W/mono(21417): Symbol file /data/app/com.endspace-2/base.apk/assets/bin/Data/Managed/mscorlib.dll.mdb doesn't match image /data/app/com.endspace-2/base.apk/assets/bin/Data/Managed/mscorlib.dll
    45. 04-06 14:14:24.556: W/mono(21417): Symbol file /data/app/com.endspace-2/base.apk/assets/bin/Data/Managed/mscorlib.dll.mdb doesn't match image /data/app/com.endspace-2/base.apk/assets/bin/Data/Managed/mscorlib.dll
    46. 04-06 14:14:24.587: D/Unity(21417): InitializeScriptEngine OK (e005bee0)
    47. 04-06 14:14:24.587: D/Unity(21417): PlayerConnection already initialized - listening to [0.0.0.0:55104]
    48. 04-06 14:14:24.610: D/Unity(21417): Unable to lookup library path for 'libAudioPluginOculusSpatializer', native render plugin support disabled.
    49. 04-06 14:14:24.611: E/Unity(21417): Unable to find libAudioPluginOculusSpatializer
    50. 04-06 14:14:24.611: D/Unity(21417): PlayerInitEngineNoGraphics OK
    51. 04-06 14:14:24.613: I/Adreno(21417): QUALCOMM build                   : ab9e4b3, I3ad86ef6a3
    52. 04-06 14:14:24.613: I/Adreno(21417): Build Date                       : 05/19/16
    53. 04-06 14:14:24.613: I/Adreno(21417): OpenGL ES Shader Compiler Version: XE031.08.00.02
    54. 04-06 14:14:24.613: I/Adreno(21417): Local Branch                     : N10C
    55. 04-06 14:14:24.613: I/Adreno(21417): Remote Branch                    :
    56. 04-06 14:14:24.613: I/Adreno(21417): Remote Branch                    :
    57. 04-06 14:14:24.613: I/Adreno(21417): Reconstruct Branch               :
    58. 04-06 14:14:24.620: D/Unity(21417): [EGL] Request: ES 3.1+AEP RGB0 000 0/0
    59. 04-06 14:14:24.621: D/Unity(21417): [EGL] Checking ES 3.1 support...
    60. 04-06 14:14:24.626: D/Unity(21417): [EGL] ES 3.1 support detected
    61. 04-06 14:14:24.626: D/Unity(21417): [EGL] Found: ID[1] ES 3.1+AEP RGB16 565 0/0
    62. 04-06 14:14:24.626: D/Unity(21417): GfxDevice: creating device client; threaded=1
    63. 04-06 14:14:24.626: D/Unity(21417): [EGL] Request: ES 3.1+AEP RGB0 000 0/0
    64. 04-06 14:14:24.627: D/Unity(21417): [EGL] Found: ID[1] ES 3.1+AEP RGB16 565 0/0
    65. 04-06 14:14:24.627: D/Unity(21417): [EGL] Request: ES 3.0 RGB24 888 24/8
    66. 04-06 14:14:24.632: D/Unity(21417): [EGL] Found: ID[7] ES 3.0 RGB24 888 24/8
    67. 04-06 14:14:24.634: D/Unity(21417): [EGL] Using protected surface (EGL_PROTECTED_CONTENT_EXT)
    68. 04-06 14:14:24.638: D/Unity(21417): ANativeWindow: (2560/1440) RequestedResolution: (0/0) EGLSurface: (2560/1440)
    69. 04-06 14:14:24.640: E/libEGL(21417): eglMakeCurrent:800 error 3009 (EGL_BAD_MATCH)
    70. 04-06 14:14:24.640: E/Unity(21417): [EGL] Unable to acquire context: EGL_BAD_MATCH: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
    71. 04-06 14:14:24.640: E/Unity(21417):
    72. 04-06 14:14:24.640: E/Unity(21417): (Filename: ./Runtime/GfxDevice/egl/WindowContextEGL.cpp Line: 251)
    73. 04-06 14:14:24.641: E/libEGL(21417): call to OpenGL ES API with no current context (logged once per thread)
    74. 04-06 14:14:24.664: E/mono(21417): Unhandled Exception: System.ExecutionEngineException: SIGILL
    75. 04-06 14:14:24.703: I/WindowManager(893): WIN DEATH: Window{bc526de u0 SurfaceView - com.endspace/com.unity3d.player.UnityPlayerActivity}
    76. 04-06 14:14:24.703: I/WindowManager(893): Destroying surface Surface(name=SurfaceView - com.endspace/com.unity3d.player.UnityPlayerActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:1992 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:885 com.android.server.wm.WindowState.removeLocked:1447 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2477 com.android.server.wm.WindowManagerService.removeWindowLocked:2435 com.android.server.wm.WindowState$DeathRecipient.binderDied:1772 android.os.BinderProxy.sendDeathNotice:688 <bottom of call stack>
    77. 04-06 14:14:24.703: I/ActivityManager(893): Process com.endspace (pid 21417) has died
    78. 04-06 14:14:24.703: W/ActivityManager(893): Force removing ActivityRecord{2662194 u0 com.endspace/com.unity3d.player.UnityPlayerActivity t26}: app died, no saved state
    79. 04-06 14:14:24.704: W/InputDispatcher(893): channel 'e617d06 com.endspace/com.unity3d.player.UnityPlayerActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
    80. 04-06 14:14:24.704: E/InputDispatcher(893): channel 'e617d06 com.endspace/com.unity3d.player.UnityPlayerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
    81. 04-06 14:14:24.705: I/Zygote(542): Process 21417 exited cleanly (1)
    82. 04-06 14:14:24.707: I/WindowManager(893): WIN DEATH: Window{e617d06 u0 com.endspace/com.unity3d.player.UnityPlayerActivity}
    83. 04-06 14:14:24.707: W/InputDispatcher(893): Attempted to unregister already unregistered input channel 'e617d06 com.endspace/com.unity3d.player.UnityPlayerActivity (server)'
    84. 04-06 14:14:24.707: I/WindowManager(893): Destroying surface Surface(name=com.endspace/com.unity3d.player.UnityPlayerActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:1992 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:885 com.android.server.wm.WindowState.removeLocked:1447 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2477 com.android.server.wm.WindowManagerService.removeWindowLocked:2435 com.android.server.wm.WindowState$DeathRecipient.binderDied:1772 android.os.BinderProxy.sendDeathNotice:688 <bottom of call stack>
    85. 04-06 14:14:24.739: I/ActivityManager(893): Config changes=480 {1.0 ?mcc?mnc [en_US] ldltr sw411dp w411dp h659dp 560dpi nrml port finger -keyb/v/h -nav/h s.64}
    86. 04-06 14:14:24.762: W/AppOps(893): Finishing op nesting under-run: uid 10061 pkg com.google.vr.vrcore code 24 time=0 duration=0 nesting=0
    87. 04-06 14:14:24.808: I/InputReader(893): Reconfiguring input devices.  changes=0x00000004
    88. 04-06 14:14:24.808: I/InputReader(893): Device reconfigured: id=7, name='synaptics_dsx', size 1440x2560, orientation 0, mode 1, display id 0
    89. 04-06 14:14:25.075: I/WindowManager(893): Screen frozen for +355ms due to Window{8724397 u0 com.android.systemui.ImageWallpaper}
    90. 04-06 14:14:25.100: I/VrManagerService(893): VR mode disabled
    91. 04-06 14:14:25.100: I/VrManagerService(893): Disconnecting ComponentInfo{com.google.vr.vrcore/com.google.vr.vrcore.common.VrCoreListenerService} for user 0
    92. 04-06 14:14:25.121: W/AppOps(893): Finishing op nesting under-run: uid 10061 pkg com.google.vr.vrcore code 24 time=0 duration=0 nesting=0
    93. 04-06 14:14:25.265: D/LightsService(893): Excessive delay setting light: 151ms
    94. 04-06 14:14:25.290: I/vol.Events(3026): writeEvent external_ringer_mode_changed normal
    95. 04-06 14:14:25.302: E/VrCoreZenConditionProvider(3919): Trying to un-subscribe condition://com.google.vr.vrcore which is not equal to condition://com.google.vr.vrcore
    96. 04-06 14:14:25.307: I/vol.Events(3026): writeEvent zen_mode_changed off
    97. 04-06 14:14:27.083: I/art(893): Starting a blocking GC Explicit
    98. 04-06 14:14:27.200: I/art(893): Explicit concurrent mark sweep GC freed 10121(625KB) AllocSpace objects, 4(80KB) LOS objects, 33% free, 19MB/29MB, paused 943us total 116.903ms
    99. 04-06 14:14:27.203: W/JavaBinder(893): BinderProxy is being destroyed but the application did not call unlinkToDeath to unlink all of its death recipients beforehand.  Releasing leaked death recipient: com.android.server.utils.ManagedApplicationService$1
    100.  
     

    Attached Files:

  2. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    400
    Can you uncheck "Protect Graphics Memory" in Player Settings? We should probably make this a big fat warning if anyone checks this box -- it's only used for very specific use cases (DRM), has some major downsides (can't read from framebuffer) and ex. doesn't work with daydream.
     
  3. eljaydub

    eljaydub

    Joined:
    Jan 26, 2015
    Posts:
    8
    That's solved it and it's running now. Thanks a bunch!