Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

[Crash] IndexOutOfBoundsException in TabsAdapter #21686

Closed
csadilek opened this issue Oct 4, 2021 · 3 comments
Closed

[Crash] IndexOutOfBoundsException in TabsAdapter #21686

csadilek opened this issue Oct 4, 2021 · 3 comments
Assignees
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info Feature:Tabs
Milestone

Comments

@csadilek
Copy link
Contributor

csadilek commented Oct 4, 2021

Sentry:
https://sentry.prod.mozaws.net/operations/firefox-nightly/issues/13492817/
https://sentry.prod.mozaws.net/operations/firefox-nightly/issues/13499090/

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
    at java.util.ArrayList.get(ArrayList.java:437)
    at org.mozilla.fenix.tabstray.browser.TabsAdapter.onBindViewHolder(TabsAdapter.kt:4)
    at org.mozilla.fenix.tabstray.browser.BrowserTabsAdapter.onBindViewHolder(BrowserTabsAdapter.kt:27)
    at org.mozilla.fenix.tabstray.browser.BrowserTabsAdapter.onBindViewHolder(BrowserTabsAdapter.kt:8)
    at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:9)
    at androidx.recyclerview.widget.ConcatAdapter.onBindViewHolder(ConcatAdapter.java:5)
    at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:1)
    at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:9)
    at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:143)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:1)
    at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:8)
    at androidx.recyclerview.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:12)
    at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:12)
    at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:119)
    at androidx.recyclerview.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:11)
    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:3)
    at android.view.View.layout(View.java:22085)

┆Issue is synchronized with this Jira Task

@csadilek csadilek added b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info Feature:Tabs labels Oct 4, 2021
@github-actions github-actions bot added the needs:triage Issue needs triage label Oct 4, 2021
@jonalmeida
Copy link
Contributor

We found some consistent STR for the bug:

  1. Ensure the app is completely stopped; swipe away from the app switcher.
  2. Open Fenix and enable the Secret Settings.
  3. Open the tabs tray and make a tab inactive.
  4. 💥

This is happening because when the TabsFeature calls our TabsTray.updateTabs, we are changing the reference to the list for it under the hood, so all calls to the DiffUtils will fail because the size of the list is wrong.

jonalmeida added a commit to jonalmeida/fenix that referenced this issue Oct 7, 2021
jonalmeida added a commit to jonalmeida/fenix that referenced this issue Oct 7, 2021
Co-authored-by: Roger Yang <royang@mozilla.com>
@jonalmeida
Copy link
Contributor

Sentry issue: FIREFOX-NIGHTLY-D5B

jonalmeida added a commit to jonalmeida/fenix that referenced this issue Oct 8, 2021
Co-authored-by: Roger Yang <royang@mozilla.com>
jonalmeida added a commit to jonalmeida/fenix that referenced this issue Oct 8, 2021
Co-authored-by: Roger Yang <royang@mozilla.com>
mergify bot pushed a commit that referenced this issue Oct 8, 2021
Co-authored-by: Roger Yang <royang@mozilla.com>
rocketsroger added a commit to rocketsroger/fenix that referenced this issue Oct 8, 2021
rocketsroger added a commit to rocketsroger/fenix that referenced this issue Oct 8, 2021
@amedyne amedyne removed the needs:triage Issue needs triage label Oct 11, 2021
rocketsroger added a commit to rocketsroger/fenix that referenced this issue Oct 12, 2021
Co-authored-by: Roger Yang <royang@mozilla.com>
rocketsroger added a commit to rocketsroger/fenix that referenced this issue Oct 12, 2021
mergify bot pushed a commit that referenced this issue Oct 12, 2021
Co-authored-by: Roger Yang <royang@mozilla.com>
@rocketsroger
Copy link
Contributor

Confirm that this is fixed. Closing.

@rocketsroger rocketsroger added this to the 94 milestone Oct 20, 2021
pkirakosyan pushed a commit to gexsi/user-agent-android that referenced this issue Mar 7, 2022
Co-authored-by: Roger Yang <royang@mozilla.com>
pkirakosyan pushed a commit to gexsi/user-agent-android that referenced this issue Mar 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info Feature:Tabs
Projects
None yet
Development

No branches or pull requests

4 participants