Bug - Null pointer exception causing Direct Play to fail on new Exo2 video player

I recently noticed that some of my media that used to Direct Play on my Nvidia Shield is now Direct Streaming. It appears to happen when my container is MP4. For each video file that fails to Direct Play, i see this error in the logs

03-18 10:23:14.597  e: [Exo2VideoPlayer] Player error detected
03-18 10:23:14.597  e: An exception occurred: com.google.android.exoplayer2.ExoPlaybackException
03-18 10:23:14.597  e: Stacktrace: com.google.android.exoplayer2.ExoPlaybackException
	at com.google.android.exoplayer2.j.handleMessage(SourceFile:360)
	at android.os.Handler.dispatchMessage(Handler.java:98)
	at android.os.Looper.loop(Looper.java:154)
	at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.exoplayer2.source.x.a(long, boolean, boolean)' on a null object reference
	at com.plexapp.plex.ff.source.FFMediaPeriod.discardBuffer(SourceFile:360)
	at com.google.android.exoplayer2.j.h(SourceFile:552)
	at com.google.android.exoplayer2.j.handleMessage(SourceFile:306)
	... 3 more

03-18 10:23:14.609  i: [video] Direct play failed, attempting to transcode

To verify this is an issue with the new Exo2 player, i tried the same file on multiple versions of the Android TV app to see where it went from Direct Play to Direct Stream

5.6.1.505 - Direct Play (original version installed on Nvidia Shield)
6.12.0.3239 - Direct Play
6.13.0.3424 - Direct Stream <--- first version with new Exo2 video player
6.15.0.3946 - Direct Stream 

As you can see, this issue started happening with the introduction of the new video player.

Attached is the logs from the shield and the media info xml.

@sixones let me know if you need a media sample to test with

Do developers even read these posts in this Beta forum. Seems like most threads go unrecognized by the developers. Kind of defeats the purpose of having a beta testing group.

If they want to built a strong beta community they need to do better reading, responding and communicating with those that post feedback, issues and feature requests. Otherwise what’s the point.

@rcork said:
Do developers even read these posts in this Beta forum. Seems like most threads go unrecognized by the developers. Kind of defeats the purpose of having a beta testing group.

If they want to built a strong beta community they need to do better reading, responding and communicating with those that post feedback, issues and feature requests. Otherwise what’s the point.

They are in most threads in THIS forum.

Open your eyes.

This bug is still present in version 6.16.0.4129

Still an issue in 6.16.0.4240

@rcork said:
Do developers even read these posts in this Beta forum. Seems like most threads go unrecognized by the developers. Kind of defeats the purpose of having a beta testing group.

For the most part, no. That’s evident from the lack of attention to numerous bug reports both in terms of comments and in code commits.

The Android (TV) app is the red-headed stepchild of the platform. That’s just business I suppose.

@TVPlexHD said:

For the most part, no. That’s evident from the lack of attention to numerous bug reports both in terms of comments and in code commits.

The Android (TV) app is the red-headed stepchild of the platform. That’s just business I suppose.

Is the source repo on github? I looked but didn’t see it.

It appears that the Plex android dev team consists of only one or two developers which is likely why development is so slow and responses to these posts go unanswered for months. @sixones I’d be glad to dust off my java skills if you’re looking for help.

We are working on this one as well, thanks for your patience :smile:

@roflharrison said:
We are working on this one as well, thanks for your patience :smile:

Great. Let me know if you need more information or sample files

This looks to be resolved in 6.16.0.4266. Thanks.