Bug 1762025 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

So I've tested this morning on about 20 different devices (and the emulator) running Android versions from 5 through to 12. And a few devices I was able to test on 11 then upgrade to 12. And this does indeed seem to only affect Android 12.

From the logcat it appears that on Android 12 the previous EGL context isn't detached from the Surface when its process dies. Then when we attempt to create a new EGL context it fails because it thinks the Surface is already attached to a context. And we therefore cannot resume the compositor.

```
BufferQueueProducer: [SurfaceView[org.mozilla.fenix/org.mozilla.fenix.App]#11(BLAST Consumer)11](id:29bb0000000b,api:1,p:10818,c:10683) connect: already connected (cur=1 req=1)
libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7ab34a728440) failed (0xffffffea) (already connected to another API?)
libEGL  : eglCreateWindowSurfaceTmpl:676 error 3003 (EGL_BAD_ALLOC)
Gecko   : [GFX1-]: Failed to create EGLSurface
CompositorBridgeParent: Unable to renew compositor surface; remaining in paused state
```

I think the best thing to do for now is disable the GPU process on Android 12, and we can ride the trains for all other android versions. Then I can find a solution for this in parallel.
So I've tested this morning on about 20 different devices (and the emulator) running Android versions from 5 through to 12. And a few devices I was able to test on 11 then upgrade to 12. And this does indeed seem to only affect Android 12.

From the logcat it appears that on Android 12 the previous EGL context isn't detached from the Surface when its process dies. Then when we attempt to create a new EGL context it fails because it thinks the Surface is already attached to a context. And we therefore cannot resume the compositor without an EGL context.

```
BufferQueueProducer: [SurfaceView[org.mozilla.fenix/org.mozilla.fenix.App]#11(BLAST Consumer)11](id:29bb0000000b,api:1,p:10818,c:10683) connect: already connected (cur=1 req=1)
libEGL  : eglCreateWindowSurface: native_window_api_connect (win=0x7ab34a728440) failed (0xffffffea) (already connected to another API?)
libEGL  : eglCreateWindowSurfaceTmpl:676 error 3003 (EGL_BAD_ALLOC)
Gecko   : [GFX1-]: Failed to create EGLSurface
CompositorBridgeParent: Unable to renew compositor surface; remaining in paused state
```

I think the best thing to do for now is disable the GPU process on Android 12, and we can ride the trains for all other android versions. Then I can find a solution for this in parallel.

Back to Bug 1762025 Comment 2