cancel
Showing results for 
Search instead for 
Did you mean: 

Crash when switching to a scene with MoviePlayerSample

sapanda
Explorer
Hey Folks,

I have 2 scenes - a tutorial followed by a main scene that has a MoviePlayerSample.cs.

If I run the main scene by itself, all is well. However, if I transition from the tutorial to the main scene, I get the following output followed by a crash:


W/Adreno-EGL(14196): <qeglDrvAPI_eglMakeCurrent:3054>: EGL_BAD_ACCESS
E/libEGL (14196): eglMakeCurrent:865 error 3002 (EGL_BAD_ACCESS)
E/Unity (14196): eglMakeCurrent(s_EGLDisplay, s_EGLSurface, s_EGLSurface, s_EGLContext): EGL_BAD_ACCESS: EGL cannot access a requested resource (for example a context is bound in another thread).
E/Unity (14196): UnityEngine.Texture:GetNativeTextureID()
E/Unity (14196): MoviePlayerSample:Awake() (at Unity/Assets/Scripts/MoviePlayerSample.cs:87)


Anyone know what might be going on? Why would the resource already be in use?

Note: I'm using Unity 4.6.7, Mobile SDK 0.6.1, Note 4 Kitkat 4.4.4.
1 REPLY 1

sapanda
Explorer
Just found a similar thread on the forums:

viewtopic.php?t=22932

The solution - disabling multi-threaded rendering - drops framerates by about 10% to 20%. Found another hacky workaround that does the job without framerate issues:

https://www.reddit.com/r/GearVR/comment ... loadlevel/

i.e. use a singleton at the beginning to load the texture ID.

Also, I recently had to downgrade from Unity 5.0 to 4.6 to get the app working on S6 Lollipop. I'm pretty sure I would have noticed this issue before if it existed, so maybe it's resolved in Unity 5?