java.lang.illegalArgumentException: vecx must be a finite, non-NaN value NaN on Android Devloper Preview 12
Categories
(GeckoView :: General, defect, P1)
Tracking
(firefox89+ verified, firefox90 verified)
People
(Reporter: kbrosnan, Assigned: agi)
References
Details
(Whiteboard: [geckoview:m90])
Crash Data
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
From github: https://github.com/mozilla-mobile/fenix/issues/19261.
Steps to reproduce
Browse around, scroll up and down web pages enough to reach the bottom and top of a web page
Expected behavior
Normal operation when reaching the bottom of a webpage
Actual behavior
Screen flickers, Firefox eventually crashes
Device information
- Device vendor / model and Android version: Google Pixel 4a / Android 12 DP3
- Firefox for Android version: ? (go to Settings -> About Firefox)
Nightly 210425 17:01 (Build #2015806731)d2cb894c-a4be-4603-99e9-5fd7f9fddcfe
java.lang.IllegalArgumentException: vecX must be a finite, non-NaN value NaN
- Sentry: https://sentry.prod.mozaws.net/operations/fenix/?query=4c11dfa885f04f1fa4afc1a39c38b782
- Socorro: https://crash-stats.mozilla.org/report/index/bp-602308aa-d83b-49ef-b4dc-b35ea0210427
java.lang.IllegalArgumentException: vecX must be a finite, non-NaN value NaN
at android.graphics.RenderNode.stretch(RenderNode.java:725)
at android.widget.EdgeEffect.draw(EdgeEffect.java:633)
at org.mozilla.geckoview.OverscrollEdgeEffect.draw(OverscrollEdgeEffect.java:17)
at org.mozilla.geckoview.OverscrollEdgeEffect.draw(OverscrollEdgeEffect.java:7)
at org.mozilla.geckoview.GeckoView.dispatchDraw(GeckoView.java:3)
at android.view.View.updateDisplayListIfDirty(View.java:21412)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4498)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4471)
at android.view.View.updateDisplayListIfDirty(View.java:21377)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4498)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4471)
at android.view.View.updateDisplayListIfDirty(View.java:21377)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4498)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4471)
at android.view.View.updateDisplayListIfDirty(View.java:21377)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4498)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4471)
at android.view.View.updateDisplayListIfDirty(View.java:21377)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4498)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4471)
at android.view.View.updateDisplayListIfDirty(View.java:21377)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4498)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4471)
at android.view.View.updateDisplayListIfDirty(View.java:21377)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4498)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4471)
at android.view.View.updateDisplayListIfDirty(View.java:21377)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4498)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4471)
at android.view.View.updateDisplayListIfDirty(View.java:21377)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4498)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4471)
at android.view.View.updateDisplayListIfDirty(View.java:21377)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4498)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4471)
at android.view.View.updateDisplayListIfDirty(View.java:21377)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4498)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4471)
at android.view.View.updateDisplayListIfDirty(View.java:21377)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4498)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4471)
at android.view.View.updateDisplayListIfDirty(View.java:21377)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:534)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:540)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:616)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:4334)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4062)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3223)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2057)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8501)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1005)
at android.view.Choreographer.doCallbacks(Choreographer.java:826)
at android.view.Choreographer.doFrame(Choreographer.java:761)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:990)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7695)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:981)
Change performed by the Move to Bugzilla add-on.
Updated•4 years ago
|
Updated•4 years ago
|
OP from GitHub
When I say "Firefox eventually crashes" I mean Firefox crashes constantly. And it's not just up and down scrolling. If a page does not fit the window, it will flicker and crash.
| Reporter | ||
Updated•4 years ago
|
| Reporter | ||
Updated•4 years ago
|
Comment 2•4 years ago
|
||
Agi, do you have access to an Android 12 device to test on?
| Assignee | ||
Comment 3•4 years ago
|
||
Looks like I can test this on a Pixel 3.
Updated•4 years ago
|
| Assignee | ||
Comment 4•4 years ago
|
||
I can reproduce the crash on Fenix nightly and Android 12 preview.
| Assignee | ||
Comment 5•4 years ago
|
||
I looked into it yesterday. Some notes:
- This crash is in the overscroll code path
- Overscroll doesn't seem to be displayed on Android 12 (neither is on my daily driver, on Android 10), from what I can see we try to access some hidden properties in the Android API but fail to do so, I believe newer Androids forbid using reflection like that
- This appears to be, at least partially, a system bug, from what I can see the inputs are all good
- I can't seem to be able to get the actual Android code being executed, the source code posted doesn't match what's running (there's no line 633 in EdgeEffect.java or no stretch method in RenderNode) so that makes it a little harder to diagnose.
I'll look into it more this afternoon
| Assignee | ||
Comment 6•4 years ago
•
|
||
I'm starting to understand what's going on. The overscroll effect changed in Android 12 from a grey overlay to a "ripple" effect that affects the entire surface. My theory now is that the SurfaceView that we use doesn't support this effect and thus displays a white image when the effect is being applied, which would explain the flickering. Not sure why the crash yet.
| Assignee | ||
Comment 7•4 years ago
|
||
Funnily enough Chrome doesn't support this either. I can see the correct effect being applied on GVE when I select TextureView as the backend.
| Assignee | ||
Comment 8•4 years ago
|
||
OK looks like we can use setType to restore the edge effect to the old style so that we can display one: https://developer.android.com/reference/android/widget/EdgeEffect#setType(int)
| Assignee | ||
Comment 9•4 years ago
|
||
Android 12 introduces a new type of overscroll effect named TYPE_STRETCH which
stretches the whole surface when overscrolling.
Unforunately, given how it's implemented, SurfaceView does not support this
type of effect, similarly to many other View effects.
The OverscrollEffect is currently crashing on Android 12 builds so we restore the
type to the previous (and only) default to fix the crash.
Note that Overscroll is still not displayed, I'll open a new bug to fix that
part.
This patch also avoids using reflection for setBlendMode on API 29 and later
where an API is actually available. Using reflection to access private APIs is
not available since Android 9 so this code was a no-op before this patch.
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
Backed out for linting failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/fe8976f25cb7740451ea24ac71cf6ebd039f0632
Failure log: https://treeherder.mozilla.org/logviewer?job_id=340331963&repo=autoland&lineNumber=1474
Comment 12•4 years ago
|
||
Comment 13•4 years ago
|
||
| bugherder | ||
Comment 14•4 years ago
|
||
Agi, it seems like something we should have fixed in out upcoming 89 Fenix release, could you request an uplift to beta please? Thanks
Updated•4 years ago
|
| Assignee | ||
Comment 15•4 years ago
•
|
||
Comment on attachment 9221700 [details]
Bug 1707959 - Set TYPE_GLOW overscroll type on Android 12.
Beta/Release Uplift Approval Request
- User impact if declined: Very frequent crashes on Android 12
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: - Open a google search on Firefox for Android on Android 12
- Scroll all the way down, screen should not flicker
- Press home button
- Open FF from the home screen and scroll down immediately, FF should not crash
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This code only runs on Android 12, where we crash pretty frequently without this change, so the inherent risk to make things worse is pretty low. The change is also wrapped around try catch block since it's reflection so in general there's not a lot that can go wrong
- String changes made/needed:
| Assignee | ||
Updated•4 years ago
|
Comment 16•4 years ago
|
||
Comment on attachment 9221700 [details]
Bug 1707959 - Set TYPE_GLOW overscroll type on Android 12.
Approved for the beta branch before 89 RC, thanks.
Comment 17•4 years ago
|
||
| bugherder uplift | ||
Updated•4 years ago
|
Comment 18•4 years ago
|
||
Verified as fixed on the Beta 89.0.0-beta.10, RC 88.1.4, and on 5/25 Nightly build with Google Pixel 4XL (Android 12)
Updated•4 years ago
|
Updated•4 years ago
|
Description
•