[go: up one dir, main page]

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

NullPointerException when trying to read isTunnelingEnabled() #10977

Closed
1 task done
hakonschia opened this issue Feb 10, 2023 · 1 comment
Closed
1 task done

NullPointerException when trying to read isTunnelingEnabled() #10977

hakonschia opened this issue Feb 10, 2023 · 1 comment
Assignees
Labels

Comments

@hakonschia
Copy link

ExoPlayer Version

2.18.2

Devices that reproduce the issue

  • Samsung Galaxy S21 running Android 13
  • NVIDIA Shield running Android 11

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

Add the following code to onTracksChanged() in PlayerEventListener in PlayerActivity

if (player != null) {
  Log.d("ExoPlayerTunneling", String.format("isTunnelingEnabled=%b", player.isTunnelingEnabled()));
}
  1. Open demo app
  2. Play HLS > Apple 4x3 basic stream (TS). Not sure if all playbacks will crash, but this does.

Expected result

Media plays and the console logs if tunneling is enabled or not

Actual result

Crashes with the stack trace:

java.lang.NullPointerException: Attempt to read from field 'boolean com.google.android.exoplayer2.RendererConfiguration.tunneling' on a null object reference
    at com.google.android.exoplayer2.ExoPlayerImpl.isTunnelingEnabled(ExoPlayerImpl.java:1673)
    at com.google.android.exoplayer2.demo.PlayerActivity$PlayerEventListener.onTracksChanged(PlayerActivity.java:505)
    at com.google.android.exoplayer2.ExoPlayerImpl.lambda$updatePlaybackInfo$17(ExoPlayerImpl.java:1909)
    at com.google.android.exoplayer2.ExoPlayerImpl$$ExternalSyntheticLambda3.invoke(Unknown Source:4)
    at com.google.android.exoplayer2.util.ListenerSet$ListenerHolder.invoke(ListenerSet.java:282)
    at com.google.android.exoplayer2.util.ListenerSet.lambda$queueEvent$0(ListenerSet.java:190)
    at com.google.android.exoplayer2.util.ListenerSet$$ExternalSyntheticLambda1.run(Unknown Source:6)
    at com.google.android.exoplayer2.util.ListenerSet.flushEvents(ListenerSet.java:211)
    at com.google.android.exoplayer2.ExoPlayerImpl.updatePlaybackInfo(ExoPlayerImpl.java:1966)
    at com.google.android.exoplayer2.ExoPlayerImpl.handlePlaybackInfo(ExoPlayerImpl.java:1794)
    at com.google.android.exoplayer2.ExoPlayerImpl.lambda$new$1$com-google-android-exoplayer2-ExoPlayerImpl(ExoPlayerImpl.java:312)
    at com.google.android.exoplayer2.ExoPlayerImpl$$ExternalSyntheticLambda20.run(Unknown Source:4)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:223)
    at android.app.ActivityThread.main(ActivityThread.java:7668)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Media

HLS > Apple 4x3 basic stream (TS) from the demo app

Bug Report

@icbaker
Copy link
Collaborator
icbaker commented Feb 10, 2023

Thanks for reporting this - I've submitted a fix internally, it will be published here soon and included in a future release.

@icbaker icbaker closed this as completed Feb 10, 2023
christosts pushed a commit that referenced this issue Feb 14, 2023
`TrackSelectorResult.rendererConfigurations` can contain null elements:
> A null entry indicates the corresponding renderer should be disabled.

This wasn't caught by the nullness checker because `ExoPlayerImpl` is
currently excluded from analysis.

#minor-release

Issue: #10977
PiperOrigin-RevId: 508619169
harishdm pushed a commit to ittiam-systems/media that referenced this issue Feb 15, 2023
`TrackSelectorResult.rendererConfigurations` can contain null elements:
> A null entry indicates the corresponding renderer should be disabled.

This wasn't caught by the nullness checker because `ExoPlayerImpl` is
currently excluded from analysis.

#minor-release

Issue: google/ExoPlayer#10977
PiperOrigin-RevId: 508619169
tonihei pushed a commit to androidx/media that referenced this issue Mar 2, 2023
`TrackSelectorResult.rendererConfigurations` can contain null elements:
> A null entry indicates the corresponding renderer should be disabled.

This wasn't caught by the nullness checker because `ExoPlayerImpl` is
currently excluded from analysis.

#minor-release

Issue: google/ExoPlayer#10977
PiperOrigin-RevId: 508619169
(cherry picked from commit a6dfcf7)
tonihei pushed a commit that referenced this issue Mar 2, 2023
`TrackSelectorResult.rendererConfigurations` can contain null elements:
> A null entry indicates the corresponding renderer should be disabled.

This wasn't caught by the nullness checker because `ExoPlayerImpl` is
currently excluded from analysis.

#minor-release

Issue: #10977
PiperOrigin-RevId: 508619169
(cherry picked from commit 5e3cd7a)
@google google locked and limited conversation to collaborators Apr 12, 2023
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

2 participants