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

SwitchTargetView results in E/ExoPlayerImplInternal: Stop failed. java.lang.IllegalStateException #4084

Closed
nicusorflorin opened this issue Apr 4, 2018 · 1 comment

Comments

@nicusorflorin
Copy link

nicusorflorin commented Apr 4, 2018

Issue description

When switching the target PlayerView the player stops playing with an IllegalStateException

Reproduction steps

  1. Create a layout with 2 playerviews
  2. Instantiate a simpleexoplayer and have it run a video on one of them
  3. Switch between the two views, might take a couple of switches, doesn't occur always

Version of ExoPlayer being used

2.7.1

Device(s) and version(s) of Android being used

Huawei VNS-L21; Android 6.0

###Additional Info
I noticed several similar issues reported, and found reference to something called "codecNeedsSetOutputSurfaceWorkaround" which might fix this issue too, only problem is that this device is not included there. Can you make a possibility for devs to add their own devices to the list? Or include this device in the list as well.

A full bug report captured from the device

Cannot generate a bug report

04-04 16:27:41.477 31894-2511/com.mypackage E/MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 6
04-04 16:27:41.477 31894-2512/com.mypackage E/ACodec: signalError(omxError 0x80001001, internalError -2147483648)
04-04 16:27:41.478 31894-2511/com.mypackage E/MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 0
04-04 16:27:41.491 31894-2491/com.mypackage E/ExoPlayerImplInternal: Internal runtime error.
    java.lang.IllegalStateException
        at android.media.MediaCodec.native_dequeueInputBuffer(Native Method)
        at android.media.MediaCodec.dequeueInputBuffer(MediaCodec.java:2346)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:631)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:568)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:522)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:305)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:150)
        at android.os.HandlerThread.run(HandlerThread.java:61)
04-04 16:27:41.510 31894-2512/com.mypackage E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7f953fb100
04-04 16:27:41.512 31894-2512/com.mypackage E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7f95577900
04-04 16:27:41.515 31894-2512/com.mypackage E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7f95652100
04-04 16:27:41.518 31894-2512/com.mypackage E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7faddf8500
04-04 16:27:41.519 31894-2512/com.mypackage E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7f837b5600
04-04 16:27:41.528 31894-2491/com.mypackage E/ExoPlayerImplInternal: Stop failed.
    java.lang.IllegalStateException
        at android.media.MediaCodec.native_stop(Native Method)
        at android.media.MediaCodec.stop(MediaCodec.java:1928)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.releaseCodec(MediaCodecRenderer.java:512)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.releaseCodec(MediaCodecVideoRenderer.java:439)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:468)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onDisabled(MediaCodecVideoRenderer.java:341)
        at com.google.android.exoplayer2.BaseRenderer.disable(BaseRenderer.java:150)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:972)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:772)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:735)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:357)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:150)
        at android.os.HandlerThread.run(HandlerThread.java:61)
@nicusorflorin
Copy link
Author

nicusorflorin commented Apr 4, 2018

Update: can confirm that if this device is added to that condition, the issue is resolved, please either add support for custom developer conditions to be added or add this device as well it (might turn out to be a general issue with Huawei devices)
Condition:
("OMX.IMG.MSVDX.Decoder.AVC".equals(name) && "HUAWEI VNS-L21".equals(Util.MODEL) // Huawei P9 Lite

@ojw28 ojw28 self-assigned this Apr 4, 2018
ojw28 added a commit that referenced this issue Apr 8, 2018
Issue: #4084

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191716636
@ojw28 ojw28 closed this as completed Apr 8, 2018
@google google locked and limited conversation to collaborators Aug 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants