Calling GeckoView.setSession() with an existing session sometimes fails to draw new session
Categories
(GeckoView :: General, defect, P1)
Tracking
(firefox80 disabled, firefox81+ fixed, firefox82+ fixed)
People
(Reporter: snorp, Assigned: snorp)
References
(Blocks 1 open bug)
Details
(Whiteboard: [geckoview:m82])
Attachments
(1 file)
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
It appears that if you have an existing GeckoView
with an existing session on the screen, then swap that out to a new session via GeckoView.setSession()
, the compositor in the new session is sometimes not correctly initialized and the GeckoView
displays the content of the old session. We see the following in logs:
2020-08-21 15:48:19.232 628-2439/? E/BufferQueueProducer: [SurfaceView - org.mozilla.fenix.debug/org.mozilla.fenix.debug.App#0] connect: already connected (cur=1 req=1)
2020-08-21 15:48:19.233 4369-4546/org.mozilla.fenix.debug E/libEGL: eglCreateWindowSurface: native_window_api_connect (win=0x76e7e9f010) failed (0xffffffea) (already connected to another API?)
2020-08-21 15:48:19.233 4369-4546/org.mozilla.fenix.debug E/libEGL: eglCreateWindowSurfaceTmpl:730 error 3003 (EGL_BAD_ALLOC)
2020-08-21 15:48:19.814 788-4684/? E/ResolverController: No valid NAT64 prefix (305, <unspecified>/0)
2020-08-21 15:48:31.663 2378-2486/? E/FirebaseMessaging: Topic operation failed: SERVICE_NOT_AVAILABLE. Will retry Topic operation.
This seems to indicate that we are not destroying the EGLSurface
for the outgoing session before the incoming one is initialized.
Assignee | ||
Updated•4 years ago
|
Comment 1•4 years ago
|
||
Talked to AC and this sounds like the most critical bug for 81, and would need to be uplifted into GV81 for the September release. Fenix 81 is planned to release to Beta just over a week from now 9/7 or so.
Assignee | ||
Comment 2•4 years ago
|
||
I don't know if this is the cause of all of the problems, but at least one thing I'm seeing seems to be:
- Create a window (session), attach to a surface.
- Do some stuff with the window (load pages, etc)
- Close the session
- Create a new session and attach it to the prior surface
- New session fails to create the
EGLSurface
because there is some async compositor shutdown happening in step 3 and it hasn't happened yet. Consequently, The first session still has anEGLSurface
bound to the sameSurface
we're using here.
Comment 3•4 years ago
|
||
[Tracking Requested - why for this release]: We want to make sure we address for 81
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
Without this, the asynchronous nature of compositor shutdown causes
races if the Android surface is immediately reused with another
GeckoSession instance.
Assignee | ||
Comment 5•4 years ago
|
||
Comment on attachment 9173441 [details]
Bug 1660546 - Ensure Surface is released when closing GeckoSession
Beta/Release Uplift Approval Request
- User impact if declined: Blank tabs occassionally
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): One line change that is presumed safe
- String changes made/needed: None
Pushed by jwillcox@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b1a38140966e Ensure Surface is released when closing GeckoSession r=geckoview-reviewers,aklotz
Assignee | ||
Comment 7•4 years ago
|
||
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) (he/him) from comment #5)
- List of other uplifts needed: None
Whoops, we also need Bug 1662528
Comment 8•4 years ago
|
||
bugherder |
Comment 9•4 years ago
|
||
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) (he/him) from comment #7)
Whoops, we also need Bug 1662528
Please request approval for this in the other bug.
Comment 10•4 years ago
|
||
Comment on attachment 9173441 [details]
Bug 1660546 - Ensure Surface is released when closing GeckoSession
Approved for 81.0b6.
Comment 11•4 years ago
|
||
bugherder uplift |
Description
•