Fixed
Status Update
Comments
il...@google.com <il...@google.com>
il...@google.com <il...@google.com> #2
Hi,
This looks really bad but w/o a repro app, we really cannot do anything about it. Is it possible for you to provide a sample app that reproduces your problem ?
This looks really bad but w/o a repro app, we really cannot do anything about it. Is it possible for you to provide a sample app that reproduces your problem ?
wk...@google.com <wk...@google.com>
wk...@google.com <wk...@google.com>
be...@google.com <be...@google.com> #3
Attached is a simple testing app. It inserts 10000 items into the db when activity starts and then displays them using paging. The db is also updated every 1 second. On the screen, if you drag the fast scroll bar up and down quickly a few times, it will eventually crash with this IndexOutOfBoundsException error.
il...@google.com <il...@google.com> #4
Thanks for the great repro case, tracked it down, investigating a fix.
Problematic behavior:
1) AsyncPagedListDiffer receives new list, takes snapshot for diffing (ui thread)
2) At roughly the same time:
2a) Diff snapshot of old snapshot vs new snapshot (bg thread)
2b) New data arrives in new list, way earlier in the list, so the list is essentially: new page, lots of empty pages, initial load
3) AsyncPagedListDiffer updates lastLoad position with diffutil position mapping
In 3, we try to map the lastLoad position from old snapshot to new snapshot, but fail to distinguish between new list vs new snapshot. Because of all the empty pages, that's a huge discrepancy. This is why the huge scrollbar + lots of swaps triggers this well - there are lots of swaps to new PagedLists while loads are happening very far away from initial load positions.
Will need to account for pages loaded in between time of snapshot, and time of swap.
Problematic behavior:
1) AsyncPagedListDiffer receives new list, takes snapshot for diffing (ui thread)
2) At roughly the same time:
2a) Diff snapshot of old snapshot vs new snapshot (bg thread)
2b) New data arrives in new list, way earlier in the list, so the list is essentially: new page, lots of empty pages, initial load
3) AsyncPagedListDiffer updates lastLoad position with diffutil position mapping
In 3, we try to map the lastLoad position from old snapshot to new snapshot, but fail to distinguish between new list vs new snapshot. Because of all the empty pages, that's a huge discrepancy. This is why the huge scrollbar + lots of swaps triggers this well - there are lots of swaps to new PagedLists while loads are happening very far away from initial load positions.
Will need to account for pages loaded in between time of snapshot, and time of swap.
Description
It would be great to have a well-defined, documented and supported way of passing data from a deep link URL to a destination as an argument, with type safety provided by safeargs.