Closed lumleon closed 7 years ago
Hi, I also got this problem
I create a viewpager with fragments inside it, in active fragment, there is a recycler view, I opened a new activity and do some stuff in there, and click back, I got several errors,
I would like to help if there is anything that I can do
Best Regards Steve
Hi all,
for additional info, I have tried to cleanup when it is on destroy/stop but, it still giving me that error
Is there anyone who encounter the same problem?
Best regards Steve
@stevedj @lumleon The error you're getting isn't because of FirebaseUI, it's an issue with how you're using the RecyclerView
:
java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 4(offset:4).state:5
I've had this issue before and here was my solution: https://issuetracker.google.com/issues/37135118#comment9
Make sure not to do anything funky with ViewHolder
s and you should be good. Hope this helps! 😄
@samtstern I believe this issue can be closed due to inactivity.
Welcome to FirebaseUI and thanks for submitting an issue!
Please take a look at open issues, as well as resolved issues, to see if your issue is either already being addressed, or has been solved by someone else.
If not, please feel free to fill in the following info so we can help faster!
Step 1: Are you in the right place?
Step 2: Describe your environment
Step 3: Describe the problem:
Steps to reproduce:
Observed Results:
What happened? This could be a description,
logcat
output, etc. 03-25 22:48:54.560 8547-8583/com.anrex.raceblogger V/FA: Recording user engagement, ms: 4194 03-25 22:48:54.561 8547-8583/com.anrex.raceblogger V/FA: Activity paused, time: 2423311 03-25 22:48:54.574 8547-8583/com.anrex.raceblogger D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=4194, _sc=DailyRaceTipsActivity, _si=7506535637291765120}] 03-25 22:48:54.579 8547-8547/com.anrex.raceblogger D/AutoManageHelper: onStart true {0=com.google.android.gms.internal.zzaaa$zza@c5ff290} 03-25 22:48:54.584 8547-8547/com.anrex.raceblogger D/InappBilling: Creating IAB helper. 03-25 22:48:54.584 8547-8547/com.anrex.raceblogger D/InappBilling: Starting setup. 03-25 22:48:54.584 8547-8547/com.anrex.raceblogger D/IabHelper: Starting in-app billing setup. 03-25 22:48:54.588 8547-8547/com.anrex.raceblogger D/InappBilling: Setup finished. 03-25 22:48:54.588 8547-8547/com.anrex.raceblogger E/InappBilling: **** InApp Error: Problem setting up in-app billing: IabResult: Billing service unavailable on device. (response: 3:Billing Unavailable) 03-25 22:48:54.588 8547-8547/com.anrex.raceblogger D/InappBilling: Showing alert dialog: Error: Problem setting up in-app billing: IabResult: Billing service unavailable on device. (response: 3:Billing Unavailable) 03-25 22:48:54.645 8547-8558/com.anrex.raceblogger I/art: Background sticky concurrent mark sweep GC freed 1125(125KB) AllocSpace objects, 8(3MB) LOS objects, 12% free, 23MB/26MB, paused 8.175ms total 70.496ms 03-25 22:48:54.658 8547-8583/com.anrex.raceblogger V/FA: Activity resumed, time: 2423383 03-25 22:48:54.691 8547-8547/com.anrex.raceblogger D/AndroidRuntime: Shutting down VM 03-25 22:48:54.691 8547-8547/com.anrex.raceblogger E/UncaughtException: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 4(offset:4).state:5 at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5504) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5440) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5436) at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2224) at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1551) at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1511) at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:595) at android.support.v7.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:3534) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3310) at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3844) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1795) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.support.design.widget.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:131) at android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42) at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1391) at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:870) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:1193) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) 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:726) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2346) 03-25 22:48:54.691 8547-8547/com.anrex.raceblogger E/UncaughtException: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2068) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:621) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 03-25 22:48:54.698 8547-8583/com.anrex.raceblogger D/FA: Logging event (FE): _ae, Bundle[{_o=crash, _sc=MainActivity, _si=7506535637291765119, timestamp=1490435334692, fatal=1}] 03-25 22:48:54.923 8547-8547/com.anrex.raceblogger E/AndroidRuntime: FATAL EXCEPTION: main Process: com.anrex.raceblogger, PID: 8547 java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 4(offset:4).state:5 at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5504) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5440) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5436) at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2224) at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1551) at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1511) at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:595) at android.support.v7.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:3534) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3310) at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3844) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1795) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.support.design.widget.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:131) at android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42) at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1391) at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:870) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:1193) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) 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:726) at android.view.View.layout(View.java:17637) at android.view.ViewGroup.layout(ViewGroup.java:5575) 03-25 22:48:54.923 8547-8547/com.anrex.raceblogger E/AndroidRuntime: at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2346) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2068) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:621) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)Expected Results:
What did you expect to happen? should not be crashed when closing the activity
Relevant Code: