Closed Bug 1638114 Opened 4 years ago Closed 4 years ago

eglMakeCurrent EGL_BAD_SURFACE errors after destroying the VR GLScreenBuffer

Categories

(Core :: Graphics: CanvasWebGL, defect)

All
Android
defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: mortimergoro, Assigned: mortimergoro)

Details

Attachments

(2 files, 1 obsolete file)

In WebVR we destroy the mVRScreen after presentation is exited by calling WebGLContext::ClearVRFrame(). We found that when having multiple windows with WebGL context active in Firefox Reality, the WebGL context dies a lot, and you have to reload the page to recover from it.

These are the erros we see in the console, All WebGL functions calls fail due to the makeCurrent failure:

05-14 12:48:03.344  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.345  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fUseProgram(GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.345  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.345  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fUniformMatrix4fv(GLint, GLsizei, realGLboolean, const GLfloat *) with failed mImplicitMakeCurrent.
05-14 12:48:03.345  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.345  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindTexture(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.345  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.345  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fUniformMatrix4fv(GLint, GLsizei, realGLboolean, const GLfloat *) with failed mImplicitMakeCurrent.
05-14 12:48:03.345  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.345  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.345  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.345  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fVertexAttribPointer(GLuint, GLint, GLenum, realGLboolean, GLsizei, const GLvoid *) with failed mImplicitMakeCurrent.
05-14 12:48:03.345  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.346  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.346  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.346  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.346  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.346  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fVertexAttribPointer(GLuint, GLint, GLenum, realGLboolean, GLsizei, const GLvoid *) with failed mImplicitMakeCurrent.
05-14 12:48:03.346  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.346  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.346  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.346  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.346  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.346  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::raw_fBindFramebuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.346  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.346  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::raw_fDrawElementsInstanced(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei) with failed mImplicitMakeCurrent.
05-14 12:48:03.346  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.346  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fUseProgram(GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.346  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.347  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fUniformMatrix4fv(GLint, GLsizei, realGLboolean, const GLfloat *) with failed mImplicitMakeCurrent.
05-14 12:48:03.347  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.347  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fUniformMatrix4fv(GLint, GLsizei, realGLboolean, const GLfloat *) with failed mImplicitMakeCurrent.
05-14 12:48:03.347  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.347  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fEnable(GLenum) with failed mImplicitMakeCurrent.
05-14 12:48:03.347  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.347  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.347  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.347  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fVertexAttribPointer(GLuint, GLint, GLenum, realGLboolean, GLsizei, const GLvoid *) with failed mImplicitMakeCurrent.
05-14 12:48:03.347  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.347  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.347  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.347  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fDisableVertexAttribArray(GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.348  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.348  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::raw_fBindFramebuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.348  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.348  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::raw_fDrawArraysInstanced(GLenum, GLint, GLsizei, GLsizei) with failed mImplicitMakeCurrent.
05-14 12:48:03.348  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.348  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fUniformMatrix4fv(GLint, GLsizei, realGLboolean, const GLfloat *) with failed mImplicitMakeCurrent.
05-14 12:48:03.348  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.348  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fUniformMatrix4fv(GLint, GLsizei, realGLboolean, const GLfloat *) with failed mImplicitMakeCurrent.
05-14 12:48:03.348  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.348  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.348  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.348  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fVertexAttribPointer(GLuint, GLint, GLenum, realGLboolean, GLsizei, const GLvoid *) with failed mImplicitMakeCurrent.
05-14 12:48:03.348  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.348  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.348  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.348  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::raw_fBindFramebuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.348  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.348  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::raw_fDrawArraysInstanced(GLenum, GLint, GLsizei, GLsizei) with failed mImplicitMakeCurrent.
05-14 12:48:03.348  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.349  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fUseProgram(GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.349  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.349  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindTexture(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.349  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.349  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fDisable(GLenum) with failed mImplicitMakeCurrent.
05-14 12:48:03.349  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.349  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fEnable(GLenum) with failed mImplicitMakeCurrent.
05-14 12:48:03.349  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.349  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.349  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.349  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fVertexAttribPointer(GLuint, GLint, GLenum, realGLboolean, GLsizei, const GLvoid *) with failed mImplicitMakeCurrent.
05-14 12:48:03.349  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.349  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.349  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.350  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fEnableVertexAttribArray(GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.350  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.350  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.350  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.350  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fVertexAttribPointer(GLuint, GLint, GLenum, realGLboolean, GLsizei, const GLvoid *) with failed mImplicitMakeCurrent.
05-14 12:48:03.350  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.350  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.350  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.350  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::fBindBuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.350  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)
05-14 12:48:03.350  3004  3178 I Gecko   : [GFX1]: Ignoring call to void mozilla::gl::GLContext::raw_fBindFramebuffer(GLenum, GLuint) with failed mImplicitMakeCurrent.
05-14 12:48:03.350  3004  3178 E libEGL  : eglMakeCurrent:800 error 300d (EGL_BAD_SURFACE)

Assignee: nobody → imanol

In WebVR we destroy the mVRScreen after presentation is exited by calling WebGLContext::ClearVRFrame(). We found that when having multiple windows with active WebGL contexts in Firefox Reality, the WebGL context dies a lot, and you have to reload the page to recover from it. The problem is that when the GLScreenBuffer is destroyed the EGLContext still keeps a reference to the destroyed surface, set by gl->SetEGLSurfaceOverride(surface), which can break the future eglMakeCurrent calls.

In WebVR we destroy the mVRScreen after presentation is exited by calling WebGLContext::ClearVRFrame(). We found that when having multiple windows with active WebGL contexts in Firefox Reality, the WebGL context dies a lot, and you have to reload the page to recover from it. The problem is that when the GLScreenBuffer is destroyed the EGLContext still keeps a reference to the destroyed surface, set by gl->SetEGLSurfaceOverride(surface), which can break the future eglMakeCurrent calls.

Attachment #9149174 - Attachment is obsolete: true

In WebVR we destroy the mVRScreen after presentation is exited by calling WebGLContext::ClearVRFrame(). We found that when having multiple windows with active WebGL contexts in Firefox Reality, the WebGL context dies a lot, and you have to reload the page to recover from it. The problem is that when the GLScreenBuffer is destroyed the EGLContext still keeps a reference to the destroyed surface, set by gl->SetEGLSurfaceOverride(surface), which can break the future eglMakeCurrent calls.

Pushed by rbarker@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f12050b29847
Do not keep EGLSurfaceOverride references to destroyed Android Shared Surfaces. r=jgilbert,snorp,rbarker
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: