Recently got a few crash reports, all appearing to be from a Sony Bravia 4K TV (SVP-DTV15) that appears to be running 5.0.2, but both have me a bit puzzled.
1.) The first is an NPE when attempting to resume my main player activity. Some background: I use requestVisibleBehind so that the video can continue to play when the user presses the Home button on the remote. Since I advance to new videos automatically, I want to ensure that the PlaybackOverlayFragment doesn't display in this instance. This fragment is instantiated and configured in onCreate for the activity. In the version that is published, I'm removing the fragment in onPause and adding it again in onResume. It looks like when it crashed on the Bravia, the variable that represented the PlaybackOverlayFragment was null, as the detailed exception stated "Attempt to write to field 'android.app.FragmentManagerImpl android.app.Fragment.mFragmentManager' on a null object reference." I guess I'm trying to figure out how that could have happened. As I see it, either the activity is already running, and thus would have already passed through onCreate to give that variable a value, or it isn't running, in which case it would have to go through onCreate anyway. I never reassign that variable anywhere (setting it to null, for instance). I've since revised this to hide and show the fragment instead, which works better as long as there are no other focusable items, but either way, I'd be trying to perform an operation on a null value. I've not been able to reproduce this, nor have I seen any other crash reports for this on devices other than the Bravia.
2.) The other error I've seen twice on Bravia TVs is "Encountered EGL error 12291 EGL_BAD_ALLOC during rendering" on RenderThread, which I resume is happening when trying to animate the PlaybackOverlayFragment, but I'm really at a loss on this one. Anyone else encountered this one?