Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
M
medialibrary
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 63
    • Issues 63
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 7
    • Merge Requests 7
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VideoLAN
  • medialibrary
  • Issues
  • #257

Closed
Open
Opened Jun 08, 2020 by Nicolas Pomepuy@AzaReporter

Empty groups when loading media groups list

When the Android app loads the MediaGroup lists with videoGroups, some of the groups are sometimes empty.

For now, it makes the app crash on the kotlin side.

private fun Array<VideoGroup>.extractSingles() = map {
    if (it.mediaCount() == 1) it.media(Medialibrary.SORT_DEFAULT, false, 1, 0)[0] else it // here
}.toTypedArray()

java.lang.ArrayIndexOutOfBoundsException: length=0; index=0

We can workaround that but it would hide a ML issue. The exact same code wasn't crashing before the MediaGroup refactor, so it's a regression between Android app version 3.2 and 3.3.

This crash doesn't seem to be linked to a specific Android version or manufacturer.

I do not have a mail report about this issue and I didn't reproduce that so I don't have a DB file to share unfortunately.

From what I see form the Play Store console, it seems that it happens only once by user so it may be a race condition.

Sélection_999_798_

(It happened twice for a user only once)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: videolan/medialibrary#257