Skip to content

IllegalStateException at DefaultDownloadIndex.getDownloadForCurrentRow #6785

@indieboyalex

Description

@indieboyalex

Issue description

The following crash is being seen in Crashlytics

Fatal Exception: java.lang.IllegalStateException
       at com.google.android.exoplayer2.util.Assertions.checkState(Assertions.java:81)
       at com.google.android.exoplayer2.offline.Download.<init>(Download.java:133)
       at com.google.android.exoplayer2.offline.DefaultDownloadIndex.getDownloadForCurrentRow(DefaultDownloadIndex.java:359)
       at com.google.android.exoplayer2.offline.DefaultDownloadIndex.access$100(DefaultDownloadIndex.java:35)
       at com.google.android.exoplayer2.offline.DefaultDownloadIndex$DownloadCursorImpl.getDownload(DefaultDownloadIndex.java:409)
       at com.google.android.exoplayer2.offline.DownloadManager$InternalHandler.initialize(DownloadManager.java:697)
       at com.google.android.exoplayer2.offline.DownloadManager$InternalHandler.handleMessage(DownloadManager.java:630)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:216)
       at android.os.HandlerThread.run(HandlerThread.java:65)

It appears that the download progress is null which is failing the assertion. From what I can see this progress is returned from the database.

Over the last 90 days: This issue has 1070 crashes affecting 110 users.

Reproduction steps

We have not been able to reproduce this issue ourselves, but it is currently our biggest crash in Crashlytics and has recently generated a velocity alert.

Link to test content

If required please let us know and we can try to provide access to a test user account

A full bug report captured from the device

As above this is an issue from Crashlytics so unable to capture a bug report ourselves

Version of ExoPlayer being used

v2.10.4

Device(s) and version(s) of Android being used

80% Samsung (Galaxy S8, S9, S8+)
5% Huawei (p20 lite, Y7 Prime 2019, P smart 2019)
4% OnePlus (A6000, 7T Pro, 5T)
4% OPPO (CPH1725)
56% Other

65% Android 9
23& Android 8
6% Android 7
3% Android 5
3% Other

25% In background
0% Rooted
93% Proximity On

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions