Docile-Alligator / Infinity-For-Reddit

A Reddit client for Android
https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforreddit
GNU Affero General Public License v3.0
4.24k stars 408 forks source link

Detected inconsistent adapter updates. #1380

Open shaked6540 opened 1 year ago

shaked6540 commented 1 year ago

Checklist

App version

5.4.0

Where did you get the app from

Other

Android version

11

Device model

samsung SM-A705FN

First occurred

Today

Steps to reproduce

  1. Open the app
  2. ??
  3. Shows an error that the posts couldn't load

The error seems to be common on Samsung devices, after a quick google search there are a couple of solutions on stack overflow for this error

It also happened to me a couple of months ago but it fixed itself after a while.

Example post, link, markdown...

No response

Expected behaviour

Show the posts

Current behaviour

The posts fail to load

Logs

`` Stacktrace ``

java.lang.IllegalStateException: Detected inconsistent adapter updates. The local position of the view holder maps to 2 which is out of bounds for the adapter with size 1.Make sure to immediately call notify methods in your adapter when you change the backing dataviewHolder:CommentViewHolder{294f38e position=3 id=-1, oldPos=-1, pLpos:-1}adapter:ml.docilealligator.infinityforreddit.adapters.CommentsRecyclerViewAdapter@e6545df
    at androidx.recyclerview.widget.ConcatAdapterController.getLocalAdapterPosition(ConcatAdapterController.java:471)
    at androidx.recyclerview.widget.ConcatAdapter.findRelativeAdapterPositionIn(ConcatAdapter.java:302)
    at androidx.recyclerview.widget.RecyclerView$ViewHolder.getBindingAdapterPosition(RecyclerView.java:11503)
    at ml.docilealligator.infinityforreddit.adapters.CommentsRecyclerViewAdapter$CommentViewHolder.lambda$new$7$CommentsRecyclerViewAdapter$CommentViewHolder(CommentsRecyclerViewAdapter.java:1414)
    at ml.docilealligator.infinityforreddit.adapters.CommentsRecyclerViewAdapter$CommentViewHolder$$ExternalSyntheticLambda1.onClick(Unknown Source:2)
    at android.view.View.performClick(View.java:8160)
    at ml.docilealligator.infinityforreddit.adapters.CommentsRecyclerViewAdapter$CommentViewHolder.expandComments(CommentsRecyclerViewAdapter.java:1496)
    at ml.docilealligator.infinityforreddit.adapters.CommentsRecyclerViewAdapter$CommentViewHolder.lambda$new$14$CommentsRecyclerViewAdapter$CommentViewHolder(CommentsRecyclerViewAdapter.java:1488)
    at ml.docilealligator.infinityforreddit.adapters.CommentsRecyclerViewAdapter$CommentViewHolder$$ExternalSyntheticLambda4.onLongClick(Unknown Source:2)
    at android.view.View.performLongClickInternal(View.java:8240)
    at android.view.View.performLongClick(View.java:8198)
    at android.view.View.performLongClick(View.java:8216)
    at android.view.View$CheckForLongPress.run(View.java:30194)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:246)
    at android.app.ActivityThread.main(ActivityThread.java:8595)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

`` END of stacktrace ``

`` Thread info ``

Name: main
ID: 2
State: RUNNABLE
Priority: 5
Thread group name: main
Thread group parent: system
Thread group active count: 46
Thread time: 0 hr 0 min, 10 sec

`` END of thread info ``

`` Device info ``

