google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.71k stars 6.02k forks source link

ExoPlayer Looper.myLooper() internal crash on dev-2 branch with DASH Live stream WV L3 #7273

Closed tibor-leo-safar-accedo closed 4 years ago

tibor-leo-safar-accedo commented 4 years ago

[REQUIRED] Issue description

Regarding an already filed issue (https://github.com/google/ExoPlayer/issues/6348) what is happening also with the streams and devices we are working with, we have done some testing with the dev-2 branch (checked out on 12 of April 2020). It turned out that the playback of live stream is not starting. Looking into the logs the issue was identified in SampleQueue.java function onFormatResult line 800. The crash was because the assertion have failed for Looper.myLooper(). Replacing it with Looper.getMainLooper() didn't crash and playback works nicely.

[REQUIRED] Reproduction steps

This is an application what we develop for one of our clients. There are Live DASH streams with protected with WideVine L3.

[REQUIRED] Link to test content

A test stream and additional will be shared separately in an e-mail.

[REQUIRED] A full bug report captured from the device

[REQUIRED] Version of ExoPlayer being used

[ExoPlayerLib/2.11.4] from dev-2 branch, checked out on 18 of April 2020.

[REQUIRED] Device(s) and version(s) of Android being used

Samsung Galaxy S10 with Android 10. Crash happened in 100%

kim-vde commented 4 years ago

Did you send the email with a link to the test content? I couldn't find it. Please make sure to put the issue ID in the description.

Also, can you try to play your content on the demo app to see if it works?

tibor-leo-safar-accedo commented 4 years ago

Hi ExoPlayer team,

Mail re-sent with additional info for issue re-production. Subject: Issue #7273 - additional information Setting the experimental_setMediaCodecOperationMode(x) on the DefaultRenderesFactory does not makes any difference.

BR.,

Tibor Leó, Sáfár Engineering Lead, Android Accedo Broadband HU 1063 Budapest, Rákóczi út 1-3, HU www.accedo.tv http://www.accedo.tv/

On 2020. Apr 21., at 16:31, kim-vde notifications@github.com wrote:

Did you send the email with a link to the test content? I couldn't find it. Please make sure to put the issue ID in the description.

Also, can you try to play your content on the demo app to see if it works?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/ExoPlayer/issues/7273#issuecomment-617217373, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSO3TGQGX6VLCYPX6QAPYLRNWU5HANCNFSM4MNFG7XA.

kim-vde commented 4 years ago

There is indeed a bug in the code because we assume that the SampleQueue is always consumed by the playback thread (which has a looper), while in this case it is consumed by the loader thread (which does not have a looper). Thanks for reporting the issue. We will fix it in a near future.

If you want to make a quick fix in your current version of ExoPlayer, what you can do is to execute the code requesting a looper only if Looper.myLooper() is non-null.

AquilesCanta commented 4 years ago

Please try the fix already available in the dev-v2 branch, referenced above. If you re-encounter the issue, just comment below, and I'll reopen. Thanks for reporting this!