Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Component used: LinearLayoutManager
Version used: 1.2.1
Devices/Android versions reproduced on: OnePlus 7 Pro - Android 11
This is an issue I cannot locally reproduce, I got notified of this via Google Play's Android Vitals feature (hence the provided device and android version) and I'm convinced that I'm using the API correctly and it should be safe to use in this particular case.
This is the stacktrace I got:
As you can see the exception occurs as a result to the call of
LinearLayoutManager#detachAndScrapViewAt(i, recycler)
where both the recycler and the index are completely valid (to my knowledge), so the call should complete without any exception.I implemented a custom LinearLayoutManager that is not scrollable and hides any elements that are partially visible to provide a "preview feature" like this:
I think my code in
onLayoutChildren
should be completely valid under any circumstances and that's why I don't understand why the exception is thrown in the first place. I had a look at the source code for this particular stacktrace and it seems like the Stacktrace is a little bit inaccurate, most likelydue to minification and obfuscation as part of the build process