apptentive / apptentive-android

Apptentive Android SDK
http://www.apptentive.com
BSD 3-Clause "New" or "Revised" License
65 stars 64 forks source link

Crash when asking for user feedback #171

Closed MikeMostovyi closed 5 years ago

MikeMostovyi commented 5 years ago

Happened on Android 9, Apptentive SDK 5.3.1.

Steps:

  1. Apptentive dialog is presented with the question if user likes the app.
  2. User presses NO.
  3. Crash occurs.
    java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 0(offset:0).state:2 com.apptentive.android.sdk.module.messagecenter.view.MessageCenterRecyclerView{d788d9 VFED.V... ......ID 0,0-1080,1927 #7f0a01e7 app:id/message_center_recycler_view}, adapter:com.apptentive.android.sdk.module.messagecenter.view.MessageCenterRecyclerViewAdapter@62a3e0, layout:android.support.v7.widget.LinearLayoutManager@72e3699, context:com.apptentive.android.sdk.ApptentiveViewActivity@ffd7da0
        at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5923)
        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5858)
        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5854)
        at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2230)
        at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1557)
        at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1517)
        at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:622)
        at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3924)
        at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3641)
        at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:4194)
        at android.view.View.layout(View.java:20831)
        at android.view.ViewGroup.layout(ViewGroup.java:6203)
        at android.support.design.widget.CoordinatorLayout.layoutChild(CoordinatorLayout.java:1183)
        at android.support.design.widget.CoordinatorLayout.onLayoutChild(CoordinatorLayout.java:870)
        at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:889)
        at android.view.View.layout(View.java:20831)
        at android.view.ViewGroup.layout(ViewGroup.java:6203)
        at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1775)
        at android.view.View.layout(View.java:20831)
        at android.view.ViewGroup.layout(ViewGroup.java:6203)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:20831)
        at android.view.ViewGroup.layout(ViewGroup.java:6203)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
        at android.view.View.layout(View.java:20831)
        at android.view.ViewGroup.layout(ViewGroup.java:6203)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:20831)
        at android.view.ViewGroup.layout(ViewGroup.java:6203)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:20831)
        at android.view.ViewGroup.layout(ViewGroup.java:6203)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
        at android.view.View.layout(View.java:20831)
        at android.view.ViewGroup.layout(ViewGroup.java:6203)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
        at android.view.View.layout(View.java:20831)
        at android.view.ViewGroup.layout(ViewGroup.java:6203)
        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:754)
        at android.view.View.layout(View.java:20831)
        at android.view.ViewGroup.layout(ViewGroup.java:6203)
weeeBox commented 5 years ago

Hi @MikeMostovyiNGTI,

Sorry for the issue. Did you use a device or an emulator? What the contents of your build.gradle file?

MikeMostovyi commented 5 years ago

@weeeBox, the issue occurred on OnePlus 6. We are using Support Library 28.0.0. What else from build.gradle do you think might be relevant?

weeeBox commented 5 years ago

@MikeMostovyiNGTI, we have a hard time reproducing the issue. The more information you can provide - the better.

weeeBox commented 5 years ago

We figured it out. Fix would be available in 5.3.3

weeeBox commented 5 years ago

Now available in 5.3.3