Report ID: 052886ea-4548-44d5-904d-a906ea53cb4a
Device ID: f1eb26689f30a526
Application version: 89
Default launcher: com.sec.android.app.launcher
Timezone name: Israel Standard Time
Timezone ID: Asia/Jerusalem
Version release: 11
Version incremental : A705FNXXU5DUI1
Version SDK: 30
Board: sm6150
Bootloader: A705FNXXU5DUI1
Brand: samsung
CPU ABIS 32: armeabi-v7a, armeabi
CPU ABIS 64: arm64-v8a
Supported ABIS: arm64-v8a, armeabi-v7a, armeabi
Device: a70q
Display: RP1A.200720.012.A705FNXXU5DUI1
Fingerprint: samsung/a70qxx/a70q:11/RP1A.200720.012/A705FNXXU5DUI1:user/release-keys
Hardware: qcom
Host: VPDJR108
ID: RP1A.200720.012
Manufacturer: samsung
Product: a70qxx
Build time: 1631258687000
Build time formatted: 10-09-2021 10:24:47
Type: user
Radio: A705FNXXU5DUI1
Tags: release-keys
User: dpi
User IDs: N/A
Is sustained performance mode supported: No
Is in power save mode: No
Is in interactive state: Yes
Is ignoring battery optimizations: No
Thermal status: STATUS_NONE
Location power save mode: MODE_NO_CHANGE
Is device idle: No
Battery percentage: 97
Battery remaining time: 01-01-1970 02:00:00
Is battery charging: No
Is device rooted: No
CPU Model: Qualcomm Technologies, Inc SM6150
Number of CPU cores: 8
Up time with sleep: 143 hr 7 min, 18 sec
Up time without sleep: 49 hr 18 min, 22 sec

`` END of Device info ``

`` Exit reasons ``

`` Exit reason #1 ``
Description: remove task
Importance: SERVICE
Reason: USER_REQUESTED
Timestamp: 16-01-2022 14:54:09
`` END of exit reason #1 ``

 `` Exit reason #2 ``
Description: remove task
Importance: CACHED
Reason: USER_REQUESTED
Timestamp: 16-01-2022 14:34:02
`` END of exit reason #2 ``

 `` Exit reason #3 ``
Description: remove task
Importance: CACHED
Reason: USER_REQUESTED
Timestamp: 16-01-2022 14:24:42
`` END of exit reason #3 ``

`` END of exit reasons ``

`` Application info ``

App name: Infinity
Version code: 89
Version name: 5.1.5
Package name: ml.docilealligator.infinityforreddit
Short package name: infinityforreddit
Flavor: N/A
Signatures: XFN80TR5rgSMbsH+WZ5oyxarmIU=
Is debuggable: No
First installed: 03-12-2021 18:21:24
Last updated: 24-12-2021 20:10:02
Requested permissions: android.permission.ACCESS_NETWORK_STATE, android.permission.INTERNET, android.permission.SET_WALLPAPER, android.permission.SET_WALLPAPER_HINTS, android.permission.FOREGROUND_SERVICE, android.permission.WAKE_LOCK, android.permission.USE_BIOMETRIC, android.permission.USE_FINGERPRINT, android.permission.RECEIVE_BOOT_COMPLETED
Default prefs: mute_autoplaying_videos = true, default_post_layout = 0, video_autoplay = 0, language = auto, notificaiton_interval = 1, hide_the_number_of_awards = false, start_autoplay_visible_area_offset_landscape = 50, automatically_try_redgifs = true, amoled_dark = false, save_sort_type = true, show_top_level_comments_first = false, click_to_show_media_in_gallery_layout = false, lazy_mode_interval = 2.5, only_disable_preview_in_video_and_gif_posts = false, hide_post_type = false, autoplay_nsfw_videos = true, main_page_back_button_action = 0, show_comment_divider = false, disable_immersive_interface_in_landscape_mode = false, video_player_ignore_nav_bar = false, vote_buttons_on_the_right = false, show_thumbnail_on_the_left_in_compact_layout = false, respect_subreddit_recommended_comment_sort_type = false, default_search_result_tab = 0, video_player_automatic_landscape_orientation = false, start_autoplay_visible_area_offset_portrait = 75, default_link_post_layout = -1, comment_toolbar_hidden = false, show_divider_in_compact_layout = true, disable_image_preview = false, user_default_sort_type = NEW, link_handler = 0, legacy_autoplay_video_controller_ui = false, remember_muting_option_in_post_feed = false, mute_nsfw_video = false, hide_subreddit_and_user_prefix = false, long_press_to_hide_toolbar_in_compact_layout = false, post_compact_layout_toolbar_hidden_by_default = false, user_default_sort_time = ALL, default_playback_speed = 100, subreddit_default_sort_type = HOT, enable_search_history = false, use_bottom_toolbar_in_media_viewer = false, comment_toolbar_hide_on_click = true, theme = 2, subreddit_default_sort_time = ALL, enable_notification = false, hide_the_number_of_votes = false, mute_video = false, save_fron
traviss64 commented 1 year ago

I got this error just now while browsing through anonymous reddit but with my account logged in I can see each and every post