Closed Bug 1822619 Opened 1 year ago Closed 1 year ago

Focus Crash in [@ java.lang.NullPointerException: at org.mozilla.focus.autocomplete.AutocompleteListFragment$itemTouchHelper$1.getMovementFlags(AutocompleteListFragment.kt:3)]

Categories

(Focus :: General, defect, P2)

Unspecified
Android

Tracking

(firefox111 wontfix, firefox112 verified, firefox113 verified)

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

People

(Reporter: cpeterson, Assigned: avirvara)

References

Details

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

Crash Data

Attachments

(4 files, 1 obsolete file)

This crash might be a regression in Focus 109.

Crash report: https://crash-stats.mozilla.org/report/index/cffbe569-a9b7-44f0-9793-c099b0230314

Java stack trace:

java.lang.NullPointerException: Parameter specified as non-null is null: method org.mozilla.focus.autocomplete.AutocompleteListFragment$itemTouchHelper$1.getMovementFlags, parameter recyclerView
	at org.mozilla.focus.autocomplete.AutocompleteListFragment$itemTouchHelper$1.getMovementFlags(AutocompleteListFragment.kt:3)
	at androidx.recyclerview.widget.ItemTouchHelper.startDrag(ItemTouchHelper.java:5)
	at org.mozilla.focus.autocomplete.AutocompleteListFragment$DomainViewHolder$$ExternalSyntheticLambda1.onTouch(R8$$SyntheticClass:21)
	at android.view.View.dispatchTouchEvent(View.java:13695)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3249)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2881)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3249)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2881)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3249)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2881)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3249)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2881)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3249)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2881)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3249)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2881)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3249)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2881)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3249)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2881)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3249)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2881)
	at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:741)
	at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:2013)
	at android.app.Activity.dispatchTouchEvent(Activity.java:4180)
	at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:3)
	at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:687)
	at android.view.View.dispatchPointerEvent(View.java:13962)
	at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6420)
	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6215)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5604)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5657)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5623)
	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5781)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5631)
	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5838)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5604)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5657)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5623)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5631)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5604)
	at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8701)
	at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8621)
	at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:8574)
	at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:8959)
	at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:239)
	at android.os.MessageQueue.nativePollOnce(Native Method)
	at android.os.MessageQueue.next(MessageQueue.java:363)
	at android.os.Looper.loop(Looper.java:176)
	at android.app.ActivityThread.main(ActivityThread.java:8668)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
Assignee: nobody → avirvara

For posterity it seems to be a regression after https://github.com/mozilla-mobile/firefox-android/commit/08a4accd95245aefee80c037142d8e73ca59f993#diff-50d6207d57d99bc04260668b6c87256cb402dafb8a2c7e67d701fe8b3adb1cd5R308 which modified the UX and introduced this crash for everytime the user tried to reorder the list of sites in which to autocomplete while in select to remove mode.
As such the fix would be a one liner and I suggest uplifting it to at least beta.

Authored by https://github.com/Alexandra-Virvara
https://github.com/mozilla-mobile/firefox-android/commit/a86f65a86a563dd674ea59271a9c6ef13cbfa721
[main] Bug 1822619 - change handleView visibility depending on selection mode
Status: NEW → RESOLVED
Closed: 1 year ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

Alexandra, since this bug is both a crash and a recent regression, your fix might be a good candidate to uplift to Beta 112.

Here are the instructions for requesting uplift from Nightly/main to the Beta branch:

https://github.com/mozilla-mobile/firefox-android/blob/main/docs/shared/uplift_guide.md

Flags: needinfo?(avirvara)

Verified as fixed on the latest Focus nightly 113.0a1 from 3/27 with the following devices:

  • Oppo Find X3 Lte (Android 11), and
  • Lenovo tablet M10 (Android 10).

STR:

  1. Go to Settings - Search - URL Autocomplete - Manage sites.
  2. Add two or more customed URLs.
  3. Tap the hamburger-menu icon from the right side of the added URL, and drag it down/up in order to switch the URLs order.
Flags: qe-verify+

Comment on attachment 9325164 [details] [review]
[mozilla-mobile/firefox-android] Bug 1822619 - change handleView visibility depending on selection mode (backport #1386) (#1422)

Beta/Release Uplift Approval Request

  • User impact if declined: the user will still witness the app 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: 1. Go to Settings - Search - URL Autocomplete - Manage sites.
  1. Add two or more custom URLs.
  2. Tap the hamburger-menu icon from the right side of the added URL, and drag it down/up in order to switch the URLs order.
  • 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 solves a simple UX problem + the crash generated by it and doesn't affect other functionalities
  • String changes made/needed: none
  • Is Android affected?: Yes
Flags: needinfo?(avirvara)
Attachment #9325164 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Adding the backport for beta (releases_v112)
Approved for Mobile 112.0b8

Attachment #9325200 - Flags: approval-mozilla-beta+
Comment on attachment 9325164 [details] [review]
[mozilla-mobile/firefox-android] Bug 1822619 - change handleView visibility depending on selection mode (backport #1386) (#1422)

removing beta flag since I added it to the backport that corresponds to beta (releases_v112). If you meant to nominate this patch for release (releases_v111), please add the approval-mozilla-release flag.
Attachment #9325164 - Flags: approval-mozilla-beta?
Attachment #9325200 - Attachment description: GitHub Pull Request → Bug 1822619 - change handleView visibility depending on selection mode (backport #1386)
Attachment #9325199 - Flags: approval-mozilla-beta+
Attachment #9325200 - Attachment is obsolete: true

Verified as fixed on the latest Focus Beta 112.0b8 with the following devices:

  • Samsung Galaxy Note 8 (Android 9), and
  • Google Pixel 6 (Android 13).
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: