mozilla-mobile / fenix

⚠️ Fenix (Firefox for Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android
https://github.com/mozilla-mobile/firefox-android
Mozilla Public License 2.0
6.47k stars 1.27k forks source link

[Bug][a11y][crash] Firefox Beta crashes when talkback is on and the user switches normal/private tabs #14948

Closed lobontiumira closed 4 years ago

lobontiumira commented 4 years ago

Steps to reproduce

  1. Turn talkback/voice assistant on.
  2. Open Firefox Beta.
  3. Have a few tabs opened in normal mode.
  4. From the tabs tray switch to private mode, then back to normal mode.

Expected behavior

The user can switch from normal mode to private and vice-versa in tabs tray, without issues.

Actual behavior

Firefox Beta crashes.

Device information

logcat-crash.txt

Here are the three crashes: 1. e84b95bb-6fdf-4fc2-a0a1-15b424383fc7 java.lang.IndexOutOfBoundsException: Index: 3, Size: 3

2. defc6e11-c491-497b-93eb-71479f261bef java.lang.IndexOutOfBoundsException: Index: 4, Size: 4

java.lang.IndexOutOfBoundsException: Index: 4, Size: 4 at java.util.ArrayList.get(ArrayList.java:437) at mozilla.components.browser.tabstray.TabsAdapter.onBindViewHolder(TabsAdapter.kt:3) at org.mozilla.fenix.tabtray.FenixTabsAdapter.onBindViewHolder(FenixTabsAdapter.kt:7) at org.mozilla.fenix.tabtray.FenixTabsAdapter.onBindViewHolder(FenixTabsAdapter.kt:5) at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:8) at androidx.recyclerview.widget.ConcatAdapterController.onBindViewHolder(ConcatAdapterController.java:4) at androidx.recyclerview.widget.ConcatAdapter.onBindViewHolder(ConcatAdapter.java:1) at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:1) at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:8) at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:146) at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:1) at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:8) at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1) at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:12) at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:120) at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:12) at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:15) at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:2) at android.view.View.layout(View.java:19653) at android.view.ViewGroup.layout(ViewGroup.java:6082) at androidx.constraintlayout.widget.ConstraintLayout.onLayout(ConstraintLayout.java:12) at android.view.View.layout(View.java:19653) at android.view.ViewGroup.layout(ViewGroup.java:6082) at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayoutChild(CoordinatorLayout.java:54) at com.google.android.material.bottomsheet.BottomSheetBehavior.onLayoutChild(BottomSheetBehavior.java:22) at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:7) at android.view.View.layout(View.java:19653) at android.view.ViewGroup.layout(ViewGroup.java:6082) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:19653) at android.view.ViewGroup.layout(ViewGroup.java:6082) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1635) at android.widget.LinearLayout.onLayout(LinearLayout.java:1544) at android.view.View.layout(View.java:19653) at android.view.ViewGroup.layout(ViewGroup.java:6082) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at com.android.internal.policy.DecorView.onLayout(DecorView.java:758) at android.view.View.layout(View.java:19653) at android.view.ViewGroup.layout(ViewGroup.java:6082) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2626) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2321) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1466) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6982) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:927) at android.view.Choreographer.doCallbacks(Choreographer.java:729) at android.view.Choreographer.doFrame(Choreographer.java:658) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:913) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:180) at android.app.ActivityThread.main(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:835)

3. 148ce5a0-9a7c-4b96-bbee-d753d1790f6e java.lang.IndexOutOfBoundsException: Index: 10, Size: 10

┆Issue is synchronized with this Jira Task

mcarare commented 4 years ago

This is the same as https://github.com/mozilla-mobile/fenix/issues/14540, that has been fixed in https://github.com/mozilla-mobile/fenix/pull/14577.

liuche commented 4 years ago

If it's the same then we'll close it.