Closed
Bug 1472140
Opened 6 years ago
Closed 6 years ago
White page after assigning GeckoSession to a new GeckoView
Categories
(GeckoView :: General, defect, P1)
Tracking
(firefox-esr52 wontfix, firefox-esr60 wontfix, firefox61 wontfix, firefox62 fixed, firefox63 fixed)
RESOLVED
FIXED
mozilla63
People
(Reporter: sebastian, Assigned: droeh)
References
Details
(Whiteboard: [geckoview:klar:p1])
Attachments
(4 files)
5.05 KB,
patch
|
Details | Diff | Splinter Review | |
59 bytes,
text/x-review-board-request
|
rbarker
:
review+
ritu
:
approval-mozilla-beta+
|
Details |
59 bytes,
text/x-review-board-request
|
esawin
:
review+
|
Details |
5.38 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
This is kind of a follow-up from bug 1470883. I have a working browser prototype that switches tabs by assigning GeckoSession objects to GeckoViews. I'm using GeckoView 63.0.20180627100018. To avoid running into the problems mentioned in bug 1470883 I release the session in onDetachedFromWindow() so that GeckoView won't close it: > internal var gec = objekoView : GeckoView(context) { > override fun onDetachedFromWindow() { > releaseSession() > > super.onDetachedFromWindow() > } > } Right now I create a new Fragment (and GeckoView) whenever I display a new/selected tab and assign the matching GeckoSession. This only works once for every GeckoSession. As soon as I assign a GeckoSession to a GeckoView for the second time it only renders a white page. New GeckoSession objects display fine. We are not seeing this in issue because currently we always save/restore into a new GeckoSession... but that's something we do not want to continue doing.
Updated•6 years ago
|
status-firefox61:
--- → wontfix
status-firefox62:
--- → affected
status-firefox63:
--- → affected
status-firefox-esr52:
--- → wontfix
status-firefox-esr60:
--- → wontfix
Whiteboard: [geckoview:klar]
Comment 1•6 years ago
|
||
P1 if this affects Focus+GV
Priority: -- → P1
Whiteboard: [geckoview:klar] → [geckoview:klar:p1]
Comment 3•6 years ago
|
||
[geckoview:klar:p2] because Dylan says Focus has implemented a workaround.
Whiteboard: [geckoview:klar:p1] → [geckoview:klar:p2]
Reporter | ||
Comment 4•6 years ago
|
||
> [geckoview:klar:p2] because Dylan says Focus has implemented a workaround.
Re-using GeckoSession was our workaround for avoiding to save state that hangs infrequently. Either one of those requires a fix or we cannot implement tab switching with GeckoView.
Assignee | ||
Updated•6 years ago
|
Whiteboard: [geckoview:klar:p2] → [geckoview:klar:p1]
Assignee | ||
Comment 5•6 years ago
|
||
Sebastian, is there a branch of Focus I can use to test this? I've been trying to reproduce in GVE and everything I try works fine.
Flags: needinfo?(s.kaspari)
Reporter | ||
Comment 6•6 years ago
|
||
I can try setting a branch up with Focus tomorrow. If you want something today you can try the sample browser in the components repository: https://github.com/mozilla-mobile/android-components Import the repo into Android Studio and launch "samples-browser" (Make sure to use a "nightly" build variant). Then in the browser switch between tabs. As soon as you select the same tab twice it will render a white page.
Assignee | ||
Comment 7•6 years ago
|
||
Thanks, the sample browser was good enough to get me on the right track. We can actually reuse sessions across multiple views if those views are in the layout -- it appears to be reusing sessions with programmatically created views that is the issue, as far as I can tell. Jim, I'm seeing a logcat message: E SurfaceFlinger: Failed to find layer (SurfaceView - org.mozilla.geckoview_example/org.mozilla.geckoview_example.GeckoViewActivity#0) in layer parent (no-parent). when this occurs; do you have any idea what's going on here (or at least if it's likely to be related to the white screen issue)?
Flags: needinfo?(s.kaspari) → needinfo?(nchen)
Comment 8•6 years ago
|
||
Seems like it should be related, though it's hard to say what's going on with just that one line.
Flags: needinfo?(nchen)
Assignee | ||
Comment 9•6 years ago
|
||
(In reply to Jim Chen [:jchen] [:darchons] from comment #8) > Seems like it should be related, though it's hard to say what's going on > with just that one line. Unfortunately there wasn't much else that seemed relevant iirc. I'm wrapping up something else at the moment, but I'll post a simple testing patch and full log later.
Assignee | ||
Comment 10•6 years ago
|
||
Here's a minimal test case in GVE. I'm beginning to think snorp is right about the SurfaceFlinger message being a red herring, though: we get the SurfaceFlinger message on calling replaceView(), but only suffer the white screen problem if we try setting the session on the new view to the existing session -- if we leave it with its own new session, we properly load and display pages as expected.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 13•6 years ago
|
||
Looked into this with Dylan's test case. Seems like we're not firing the first paint callbacks properly when switching surfaces. Fix is really simple so I went ahead and wrote a couple patches.
Comment 14•6 years ago
|
||
mozreview-review |
Comment on attachment 8996086 [details] Bug 1472140 - 2. Set text input / accessibility views with the session; https://reviewboard.mozilla.org/r/260342/#review267406
Attachment #8996086 -
Flags: review?(esawin) → review+
Comment 15•6 years ago
|
||
mozreview-review |
Comment on attachment 8996085 [details] Bug 1472140 - 1. Set first paint flag when resuming and resizing composition; https://reviewboard.mozilla.org/r/260340/#review267416
Attachment #8996085 -
Flags: review?(rbarker) → review+
Comment 16•6 years ago
|
||
Pushed by nchen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/81459ed973a8 1. Set first paint flag when resuming and resizing composition; r=rbarker https://hg.mozilla.org/integration/autoland/rev/932cc42e15c1 2. Set text input / accessibility views with the session; r=esawin
Comment 17•6 years ago
|
||
(In reply to Sebastian Kaspari (:sebastian) from comment #4) > > [geckoview:klar:p2] because Dylan says Focus has implemented a workaround. > > Re-using GeckoSession was our workaround for avoiding to save state that > hangs infrequently. Either one of those requires a fix or we cannot > implement tab switching with GeckoView. Jim, do we need to uplift your fix to 62 Beta for the Focus 7.0 beta test? Does Focus need to make any code changes to its use of GeckoSession after your fix?
Flags: needinfo?(nchen)
Comment 18•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/81459ed973a8 https://hg.mozilla.org/mozilla-central/rev/932cc42e15c1
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Comment 19•6 years ago
|
||
It would have been nice to remove the ForceIsFirstPaint IPDL message since it's no longer being used after this patch.
Comment 20•6 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #17) > (In reply to Sebastian Kaspari (:sebastian) from comment #4) > > > [geckoview:klar:p2] because Dylan says Focus has implemented a workaround. > > > > Re-using GeckoSession was our workaround for avoiding to save state that > > hangs infrequently. Either one of those requires a fix or we cannot > > implement tab switching with GeckoView. > > Jim, do we need to uplift your fix to 62 Beta for the Focus 7.0 beta test? > Does Focus need to make any code changes to its use of GeckoSession after > your fix? We should uplift. With this fix I think Focus can start doing session-switching instead of session-restoring when switching tabs. So yes there needs to be Focus code changes as well. (In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #19) > It would have been nice to remove the ForceIsFirstPaint IPDL message since > it's no longer being used after this patch. Good point! I can push a followup.
Flags: needinfo?(nchen)
Comment 21•6 years ago
|
||
Remove the PCompositorBridge::ForceIsFirstPaint call that's no longer used anywhere.
Attachment #8996360 -
Flags: review?(bugmail)
Comment 22•6 years ago
|
||
Comment on attachment 8996360 [details] [diff] [review] Bug 1472140 - 3. Remove ForceIsFirstPaint ipdl call Review of attachment 8996360 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #8996360 -
Flags: review?(bugmail) → review+
Comment 23•6 years ago
|
||
Pushed by nchen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/78d9fa4f595b 3. Remove ForceIsFirstPaint ipdl call; r=kats
Comment 24•6 years ago
|
||
status-firefox63=affected as per comment 20
Comment 25•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/78d9fa4f595b
Comment 26•6 years ago
|
||
Comment on attachment 8996085 [details] Bug 1472140 - 1. Set first paint flag when resuming and resizing composition; Approval Request Comment [Feature/Bug causing the regression]: N/A [User impact if declined]: White screen when switching sessions in GeckoView app. [Is this code covered by automated tests?]: No [Has the fix been verified in Nightly?]: Yes [Needs manual test from QE? If yes, steps to reproduce]: No [List of other uplifts needed for the feature/fix]: None [Is the change risky?]: Not really [Why is the change risky/not risky?]: GeckoView-only fix that should have minimal impact on Fennec [String changes made/needed]: None
Attachment #8996085 -
Flags: approval-mozilla-beta?
Comment on attachment 8996085 [details] Bug 1472140 - 1. Set first paint flag when resuming and resizing composition; GeckoView related, Beta62+
Attachment #8996085 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 28•6 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/b7c86a171b24 https://hg.mozilla.org/releases/mozilla-beta/rev/d0ffdf9419b5 https://hg.mozilla.org/releases/mozilla-beta/rev/43ad096a472b
Updated•5 years ago
|
Product: Firefox for Android → GeckoView
Updated•5 years ago
|
Target Milestone: Firefox 63 → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•