Closed Bug 1824648 Opened 3 years ago Closed 3 years ago

TCP CFR crash in [@ android.view.WindowManager$BadTokenException: at android.view.ViewRootImpl.setView(ViewRootImpl.java)]

Categories

(Firefox for Android :: General, defect)

Unspecified
Android
defect

Tracking

()

VERIFIED FIXED
113 Branch
Tracking Status
firefox111 --- wontfix
firefox112 --- verified
firefox113 --- verified

People

(Reporter: cpeterson, Assigned: aputanu)

References

(Blocks 1 open bug)

Details

(Keywords: crash, regression, topcrash, Whiteboard: [fxdroid] [experience])

Crash Data

Attachments

(2 files)

This crash is a regression in Fenix 111 in the TCP CFR code.

Crash report: https://crash-stats.mozilla.org/report/index/98fea103-af10-4eac-bab9-e49ed0230327

Java stack trace:

android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
	at android.view.ViewRootImpl.setView(ViewRootImpl.java:925)
	at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:384)
	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94)
	at mozilla.components.compose.cfr.CFRPopup$$ExternalSyntheticLambda0.run(R8$$SyntheticClass:57)
	at android.os.Handler.handleCallback(Handler.java:790)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:198)
	at android.app.ActivityThread.main(ActivityThread.java:7055)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:523)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:836)
Blocks: 1536505

The bug is linked to a topcrash signature, which matches the following criteria:

  • Top 10 AArch64 and ARM crashes on beta
  • Top 10 AArch64 and ARM crashes on release

:cpeterson, could you consider increasing the severity of this top-crash bug?

For more information, please visit auto_nag documentation.

Flags: needinfo?(cpeterson)
Keywords: topcrash

This was fixed by the CFRPopup with the speculative fix in bug 1799996. We need to upstream the fix to the android component where the CFRPopup now lives.

Severity: -- → S2
Flags: needinfo?(cpeterson)
See Also: → 1799996
See Also: → 1824854

Setting firefox111=fix-optional because we aren't planning a third dot release for 111. If we have an unplanned dot release for 111, we could consider letting this fix ride along.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

Is this something you want to uplift to 112?

Flags: needinfo?(aputanu)

(In reply to Dianna Smith [:diannaS] from comment #6)

Is this something you want to uplift to 112?

Alexandru, I think we should uplift your crash fix to Beta 112. TCP is currently rolling out in Fenix 111, so lots of users may be seeing this crash in 111.

We aren't planning a third dot release for 111, but if we have an unplanned dot release for 111, we could consider letting this fix ride along.

Assignee: nobody → aputanu

Using the same steps to reproduce as we did for 1799996 from the following comment: "The only possibility we can come up with here is some sort of camera permissions prompt issue on a restart of the browser."
The browser didn't crash after these steps were taken multiple times.
Tested on the latest Nightly build: 113.0a1 (2023-03-29).
Device used: Google Pixel 7 (Android 13).
Marking this ticket as verified for 113.

Flags: qe-verify+

Comment on attachment 9325602 [details] [review]
[mozilla-mobile/firefox-android] Bug 1824648 - Upstream CFRPopup null window fix to A-C (backport #1437) (#1455)

Beta/Release Uplift Approval Request

  • User impact if declined: V112 users will experience the TCP CFR crash.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: The same steps used for 1799996, declining the camera permission prompt and reopening Fenix multiple times.
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The change is not risky as it was previously merged and verified in 1799996
  • String changes made/needed: none
  • Is Android affected?: Yes
Flags: needinfo?(aputanu)
Attachment #9325602 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Comment on attachment 9325602 [details] [review] [mozilla-mobile/firefox-android] Bug 1824648 - Upstream CFRPopup null window fix to A-C (backport #1437) (#1455) Approved for Mobile 112.0b9
Attachment #9325602 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified as fixed on the latest Firefox 112.0b9 with Motorola Moto G9 plus (Android 11).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: