-
Notifications
You must be signed in to change notification settings - Fork 6k
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
NullPointerException in DownloadManager$InternalHandler.onContentLengthChanged() #8078
Comments
Thanks for reporting. I'll look into this asap. |
I am also seeing this crash on 2.12.1. In my case It seems to be happening when a download fails after resuming the app |
What type of content is being downloaded in these cases? Adaptive (i.e., HLS / DASH / SmoothStreaming) or progressive (i.e., regular media files like MP4 / MP3, etc)? |
Also, are you passing an |
If the answers are (1) progressive media, and (2) using a separate executor, then I have figured out what's wrong. We will provide a fix shortly. |
RunnableFutureTask is not reusable. Trying to reuse it meant that a failure in one doWork() call would cause subsequent download() calls to (a) not block until the runnable has finished executing (does not apply when using a direct executor), and (b) throw the same failure as thrown from the first doWork() call. This could cause #8078 if the initial failure occurred before the content length was resolved. Retries are not blocked on their work completing due to (a), and the download would be marked as failed due to (b). The work itself could then resolve the content length, which causes the stack trace in this issue. Issue: #8078 PiperOrigin-RevId: 343498252
The fix ref'd above will be included in the |
RunnableFutureTask is not reusable. Trying to reuse it meant that a failure in one doWork() call would cause subsequent download() calls to (a) not block until the runnable has finished executing (does not apply when using a direct executor), and (b) throw the same failure as thrown from the first doWork() call. This could cause google#8078 if the initial failure occurred before the content length was resolved. Retries are not blocked on their work completing due to (a), and the download would be marked as failed due to (b). The work itself could then resolve the content length, which causes the stack trace in this issue. Issue: google#8078 PiperOrigin-RevId: 343498252
RunnableFutureTask is not reusable. Trying to reuse it meant that a failure in one doWork() call would cause subsequent download() calls to (a) not block until the runnable has finished executing (does not apply when using a direct executor), and (b) throw the same failure as thrown from the first doWork() call. This could cause #8078 if the initial failure occurred before the content length was resolved. Retries are not blocked on their work completing due to (a), and the download would be marked as failed due to (b). The work itself could then resolve the content length, which causes the stack trace in this issue. Issue: #8078 PiperOrigin-RevId: 343498252
[REQUIRED] Issue description
[REQUIRED] Reproduction steps
It is hard to reproduce for me on my device, but I found 600 times crash on sentry which occurs on user's devices
[REQUIRED] Link to test content
There is no specific content for this issue, regarding of this crash's frequency, I guess this crash is not related with specific media content.
[REQUIRED] A full bug report captured from the device
[REQUIRED] Version of ExoPlayer being used
2.12.0
There is zero of this crash on Exoplayer version below 2.12.0 (like 2.11.7
[REQUIRED] Device(s) and version(s) of Android being used
A variety of kinds of devices are found, list as below
Additional Info
almost crash occurs after DownloadService is destroyed
The text was updated successfully, but these errors were encountered: