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

Should I expect IllegalArgumentExceptions when calling release()? #8087

Closed
hallyhaa opened this issue Oct 19, 2020 · 2 comments
Closed

Should I expect IllegalArgumentExceptions when calling release()? #8087

hallyhaa opened this issue Oct 19, 2020 · 2 comments
Assignees
Labels

Comments

@hallyhaa
Copy link

[REQUIRED] Searched documentation and issues

Didn't find anything on the exoplayer.dev web site

[REQUIRED] Question

I see an IllegalArgumentException reported to Firebase/Crashlytics and wonder if I am supposed to do player.release() within a try/catch block ... ? This is with ExoPlayer 2.12, and the exception seems to be that the SimpleExoPlayer, in its release() method, calls streamVolumeManager.release(), and the Context object claims the manager's BroadcastReceiver isn't registered. I think this is completely under ExoPlayer's control, not mine.

Is this happening if one calls release() twice on a player object? (I don't think so).

Here's the stack trace:

android.app.LoadedApk.forgetReceiverDispatcher (LoadedApk.java:1499)
android.app.ContextImpl.unregisterReceiver (ContextImpl.java:1605)
android.content.ContextWrapper.unregisterReceiver (ContextWrapper.java:678)
com.google.android.exoplayer2.StreamVolumeManager.release (StreamVolumeManager.java:165)
com.google.android.exoplayer2.SimpleExoPlayer.release (SimpleExoPlayer.java:1706)

A full bug report captured from the device

Will be emailed.

Link to test content

N/A. The exception is seen in Firebase, but I have no further details about it.

@andrewlewis
Copy link
Collaborator

Thank you for reporting this.

Can you tell from Firebase which particular Android devices/versions are affected and how widespread the issue is?

I think we should just catch this exception and log a warning but it would be good to understand how widespread the problem is. If it's only on a small number of devices/builds that will give confidence that we are right to expect this call to succeed, and give us information so we can report this to the device OEM. If it is evenly spread across different devices that could point to an Android framework issue, or a problem with how the API is being used. Thanks!

@hallyhaa
Copy link
Author

I have seen this only twice. Once on a Samsung Galaxy S10+ running Android 10, the other time on a Huawei P30 Pro running Android 9. They were not rooted, they were running in the background and proximity was on (whatever that means).

ojw28 pushed a commit that referenced this issue Nov 2, 2020
Issue: #8106
Issue: #8087
PiperOrigin-RevId: 338664455
@ojw28 ojw28 closed this as completed Nov 10, 2020
icbaker pushed a commit that referenced this issue Nov 30, 2020
Issue: #8106
Issue: #8087
PiperOrigin-RevId: 338664455
@google google locked and limited conversation to collaborators Jan 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants