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

Random internal error #642

Open
tsoumalis opened this issue Aug 6, 2018 · 5 comments
Open

Random internal error #642

tsoumalis opened this issue Aug 6, 2018 · 5 comments
Labels

Comments

@tsoumalis
Copy link

  • I have verified there are no duplicate active or recent bugs, questions, or requests
Include the following:
  • ExoMedia version: 4.2.2
  • Device OS version: 8.0
  • Devide Manufacturer: Huawei
  • Device Name: Mate 10 Lite
Reproduction Steps

I have a ViewPager where I load a video for each page. Each page is a fragment with a full screen video (I use TextureView to have the video cropped and cover the whole screen). The video either comes from an online URL or from cache. Sometimes, especially when the video originates from cache, I get an error playing the video with the following stack trace:

08-06 13:02:39.404 20181-22035/com.twiddle.twiddle E/BufferQueueProducer: [SurfaceTexture-0-20181-40] setMaxDequeuedBufferCount: the requested maxDequeuedBuffercount (-1) exceeds the current dequeued buffer count (0)
08-06 13:02:39.404 20181-22035/com.twiddle.twiddle E/Surface: IGraphicBufferProducer::setBufferCount(1) returned Invalid argument
08-06 13:02:39.404 20181-22035/com.twiddle.twiddle E/ACodec: native_window_set_buffer_count failed: Invalid argument (22)
08-06 13:02:39.407 20181-22027/com.twiddle.twiddle E/ExoPlayerImplInternal: Internal runtime error.
    java.lang.IllegalArgumentException
        at android.media.MediaCodec.native_setSurface(Native Method)
        at android.media.MediaCodec.setOutputSurface(MediaCodec.java:1967)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setOutputSurfaceV23(MediaCodecVideoRenderer.java:915)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setSurface(MediaCodecVideoRenderer.java:405)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.handleMessage(MediaCodecVideoRenderer.java:372)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.deliverMessage(ExoPlayerImplInternal.java:861)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageToTarget(ExoPlayerImplInternal.java:829)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageInternal(ExoPlayerImplInternal.java:811)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:328)
        at android.os.Handler.dispatchMessage(Handler.java:104)
        at android.os.Looper.loop(Looper.java:166)
        at android.os.HandlerThread.run(HandlerThread.java:65)
