You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon deleting a post you should be given an indication that the post has been deleted and able to continue you using the application.
Actual Behaviour
Upon deleting a post a fatal exception is shown and the application stops.
Note: This issue only seems to be replicated when trying to delete your first post on first use of the application. If you have two posts this issue doesn't seem to be replicated.
Pre-requiste
The post which you aim to delete must be the first post which you have made with the application, therefore you must not have made any posts on the application prior to testing this issue.
Steps to reproduce
When logged into the application, click on the plus (+) located in the middle of bottom navigation options.
Create a new post, create the body as "test" (this shouldn't matter) and choose any community based on your settings. Publish the post.
Go to profile and scroll down to see your newly published post.
Click on the post options shown by the three-dot menu to the right of the post.
Click Delete.
Note that the error occurs.
Error
The following log cat has been captured during the error:
09-02 11:56:20.693 11318-11318/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.hapramp, PID: 11318
java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{954ebaf position=1 id=-1, oldPos=2, pLpos:2 scrap [attachedScrap] tmpDetached no parent} android.support.v7.widget.RecyclerView{1bc3269 VFED..... ......I. 0,0-720,1024 #7f0d0113 app:id/profilePostRv}, adapter:com.hapramp.ui.adapters.ProfileRecyclerAdapter@ab3a4ee, layout:android.support.v7.widget.LinearLayoutManager@8d1ed8f, context:com.hapramp.ui.activity.HomeActivity@6d26cc8
at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:5610)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5792)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5752)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5748)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2232)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1559)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1519)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:614)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:3763)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3527)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:4082)
at android.view.View.layout(View.java:16651)
at android.view.ViewGroup.layout(ViewGroup.java:5440)
at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:606)
at android.view.View.layout(View.java:16651)
at android.view.ViewGroup.layout(ViewGroup.java:5440)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
at android.view.View.layout(View.java:16651)
at android.view.ViewGroup.layout(ViewGroup.java:5440)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)
at android.view.View.layout(View.java:16651)
at android.view.ViewGroup.layout(ViewGroup.java:5440)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
at android.view.View.layout(View.java:16651)
at android.view.ViewGroup.layout(ViewGroup.java:5440)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
at android.view.View.layout(View.java:16651)
at android.view.ViewGroup.layout(ViewGroup.java:5440)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
at android.view.View.layout(View.java:16651)
at android.view.ViewGroup.layout(ViewGroup.java:5440)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
at android.view.View.layout(View.java:16651)
at android.view.ViewGroup.layout(ViewGroup.java:5440)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2678)
at android.view.View.layout(View.java:16651)
at android.view.ViewGroup.layout(ViewGroup.java:5440)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2183)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1943)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1119)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6060)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
at android.view.Choreographer.doCallbacks
Environment
Device: Motorola 3 (3rd Generation)
Android Version: 6.0.1
Application Version: 0.0.12
Recording of issue
The following video shows this issue in more detail:
Expected behavior
Upon deleting a post you should be given an indication that the post has been deleted and able to continue you using the application.
Actual Behaviour
Upon deleting a post a fatal exception is shown and the application stops.
Note: This issue only seems to be replicated when trying to delete your first post on first use of the application. If you have two posts this issue doesn't seem to be replicated.
Pre-requiste
Steps to reproduce
Error
The following log cat has been captured during the error:
Environment
Recording of issue
The following video shows this issue in more detail:
https://www.youtube.com/embed/hc8JPTLYJnM?rel=0
The text was updated successfully, but these errors were encountered: