Verified
Status Update
Comments
ge...@gmail.com <ge...@gmail.com> #3
This is due to a bug in Fragment - using 1.1.0-alpha02 of Preference uses a newer Fragment dependency, and fixes this issue.
yb...@google.com <yb...@google.com>
cc...@google.com <cc...@google.com> #4
Actually, I just checked and it still crashes using 1.1.0-alpha02.
cc...@google.com <cc...@google.com> #5
Could you maybe upload a simpler project with reproduction steps? Or at least provide reproduction steps for the project you linked - Does it crash when using Preference 1.0.0?
This still seems suspiciously similar tohttps://issuetracker.google.com/issues/120240628 , which can not be reproduced with 1.1.0-alpha02 (following the reproduction steps in the first comment).
This still seems suspiciously similar to
ge...@gmail.com <ge...@gmail.com> #6
Hi guys. I can also confirm that it still crashes using preferences 1.1.0-alpha02. I ran the barebones sample project included in https://issuetracker.google.com/issues/120240628 on a Samsung Galaxy J2 Prime running Android 6.0.1.
If I use 1.0.0 version, the NPE issue will not appear. If I use any of the 1.1.0 alphas with/without fragments 1.1.0-alpha02, the NPE issue is there. This issue also exists for MultiSelectListPreference.
If I use 1.0.0 version, the NPE issue will not appear. If I use any of the 1.1.0 alphas with/without fragments 1.1.0-alpha02, the NPE issue is there. This issue also exists for MultiSelectListPreference.
ge...@gmail.com <ge...@gmail.com> #7
I also ran it on a Samsung Galaxy J4+ running Android 8.1.0, and it is the same story. There is no NPE issue using preferences 1.0.0, but using any of the 1.1.0 alphas with/without fragments 1.1.0-alpha02 will cause the NPE.
yb...@google.com <yb...@google.com> #8
Thanks for the further details - it appears there are two similar issues here with Fragment - one has been fixed, but there is still one that exists, causing this bug.
Apologies for the inconvenience.
Apologies for the inconvenience.
cc...@google.com <cc...@google.com> #9
This has been fixed and will be available in an upcoming release.
Description
Version used: AndroidX 1.0.0-rc02, Paging:2.0.0-rc01
I use Room to load from database and display in Recyclerview using Paging library. The list will crash randomly if I scroll the list up and down very fast. Not every time but I can reproduce it easily, especially if the list is large.
Below is the crash stack:
java.lang.IndexOutOfBoundsException: Index out of bounds - passed position = 447, old list size = 240
at androidx.recyclerview.widget.DiffUtil$DiffResult.convertOldPositionToNew(DiffUtil.java:672)
at androidx.paging.PagedStorageDiffHelper.transformAnchorIndex(PagedStorageDiffHelper.java:196)
at androidx.paging.AsyncPagedListDiffer.latchPagedList(AsyncPagedListDiffer.java:343)
at androidx.paging.AsyncPagedListDiffer$2$1.run(AsyncPagedListDiffer.java:312)
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:6247)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)