Closed Bug 1851259 Opened 1 year ago Closed 1 year ago

Crash in [@ java.lang.NullPointerException: at org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataFragment$$ExternalSyntheticLambda2.onClick(R8$$SyntheticClass:27)]

Categories

(Fenix :: History, defect, P3)

Firefox 115
Unspecified
Android
defect

Tracking

(firefox117 wontfix, firefox118 wontfix, firefox119 verified, firefox120 verified)

VERIFIED FIXED
120 Branch
Tracking Status
firefox117 --- wontfix
firefox118 --- wontfix
firefox119 --- verified
firefox120 --- verified

People

(Reporter: cpeterson, Assigned: vdreghici)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(3 files)

Vlad, this crash looks like a regression starting in Fenix 115. I suspect it's either a new regression or a changed crash signature from your fix in Fenix 115 for bug 1827650. The crash volume is low for now, so this bug might be a lower priority than other bugs you're working.

We've fixed similar NullPointerException crashes in DeleteBrowsingDataFragment in Fenix 111 (bug 1802619), 113 (bug 1822620), and 115 (bug 1827650).

Crash report: https://crash-stats.mozilla.org/report/index/44052a5b-e9c4-436e-9ddb-78b500230901

Java stack trace:

java.lang.NullPointerException
	at org.mozilla.fenix.settings.deletebrowsingdata.DeleteBrowsingDataFragment$$ExternalSyntheticLambda2.onClick(R8$$SyntheticClass:27)
	at androidx.appcompat.app.AlertController$ButtonHandler.handleMessage(AlertController.java:38)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:240)
	at android.os.Looper.loop(Looper.java:351)
	at android.app.ActivityThread.main(ActivityThread.java:8381)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
Flags: needinfo?(Vlad.DreghiciPopa)
Assignee: nobody → giorga

I will take a look into this as soon as I can, seems to me like there still might be a method to click on the confirmation dialog after the fragment has been detached.

Flags: needinfo?(Vlad.DreghiciPopa)
Assignee: giorga → nobody

I have been trying to reproduce this crash now for a couple of hours, but couldn't find out what provokes it. I did manage to find it on sentry as well here, but this doesn't give us much to work with.

Considering how close the stack trace is to 1827650, I am pretty sure that there is a similar scenario happening here that we just could not reproduce.

I would wait for some more details on this or some STR, not sure what else could be done.

Vlad, is there something actionable for an uplift? Thanks

Flags: needinfo?(Vlad.DreghiciPopa)

(In reply to Pascal Chevrel:pascalc from comment #3)

Vlad, is there something actionable for an uplift? Thanks

I have tried reproducing this and looked at some sentry entries as well, but I could not figure this out. I have created a speculative PR for it, where I think the issue might be.

Flags: needinfo?(Vlad.DreghiciPopa)
Status: NEW → RESOLVED
Closed: 1 year ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch

Note for QA team, I could not reproduce this crash on a Pixel 3 with A12 or Pixel 7 with A13. My hunch was that the dialog that asks the user to delete selections might still be visible after somehow leaving the deletion screen. This patch aims to disallow the deletion in case the screen does not exist anymore. I'll do an uplift after this has been verified.

Verified as fixed on the latest Nightly ( 120.0a1 from 10.10.2023) with Google Pixel 7 PRO ( Android 14) and Motorola G9 Plus ( Android 11). The app doesn't crash after leaving the deletion screen, when the dialog that asks the user to delete selections was previously visible.

Comment on attachment 9357635 [details] [review]
[mozilla-mobile/firefox-android] Bug 1851259 - Delete browsing data only if fragment attached (backport #3973) (#4015)

Beta/Release Uplift Approval Request

  • User impact if declined: This fix aims to eliminate the crash which might occur when leaving the deletion fragment, while the deletion confirmation dialog might still be visible. If declined, the crash might continue occurring.
  • 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: Same steps as previously stated.
  • 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 because it just disallows taking actions of the dialog when fragment is not attached
  • String changes made/needed: no
  • Is Android affected?: Yes
Attachment #9357635 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Assignee: nobody → Vlad.DreghiciPopa
Comment on attachment 9357635 [details] [review] [mozilla-mobile/firefox-android] Bug 1851259 - Delete browsing data only if fragment attached (backport #3973) (#4015) Approved for Fenix 119.0b8
Attachment #9357635 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified on latest Beta 119.0b8. The issue was not encountered.
Tested with:

  • Google Pixel 7 Pro ( Android 14)
  • Lenovo Tab P11 Pro (Android 12)
  • Xiaomi Mi 8 Lite (Android 10)
  • Huawei MediaPad M2 (Android 5.1.1)
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: