Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.0.12] Fatal exception when deleting first post #130

Open
tobias-g1 opened this issue Sep 2, 2018 · 0 comments
Open

[0.0.12] Fatal exception when deleting first post #130

tobias-g1 opened this issue Sep 2, 2018 · 0 comments

Comments

@tobias-g1
Copy link

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

  • 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

  1. When logged into the application, click on the plus (+) located in the middle of bottom navigation options.
  2. Create a new post, create the body as "test" (this shouldn't matter) and choose any community based on your settings. Publish the post.
  3. Go to profile and scroll down to see your newly published post.
  4. Click on the post options shown by the three-dot menu to the right of the post.
  5. Click Delete.
  6. 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:

https://www.youtube.com/embed/hc8JPTLYJnM?rel=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant