-
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
Null passed to onPlayerError #4262
Comments
This sounds strange. There doesn't seem to be a code path in the library that can cause null to be passed to the event listener (it's always a caught exception instance or a new wrapper around it, passed in ExoPlayerImplInternal). Did you see this in the demo app? If not, is there any chance that the method is being called from somewhere else in the app? If you have logcat captured from when you saw this issue please could you attach it or email it to [email protected], just in case there are signs of anything else strange going on. Thanks. |
I did not observe it in the demo app (I did not test it there), but I am sure I'm not calling the listener myself. This is from the logcat:
There isn't anything ExoPlayer-related in the logs before or afterwards. |
Is it not possible that your implementation of onPlayerError is calling isBehindLiveWindow with null or that isBehindLiveWindow is doing something different than what the demo app does? |
I'm calling
|
@FD-, are you able to reproduce locally? As Andrew mentioned, it does not seem there is a codepath that calls onPlayerError with null. If you can reproduce, it'd be great to get a stacktrace at the point at which the message gets sent (shouldn't be that hard in debug mode + a few breakpoints). |
I was able to reproduce it, and have now gathered more detailed logs. The necessary steps seem to be to play a live HLS stream and disconnect and reconnect the Wifi connection. Please note the app did not crash with an NPE every time, it likely depends on a certain timing. I added the same stream to the demo app, but could not get it to crash, so it's likely something specific to my app. These are all logs from the crash that seem ExoPlayer related: Last logs before the issue occurs:
A bit later:
First part of the issue:
I then see:
Then comes the propagation to the listeners:
The app then reinitializes the player, in a way very similar to the demo app. I recreate the source (seems this part differs from the demo), and call It then crashes with:
|
Thanks for the information. Each time we notify a listener we access |
Issue: #4262 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=197126757
I'm occasionally seeing null being passed to
Player.EventListener
'sonPlayerError()
callback.Issue description
I'm occasionally seeing null being passed to
Player.EventListener
'sonPlayerError()
callback.The listener is registered on a
SimpleExoPlayer
instance via theaddListener()
method.The documentation doesn't say anything about the meaning of no exception being passed to the callback, and the demo doesn't check for null, so it seems this is not intentional.
Also, as far as I can tell, the issue is only occurring with the newest 2.8.0 (gradle) release of the library.
Reproduction steps
I'm afraid I don't know how this can be reliably reproduced. It seems to happen when the Internet connection drops while playing an HLS live stream.
Link to test content
None at this time
Version of ExoPlayer being used
2.8.0, the newest at the time of writing
Device(s) and version(s) of Android being used
Google Nexus 9, running Android 7.0.1
A full bug report captured from the device
Not captured; Logcat didn't contain much help, as the error propagation through the handler seems to not transport the actual source of the
onPlayerError
call.I'm sorry for providing so little details! Wanted to report this nevertheless in case anyone else stumbles upon
NullPointerException
s inonPlayerError
.The text was updated successfully, but these errors were encountered: