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

[Bug] Fenix crashes when opening tabs tray #10453

Closed
cadeyrn opened this issue May 6, 2020 · 4 comments
Closed

[Bug] Fenix crashes when opening tabs tray #10453

cadeyrn opened this issue May 6, 2020 · 4 comments
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info 🐞 bug Crashes, Something isn't working, .. needs:triage Issue needs triage

Comments

@cadeyrn
Copy link
Contributor

cadeyrn commented May 6, 2020

Steps to reproduce

  1. enable the tabs tray
  2. open the tabs tray

Expected behavior

No crash.

Actual behavior

Fenix crashes.

2020-05-06 23:37:06.413 8398-8398/org.mozilla.fenix.debug E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.mozilla.fenix.debug, PID: 8398
    java.lang.IllegalStateException: Cannot add item decoration during a scroll  or layout
        at androidx.recyclerview.widget.RecyclerView.assertNotInLayoutOrScroll(RecyclerView.java:3053)
        at androidx.recyclerview.widget.RecyclerView$LayoutManager.assertNotInLayoutOrScroll(RecyclerView.java:7898)
        at androidx.recyclerview.widget.LinearLayoutManager.assertNotInLayoutOrScroll(LinearLayoutManager.java:1410)
        at androidx.recyclerview.widget.RecyclerView.addItemDecoration(RecyclerView.java:1569)
        at androidx.recyclerview.widget.RecyclerView.addItemDecoration(RecyclerView.java:1597)
        at org.mozilla.fenix.HomeActivity$onCreateView$adapter$1.invoke(HomeActivity.kt:233)
        at org.mozilla.fenix.HomeActivity$onCreateView$adapter$1.invoke(HomeActivity.kt:93)
        at mozilla.components.browser.tabstray.TabsAdapter.onCreateViewHolder(TabsAdapter.kt:46)
        at mozilla.components.browser.tabstray.TabsAdapter.onCreateViewHolder(TabsAdapter.kt:26)
        at androidx.recyclerview.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:7078)
        at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6235)
        at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
        at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
        at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
        at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1627)
        at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
        at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
        at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4134)
        at androidx.recyclerview.widget.RecyclerView.onMeasure(RecyclerView.java:3540)
        at android.view.View.measure(View.java:24730)
        at androidx.constraintlayout.widget.ConstraintLayout$Measurer.measure(ConstraintLayout.java:724)
        at androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.measure(BasicMeasure.java:394)
        at androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.measureChildren(BasicMeasure.java:105)
        at androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure.solverMeasure(BasicMeasure.java:227)
        at androidx.constraintlayout.solver.widgets.ConstraintWidgetContainer.measure(ConstraintWidgetContainer.java:113)
        at androidx.constraintlayout.widget.ConstraintLayout.resolveSystem(ConstraintLayout.java:1460)
        at androidx.constraintlayout.widget.ConstraintLayout.onMeasure(ConstraintLayout.java:1539)
        at android.view.View.measure(View.java:24730)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6858)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
        at android.view.View.measure(View.java:24730)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6858)
        at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
        at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
        at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
        at android.view.View.measure(View.java:24730)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6858)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
        at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:146)
        at android.view.View.measure(View.java:24730)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6858)
        at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
        at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
        at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
        at android.view.View.measure(View.java:24730)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6858)
2020-05-06 23:37:06.414 8398-8398/org.mozilla.fenix.debug E/AndroidRuntime:     at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
        at android.view.View.measure(View.java:24730)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6858)
        at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
        at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
        at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
        at android.view.View.measure(View.java:24730)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6858)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
        at com.android.internal.policy.DecorView.onMeasure(DecorView.java:749)
        at android.view.View.measure(View.java:24730)
        at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3264)
        at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2047)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2342)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1935)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8023)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1163)
        at android.view.Choreographer.doCallbacks(Choreographer.java:986)
        at android.view.Choreographer.doFrame(Choreographer.java:902)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1148)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7695)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

It's a regression from #10325. /cc @darkwing

Device information

  • Android device: OnePlus 7T Pro McLaren Edition / Oxygen OS 10.0.8 (Android 10)
  • Fenix version: master branch revision 8b27a48

┆Issue is synchronized with this Jira Task

@cadeyrn cadeyrn added the 🐞 bug Crashes, Something isn't working, .. label May 6, 2020
@github-actions github-actions bot added the needs:triage Issue needs triage label May 6, 2020
@mcarare
Copy link
Contributor

mcarare commented May 7, 2020

I can confirm the crash and the regression origin. Thanks @cadeyrn!

@mcarare mcarare added the b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info label May 7, 2020
@pocmo
Copy link
Contributor

pocmo commented May 7, 2020

CC @darkwing, @boek

@Mugurell and I decided to not backout the patch since it only affects users that have explicitly enabled the new tabs tray in the hidden settings screen.

mcarare added a commit to mcarare/fenix that referenced this issue May 7, 2020
mcarare added a commit to mcarare/fenix that referenced this issue May 7, 2020
…alled.

Applying item decoration needs to be done after setAdapter() is called
because it affects measurement of items views.
mcarare added a commit to mcarare/fenix that referenced this issue May 7, 2020
…alled.

Applying item decoration needs to be done after setAdapter() is called
because it affects measurement of items views.
jonalmeida added a commit to jonalmeida/fenix that referenced this issue May 7, 2020
@andreicristianpetcu
Copy link

It's fixed for me

@cadeyrn
Copy link
Contributor Author

cadeyrn commented May 9, 2020

I can confirm that Fenix no longer crashes. Since it affects a hidden feature I'll just close the issue. I don't think additional QA verification is needed. If you disagree please reopen. :)

@cadeyrn cadeyrn closed this as completed May 9, 2020
mcarare added a commit to mcarare/fenix that referenced this issue May 12, 2020
mcarare added a commit to mcarare/fenix that referenced this issue May 12, 2020
…yout.

This prevents background ripple showing behind background view.
@liuche liuche mentioned this issue May 19, 2020
32 tasks
@data-sync-user data-sync-user changed the title [Bug] Fenix crashes when opening tabs tray FNX2-15961 ⁃ [Bug] Fenix crashes when opening tabs tray Jul 30, 2020
@data-sync-user data-sync-user changed the title FNX2-15961 ⁃ [Bug] Fenix crashes when opening tabs tray FNX-4293 ⁃ [Bug] Fenix crashes when opening tabs tray Aug 10, 2020
@data-sync-user data-sync-user changed the title FNX-4293 ⁃ [Bug] Fenix crashes when opening tabs tray FNX3-13906 ⁃ [Bug] Fenix crashes when opening tabs tray Aug 10, 2020
@cadeyrn cadeyrn closed this as completed Aug 10, 2020
@data-sync-user data-sync-user changed the title FNX3-13906 ⁃ [Bug] Fenix crashes when opening tabs tray FNX-4293 ⁃ [Bug] Fenix crashes when opening tabs tray Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX-4293 ⁃ [Bug] Fenix crashes when opening tabs tray FNX2-15961 ⁃ [Bug] Fenix crashes when opening tabs tray Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX2-15961 ⁃ [Bug] Fenix crashes when opening tabs tray [Bug] Fenix crashes when opening tabs tray May 18, 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 🐞 bug Crashes, Something isn't working, .. needs:triage Issue needs triage
Projects
None yet
Development

No branches or pull requests

5 participants