08-06 13:02:39.407 764-875/? E/imgvideo-omx: IMG_OMD_SetConfig FAILED: Unsupported paramter structure.
08-06 13:02:39.407 764-875/? E/OMXNodeInstance: setConfig(0xe8c23680:IMG.MSVDX.Decoder.AVC, ??(0x6f700003)) ERROR: UnsupportedIndex(0x8000101a)
08-06 13:02:39.408 764-1605/? E/imgvideo-omx: IMG_OMD_GetExtensionIndex FAILED: Index Not Found.
08-06 13:02:39.410 764-875/? E/imgvideo-omx: IMG_OMD_GetConfig FAILED: Unsupported paramter structure.
08-06 13:02:39.410 764-875/? E/OMXNodeInstance: getConfig(0xe8c23680:IMG.MSVDX.Decoder.AVC, ??(0x6f700004)) ERROR: UnsupportedIndex(0x8000101a)
08-06 13:02:39.413 764-21009/? E/imgvideo-omx: IMG_OMD_GetConfig FAILED: Unsupported paramter structure.
08-06 13:02:39.413 764-21009/? E/OMXNodeInstance: getConfig(0xe8c23680:IMG.MSVDX.Decoder.AVC, ??(0x6f700004)) ERROR: UnsupportedIndex(0x8000101a)
08-06 13:02:39.418 764-875/? E/imgvideo-omx: IMG_OMD_GetConfig FAILED: Unsupported paramter structure.
08-06 13:02:39.418 764-875/? E/OMXNodeInstance: getConfig(0xe8c23680:IMG.MSVDX.Decoder.AVC, ??(0x6f700004)) ERROR: UnsupportedIndex(0x8000101a)
08-06 13:02:39.422 764-875/? E/imgvideo-omx: IMG_OMD_GetConfig FAILED: Unsupported paramter structure.
08-06 13:02:39.422 764-875/? E/OMXNodeInstance: getConfig(0xe8c23680:IMG.MSVDX.Decoder.AVC, ??(0x6f700004)) ERROR: UnsupportedIndex(0x8000101a)
08-06 13:02:39.426 764-1605/? E/imgvideo-omx: IMG_OMD_GetConfig FAILED: Unsupported paramter structure.
08-06 13:02:39.426 764-1605/? E/OMXNodeInstance: getConfig(0xe8c23680:IMG.MSVDX.Decoder.AVC, ??(0x6f700004)) ERROR: UnsupportedIndex(0x8000101a)
08-06 13:02:39.430 764-875/? E/imgvideo-omx: IMG_OMD_GetConfig FAILED: Unsupported paramter structure.
08-06 13:02:39.430 764-875/? E/OMXNodeInstance: getConfig(0xe8c23680:IMG.MSVDX.Decoder.AVC, ??(0x6f700004)) ERROR: UnsupportedIndex(0x8000101a)
08-06 13:02:39.432 764-875/? E/imgvideo-omx: IMG_OMD_GetConfig FAILED: Unsupported paramter structure.
08-06 13:02:39.433 764-875/? E/OMXNodeInstance: getConfig(0xe8c23680:IMG.MSVDX.Decoder.AVC, ??(0x6f700004)) ERROR: UnsupportedIndex(0x8000101a)
08-06 13:02:39.437 764-875/? E/imgvideo-omx: IMG_OMD_GetConfig FAILED: Unsupported paramter structure.
08-06 13:02:39.437 764-875/? E/OMXNodeInstance: getConfig(0xe8c23680:IMG.MSVDX.Decoder.AVC, ??(0x6f700004)) ERROR: UnsupportedIndex(0x8000101a)
08-06 13:02:39.440 764-1605/? E/imgvideo-omx: IMG_OMD_GetConfig FAILED: Unsupported paramter structure.
08-06 13:02:39.440 764-1605/? E/OMXNodeInstance: getConfig(0xe8c23680:IMG.MSVDX.Decoder.AVC, ??(0x6f700004)) ERROR: UnsupportedIndex(0x8000101a)
08-06 13:02:39.444 764-1605/? E/imgvideo-omx: IMG_OMD_GetConfig FAILED: Unsupported paramter structure.
08-06 13:02:39.444 764-1605/? E/OMXNodeInstance: getConfig(0xe8c23680:IMG.MSVDX.Decoder.AVC, ??(0x6f700004)) ERROR: UnsupportedIndex(0x8000101a)
08-06 13:02:39.446 764-1605/? E/imgvideo-omx: IMG_OMD_GetConfig FAILED: Unsupported paramter structure.
08-06 13:02:39.446 764-1605/? E/OMXNodeInstance: getConfig(0xe8c23680:IMG.MSVDX.Decoder.AVC, ??(0x6f700004)) ERROR: UnsupportedIndex(0x8000101a)
08-06 13:02:39.450 764-875/? E/imgvideo-omx: IMG_OMD_GetConfig FAILED: Unsupported paramter structure.
08-06 13:02:39.450 764-875/? E/OMXNodeInstance: getConfig(0xe8c23680:IMG.MSVDX.Decoder.AVC, ??(0x6f700004)) ERROR: UnsupportedIndex(0x8000101a)
08-06 13:02:40.518 20181-20181/com.twiddle.twiddle E/ExoMediaPlayer: Unable to seek across windows, falling back to in-window seeking
08-06 13:02:40.553 764-875/? E/OMXNodeInstance: setConfig(0xe8c23680:google.aac.decoder, ??(0x6f700006)) ERROR: Undefined(0x80001001)
08-06 13:02:40.554 764-875/? E/OMXNodeInstance: setConfig(0xe8c23680:google.aac.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
08-06 13:02:40.554 764-875/? E/OMXNodeInstance: getConfig(0xe8c23680:google.aac.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
Expected Result

I would expect the video to play normally.

Actual Result

I mostly get the error with 720p videos. Perhaps it is an internal codec error or internal ExoPlayer error but if I use the stock VideoView I don't have any problems. A strange fact is that before I get the update to Android 8 for this device I didn't face this problem. This only occurs frequently after the update.

I tried to workaround this by using the onError callback and trying 3 times to reset the player in 1 second intervals but I get an error Failed to connect to surface 0x7d2414e010, err -22 which indicates that the surface is already connected to another instance.

@brianwernick
Copy link
Owner

When you see this error is it after you have swiped a few pages in the ViewPager?
Are you reusing Fragments and if so are you manually managing the release() functionality for the VideoView?

@tsoumalis
Copy link
Author

It sometimes happens on the very first fragment and sometimes after I have scrolled a lot of fragments. I have made sure to release the VideoView instance (by calling the stopPlayback and release methods) in the onDestroy of the fragment. With a breakpoint I can assure that it is called. I also set offscreen pages limit to 1 so at most 3 instances of the VideoView coexist. I use FragmentStatePagerAdapter for the pagers adapter and I don't hold any instances of the fragments in a list. The strangest fact is that most often it occurs to the first video.

@brianwernick
Copy link
Owner

OK, I'll see if I can track this down. Thanks for the details

@MTime90
Copy link

MTime90 commented Aug 23, 2018

I also face this problem, most same as @tsoumalis said . I uesed Exoplayer in ViewPager, but not in fragment, but in view.
My program works well for long time, but nowadays this problem has becamed.
Hope you can give us some help~ @brianwernick
The bottom is my Log

08-23 17:50:11.926 19887-25197/com.my.work I/ExtendedACodec: Decoder will be in frame by frame mode
08-23 17:50:11.927 19887-19887/com.my.work D/StuffContainerView: [19887]VideoInfoListenerImpl onLayoutChange
08-23 17:50:11.927 19887-19887/com.my.work D/VideoInfoListener: [19887]VideoInfoListenerImpl onLayoutChange
08-23 17:50:11.927 19887-19887/com.my.work I/VideoInfoListener: [19887]dynamicChangeStoryContainerView handleDeviceNavChange mVideoCoverWidth is: 720 mVideoCoverHeight is: 1280
08-23 17:50:11.927 19887-19887/com.my.work I/StoryRelayoutUtil: [19887]dynamicChangeStoryContainerView story_width is: 720.0 story_height is: 1280.0
08-23 17:50:11.929 791-1033/? E/OMX-VDEC-1080P: Does not handle dataspace request
08-23 17:50:11.929 791-1033/? E/OMXNodeInstance: getConfig(3171228:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
08-23 17:50:11.940 19887-19887/com.my.work I/lightsurface: [19887]surfaceCreated
08-23 17:50:11.945 19887-25197/com.my.work D/SurfaceUtils: set up nativeWindow 0xc3a97008 for 720x1280, color 0x7fa30c06, rotation 0, usage 0x2002900
08-23 17:50:11.949 19920-20090/com.my.work:LCS V/lcs_report_log: [19920]writeReportCacheToBD----write 2 to DB
08-23 17:50:11.955 19887-19887/com.my.work I/ExoTextureVideoView: [19887]onSurfaceTextureAvailable, player state is: 2device sdk version is: 25
08-23 17:50:11.971 791-25193/? I/SoftAAC2: Reconfiguring decoder: 0->48000 Hz, 0->2 channels
08-23 17:50:11.974 19920-20090/com.my.work:LCS V/lcs_report_log: [19920]writeReportCacheToBD----write to DB END
08-23 17:50:11.974 19887-19887/com.my.work V/cs_log: [19887]1702send 0x22b 0x1
08-23 17:50:11.975 19887-19887/com.my.work I/MedalInfoMgr: [19887]fetch medal request-- fromType= 12
08-23 17:50:11.975 19920-20096/com.my.work:LCS D/cs_log: [19920]retry#0 cmd/subcmd 0x22b/0x1
08-23 17:50:11.975 19887-19887/com.my.work I/VideoPlayerView: [19887]play onPrepared
08-23 17:50:11.975 19887-19887/com.my.work I/VideoInfoListener: [19887]mHorizontalBallLoadingView is null? : false
08-23 17:50:11.975 19887-19887/com.my.work D/ReportTask: [19887]send: ReportTask{map=Bundle[{action=view, anchor=464897014, module=short_video, obj1=1, obj2=1, res2=feed_464897014_155028129ba579e31fd7809b75512f9f}]}
08-23 17:50:11.976 19887-19887/com.my.work I/Native_ShortVideo_Report: [now]start play report module=short_video, action=view, obj1=1, res2=feed_464897014_155028129ba579e31fd7809b75512f9f, anchor=464897014
08-23 17:50:11.990 791-1033/? E/OMX-VDEC-1080P: Does not handle dataspace request
08-23 17:50:11.990 791-1033/? E/OMXNodeInstance: getConfig(3171228:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
08-23 17:50:11.994 19887-25196/com.my.work I/MediaCodec: [OMX.qcom.video.decoder.avc] setting surface generation to 20364381
08-23 17:50:12.001 19887-25197/com.my.work D/SurfaceUtils: set up nativeWindow 0xba439008 for 720x1280, color 0x7fa30c06, rotation 0, usage 0x2002900
08-23 17:50:12.001 19887-25197/com.my.work E/BufferQueueProducer: [SurfaceTexture-0-19887-92] setMaxDequeuedBufferCount: requested buffer count 2 is less than minimum 3
08-23 17:50:12.002 19887-25197/com.my.work E/Surface: IGraphicBufferProducer::setBufferCount(2) returned Invalid argument
08-23 17:50:12.002 19887-25197/com.my.work E/ACodec: native_window_set_buffer_count failed: Invalid argument (22)
08-23 17:50:12.008 19887-25197/com.my.work D/SurfaceUtils: set up nativeWindow 0xc3a97008 for 720x1280, color 0x7fa30c06, rotation 0, usage 0x2002900
08-23 17:50:12.009 19887-25092/com.my.work E/ExoPlayerImplInternal: Internal runtime error.
                                                                        java.lang.IllegalArgumentException
                                                                            at android.media.MediaCodec.native_setSurface(Native Method)
                                                                            at android.media.MediaCodec.setOutputSurface(MediaCodec.java:1903)
                                                                            at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setOutputSurfaceV23(MediaCodecVideoRenderer.java:873)
                                                                            at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setSurface(MediaCodecVideoRenderer.java:384)
                                                                            at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.handleMessage(MediaCodecVideoRenderer.java:351)
                                                                            at com.google.android.exoplayer2.ExoPlayerImplInternal.deliverMessage(ExoPlayerImplInternal.java:861)
                                                                            at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageToTarget(ExoPlayerImplInternal.java:832)
                                                                            at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageInternal(ExoPlayerImplInternal.java:814)
                                                                            at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:332)
                                                                            at android.os.Handler.dispatchMessage(Handler.java:98)
                                                                            at android.os.Looper.loop(Looper.java:154)
                                                                            at android.os.HandlerThread.run(HandlerThread.java:61)
08-23 17:50:12.018 19887-25197/com.my.work E/ACodec: Unexpected command completion in ExecutingToIdleState: PortEnable(3) Loaded(1)
08-23 17:50:12.018 19887-25197/com.my.work E/ACodec: signalError(omxError 0x80001001, internalError -2147483646)
08-23 17:50:12.018 19887-25196/com.my.work E/MediaCodec: Codec reported err 0x80000002, actionCode 0, while in state 9
8-23 17:50:12.029 791-10007/? I/OMX-VDEC-1080P: omx_vdec::component_deinit() complete
08-23 17:50:12.033 791-10007/? I/OMX-VDEC-1080P: Exit OMX vdec Destructor: fd=143
08-23 17:50:12.038 19887-19887/com.my.work I/VideoPlayerView: [19887]onMediaPlaybackEnded, play completion
08-23 17:50:12.038 19887-19887/com.my.work I/VideoPlayerView: [19887] mVideoInfoListener.onComplete()mplay is null? false
08-23 17:50:12.041 19887-19887/com.my.work D/ReportTask: [19887]send: ReportTask{map=Bundle[{action=video_end, anchor=464897014, module=short_video, obj1=1, obj2=62, obj3=5735, res1=3, res2=feed_464897014_155028129ba579e31fd7809b75512f9f}]}
08-23 17:50:12.041 19920-20079/com.my.work:LCS D/WnsClient: bizcallback begin, guard = 1535017812041, args = TransferArgs [uin=0, command=ilive.commproxy.noauth.0x6040_0x3, needCompress=false, timeout=60000, retryFlag=0, retryCount=0, retryPkgId=0, isTlv=false,priority=0, bizData=true]
08-23 17:50:12.041 19920-20079/com.my.work:LCS V/cs_log: [19920]wns succeed back 0x6040/0x3
08-23 17:50:12.042 19920-20079/com.my.work:LCS D/WnsClient: bizcallback end, guard = 1535017812041,cost(ms) = 1
08-23 17:50:12.042 19920-19920/com.my.work:LCS D/lcs_responser_log: [19920]respone 2 client com.my.work
08-23 17:50:12.044 19887-19887/com.my.work E/VideoPlayerView: [19887]onExoPlayerError, error!! com.google.android.exoplayer2.ExoPlaybackException
08-23 17:50:12.044 19887-19887/com.my.work W/System.err: com.google.android.exoplayer2.ExoPlaybackException
08-23 17:50:12.044 19887-19887/com.my.work W/System.err:     at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:358)
08-23 17:50:12.044 19887-19887/com.my.work W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:98)
08-23 17:50:12.044 19887-19887/com.my.work W/System.err:     at android.os.Looper.loop(Looper.java:154)
08-23 17:50:12.044 19887-19887/com.my.work W/System.err:     at android.os.HandlerThread.run(HandlerThread.java:61)
08-23 17:50:12.044 19887-19887/com.my.work W/System.err: Caused by: java.lang.IllegalArgumentException
08-23 17:50:12.044 19887-19887/com.my.work W/System.err:     at android.media.MediaCodec.native_setSurface(Native Method)
08-23 17:50:12.044 19887-19887/com.my.work W/System.err:     at android.media.MediaCodec.setOutputSurface(MediaCodec.java:1903)
08-23 17:50:12.044 19887-19887/com.my.work W/System.err:     at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setOutputSurfaceV23(MediaCodecVideoRenderer.java:873)
08-23 17:50:12.044 19887-19887/com.my.work W/System.err:     at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setSurface(MediaCodecVideoRenderer.java:384)
08-23 17:50:12.045 19887-19887/com.my.work W/System.err:     at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.handleMessage(MediaCodecVideoRenderer.java:351)
08-23 17:50:12.045 19887-19887/com.my.work W/System.err:     at com.google.android.exoplayer2.ExoPlayerImplInternal.deliverMessage(ExoPlayerImplInternal.java:861)
08-23 17:50:12.045 19887-19887/com.my.work W/System.err:     at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageToTarget(ExoPlayerImplInternal.java:832)
08-23 17:50:12.045 19887-19887/com.my.work W/System.err:     at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageInternal(ExoPlayerImplInternal.java:814)
08-23 17:50:12.045 19887-19887/com.my.work W/System.err:     at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:332)
08-23 17:50:12.045 19887-19887/com.my.work W/System.err: 	... 3 more
08-23 17:50:12.045 19887-19887/com.my.work W/VideoPlayerView: [19887]ExoPlaybackException error Type is: 2
08-23 17:50:12.046 19887-19887/com.my.work I/LikeAniView: onVisibilityChanged --- visibility = 8, getVisibility() = 0

@dryganets
Copy link

Historically we had the codecNeedsSetOutputSurfaceWorkaround forced on all devices and now we are trying use ExoPlayer default implementation.

We are facing exactly the same issue if workaround is enabled.

If you will override this method and return true unconditionally this problem likely will be gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants