Closed Bug 1525796 Opened 5 years ago Closed 5 years ago

If you press the X button to close the page it becomes "Ghostly"

Categories

(Firefox for Android Graveyard :: Overlays, defect, P2)

Firefox 65
All
Android
defect

Tracking

(firefox65 wontfix, firefox66 wontfix, firefox67 verified)

VERIFIED FIXED
Firefox 67
Tracking Status
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- verified

People

(Reporter: Galomercer, Assigned: petru)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Android 9; Mobile; rv:65.0) Gecko/65.0 Firefox/65.0

Steps to reproduce:

Go to the "tabs" section. Then, keep pressed the "X" button to close a tab for ahout a second.
Additional info: This happened on a Xioami MI A1 with Android 9. However the bug still appeared in Android 8.1

Actual results:

The tab will not disappear unless the app is closed. New tabs will overlap the "Ghost" tab.

Expected results:

Either nothing, or the tab gets closed.

Hi, thanks for your report.
I tried to reproduce your issue using Nexus 6P (Android 8.1.0) and Google Pixel (Android 9) on Nightly (67.0a1 2019-02-06) and Release 65.0 but without any success. (please note that I tried several times)
Do you have some specific options or add-ons? Also, if you can retry with a fresh install it will be very awesome. I'll wait for your updates, thanks.

Flags: needinfo?(Galomercer)

(In reply to Stefan Deiac from comment #1)

Hi, thanks for your report.
I tried to reproduce your issue using Nexus 6P (Android 8.1.0) and Google Pixel (Android 9) on Nightly (67.0a1 2019-02-06) and Release 65.0 but without any success. (please note that I tried several times)
Do you have some specific options or add-ons? Also, if you can retry with a fresh install it will be very awesome. I'll wait for your updates, thanks.

HI. I uninstalled and installed Firefox again and, having no add ons or special configurations, the bug still happened. I recorded a video of it: https://youtu.be/70T9OFhSqVY

Flags: needinfo?(Galomercer)

Hi, thanks for your updates. I tried another one time with OnePlus 5T (Android 9) and Samsung Galaxy S8 (Android 8.0) and I can confirm the issue.
Builds:

  • Nightly 67.0a1 (2019-02-06);
  • Beta 66.0b5;
  • Release 65.0.

Notes:
-It seems that is 4/5 attempts reproducible.
-The 'Ghost' tabs disappear after closing and reopening the app.

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Android
Hardware: Unspecified → All

From discussing with Stefan I understand this is not a recent regression - the issue exists also on FF60.
Thanks for reporting.

Assignee: nobody → petru.lingurar
Status: NEW → ASSIGNED
Priority: -- → P2

Using an ItemTouchHelper for various motion actions means it will have a
strong reference to that item's layout and prevent it from being destroyed when
the adapter tries to remove it before the animations are finished - the item
will be removed from RecyclerView's Adapter but the item's layout will still
remain on screen.

This was a rabbit hole but I found that our TabsTouchHelperCallback is at fault here, it leaking the itemView for even after the tab was removed from the adapter.

Timeline showing the leak (with my logs added in code, hyperlinks to said logs position):
13:09:34.007 DRAW: action: ACTION_STATE_DRAG, isCurrentlyActive: true
13:09:34.029 DRAW: action: ACTION_STATE_DRAG, isCurrentlyActive: false
13:09:34.051 Trying to remove item #5 from 8 total: Glowing reviews tout counterfeit cash on the dark web - Los Angeles Times
13:09:34.052 We are left with 7 items
13:09:34.085 DRAW: action: ACTION_STATE_DRAG, isCurrentlyActive: false
13:09:34.191 DRAW: action: ACTION_STATE_DRAG, isCurrentlyActive: false
13:09:34.208 DRAW: action: ACTION_STATE_DRAG, isCurrentlyActive: false
13:09:34.230 DRAW: action: ACTION_STATE_DRAG, isCurrentlyActive: false
13:09:34.259 DRAW: action: ACTION_STATE_DRAG, isCurrentlyActive: false
13:09:34.273 User interaction with "Glowing reviews tout counterfeit cash on the dark web - Los Angeles Times" holder is finished

It is clearly seen that the itemHolder is still in TabsTouchHelperCallback even with 200ms after it should have been removed.

Unfortunately nothing I've tried (including getItemAnimator().isRunning() or getItemAnimator().endAnimation(item)) worked well so to reconcile both events - closing the tab and interacting with it I've created a new method in our TabsTouchHelperCallback - isInteractionInProgress which will inform if there is any interaction with RecyclerView's items in progress, including the time needed to finish return animations, and if so we will just ignore the close action.

Keywords: checkin-needed

Pushed by rmaries@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ed60c55e6f00
Ignore close tab action if user is moving the item; r=JanH

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Flags: qe-verify+

Is bug 1382125 a dup?

(In reply to Tom Klein from comment #9)

Is bug 1382125 a dup?

Seems like the same issue but happening in other part of the code.
Won't be fixed by this patch but the solution should be similar.

Verified as fixed on the latest version of Nightly (67.0a1 2019-02-18) using OnePlus 5T (Android 9).

Flags: qe-verify+

Given the low test coverage here I think it is likely best to let this ride with nightly. If you strongly feel it should be in 66 and is safe for uplift, let me know.

Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: