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

Catch out of bounds exception when moving shelf items #1155

Merged
merged 2 commits into from
Jul 6, 2023

Conversation

mchowning
Copy link
Contributor

@mchowning mchowning commented Jul 5, 2023

Description

This is a quick fix for a crash that can occur when adjusting the shelf items on the full screen player. I've seen this a fair number of times myself and it looks like around 150 other people have encountered it according to Sentry.

Testing Instructions

I can't recreate this with 100% reliability, but it seems to occur about half the time when I try to move the shelf items on the Now Playing screen immediately after doing a fresh install of the app.

  1. Freshly install the app and start playing an episode
  2. From the full screen player, tap the overflow menu, then tap the edit pencil to reorganize the icons
  3. Move two or three icons in a row from the bottom of the list to the top of the list
  4. Observe that the app has not crashed and, if the exception would have occurred, the exception was logged with "Error getting title for position -1 in ShelfFragment".

Screenshots or Screencast

This is a video of me recreating the crash without the fix from this PR.

Screen.Recording.2023-07-05.at.12.47.07.PM.mov

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews

@mchowning mchowning marked this pull request as ready for review July 5, 2023 16:57
@mchowning mchowning requested a review from a team as a code owner July 5, 2023 16:57
@geekygecko geekygecko merged commit 2b6ee54 into main Jul 6, 2023
@geekygecko geekygecko deleted the fix/track-shelf-item-oob-exception branch July 6, 2023 00:01
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

Successfully merging this pull request may close these issues.

2 participants