Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
JustZht's avatar
JustZht
Honored Guest
9 years ago

Right eye freezes on Android 6.0 Marshmallow (Galaxy S6 Edge)

Hi everyone,
I am using Unity 5.3.4p1 with EasyWebViewTexture for Android, everything was fine when testing my app on Android 5.x, but after I upgrade my galaxy s6 edge to Android 6.0 right eye always freezes, like this https://www.youtube.com/watch?v=8VBKz7_MDjQ .
However, if I take off my headset and take it on again, right eye rendering works again (at least for a while) It happens the same when I press multitasking button and back to the app in VR development mode.
I am using OVRPlugin 1.3.2, Multi-thread Rendering Off and Force OpenGL ES 2.0 in unity player settings, is there something broken after my upgrade to Android 6.0? thanks :smile: 

2 Replies

Replies have been turned off for this discussion
  • vrdaveb's avatar
    vrdaveb
    Oculus Staff
    This looks like our bug:
    04-21 19:52:18.541 11106-11136/com.Raven.WebViewDebug E/libEGL: eglMakeCurrent:1056 error 3002 (EGL_BAD_ACCESS)
    04-21 19:52:18.641 11106-11136/com.Raven.WebViewDebug E/Unity: [EGL] Unable to acquire context: EGL_BAD_ACCESS: EGL cannot access a requested resource (for example a context is bound in another thread).
                                                                   UnityEngine.Texture:GetNativeTextureID()
                                                                   EasyWebViewCtrl:Start() (at /Users/Fincher/Desktop/WebViewDebug/Assets/EasyWebViewTexture/Scripts/EasyWebViewCtrl.cs:73)
    04-21 19:52:18.641 11106-11136/com.Raven.WebViewDebug E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
    04-21 19:52:18.641 11106-11190/com.Raven.WebViewDebug E/libEGL: eglMakeCurrent:1056 error 3002 (EGL_BAD_ACCESS)
    04-21 19:52:18.641 11106-11190/com.Raven.WebViewDebug E/Unity: [EGL] Unable to acquire context: EGL_BAD_ACCESS: EGL cannot access a requested resource (for example a context is bound in another thread).
                                                                    
                                                                   (Filename: ./Runtime/GfxDevice/egl/WindowContextEGL.cpp Line: 205)
    It's due to the way we manage GLES contexts and surfaces in VRAPI 1.0.0 and earlier. Unity normally has a context current on the windowsurface, but we make it current on a trivial pixel buffer and make our TimeWarp context current on the windowsurface when in VR mode. With the current code, it looks like you would need to exit VR mode before getting the native texture pointer. Unfortunately, there isn't an easy way to do that. You might be able to make the call in Awake if you set your script to run first (see http://docs.unity3d.com/Manual/class-ScriptExecution.html).

    Within the next month, we are planning to rework our context management to remove this hazard.