question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ExoPlayerImplInternal: Stop failed. java.lang.IllegalStateException - on API Level 22 and below - on REAL DEVICES

See original GitHub issue

Issue description

Hi guys! I have a problem with HLS streams on devices Android 22 Api and below for cameras with high definition 2688x1520 and bitrate 5812 - stream can’t play. I use ExoPlayer version 2.9.6 (also testing with 2.10.4). On other devices and other cameras - all ok. I attached short and long bug report. Please help me to resolve this issue.

D: NoSupport [codec.profileLevel, avc1.4D4032, video/avc] [OMX.google.h264.decoder, video/avc] [generic_x86_64, Android SDK built for x86_64, unknown, 22]
I: Using client-side OMX mux.
E: [OMX.google.h264.decoder] storeMetaDataInBuffers failed w/ err -1010
E: [OMX.google.h264.decoder] ERROR(0x80001001)
E: signalError(omxError 0x80001001, internalError -2147483648)
E: Codec reported err 0x80001001, actionCode 0, while in state 6
E: Internal runtime error.
    java.lang.IllegalStateException
        at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
        at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:1033)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1287)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:663)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:536)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:303)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:135)
        at android.os.HandlerThread.run(HandlerThread.java:61)
E: Stop failed.
    java.lang.IllegalStateException
        at android.media.MediaCodec.native_stop(Native Method)
        at android.media.MediaCodec.stop(MediaCodec.java:628)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.releaseCodec(MediaCodecRenderer.java:608)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.releaseCodec(MediaCodecVideoRenderer.java:508)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:562)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onDisabled(MediaCodecVideoRenderer.java:377)
        at com.google.android.exoplayer2.BaseRenderer.disable(BaseRenderer.java:153)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:983)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:771)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:742)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:358)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:135)
        at android.os.HandlerThread.run(HandlerThread.java:61)
D: java.lang.IllegalStateException

Reproduction steps

Just create ExoPlayer with HLS stream use below ULR

Link to test content

To show stream open in Safari browser this link: https://fs15.naveksoft.com:62121/ee6a9260-3d8e-4d85-af7a-617337faba36/tracks-v1/mono.m3u8?token=dc7a6244f783d69fb59742c38ec1584505701d5c-F1QtdSE2Q1JyauJ-1568710462-1568624062

A full bug report captured from the device

ExoPlayer-bug-report.txt

Version of ExoPlayer being used

2.9.6, 2.10.4

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

Android 22 api and below for cameras with high definition 2688x1520 and bitrate 5812

Updated

I founded real device Huawei Android 4.4.2 , short error logs:

E/dalvikvm: Could not find class 'com.google.android.exoplayer2.video.MediaCodecVideoRenderer$OnFrameRenderedListenerV23', referenced from method com.google.android.exoplayer2.video.MediaCodecVideoRenderer.clearRenderedFirstFrame
E/dalvikvm: Could not find class 'com.google.android.exoplayer2.video.MediaCodecVideoRenderer$OnFrameRenderedListenerV23', referenced from method com.google.android.exoplayer2.video.MediaCodecVideoRenderer.configureCodec
E/dalvikvm: Could not find class 'android.media.AudioAttributes$Builder', referenced from method com.google.android.exoplayer2.audio.DefaultAudioSink.createAudioTrackV21
E/dalvikvm: Could not find class 'android.media.AudioFormat$Builder', referenced from method com.google.android.exoplayer2.audio.DefaultAudioSink.createAudioTrackV21
E/dalvikvm: Could not find class 'android.media.AudioAttributes$Builder', referenced from method com.google.android.exoplayer2.audio.AudioAttributes.getAudioAttributesV21
E/dalvikvm: Could not find class 'android.media.AudioFocusRequest$Builder', referenced from method com.google.android.exoplayer2.audio.AudioFocusManager.requestAudioFocusV26
E/dalvikvm: Could not find class 'android.media.AudioFocusRequest$Builder', referenced from method com.google.android.exoplayer2.audio.AudioFocusManager.requestAudioFocusV26
E/OMXNodeInstance: OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed
E/ACodec: [OMX.k3.video.decoder.avc] storeMetaDataInBuffers failed w/ err -2147483648
A/ACodec: frameworks/av/media/libstagefright/ACodec.cpp:1487 CHECK(def.nBufferSize >= size) failed.
A/libc: Fatal signal 6 (SIGABRT) at 0x00004e98 (code=-6), thread 20445 (CodecLooper)
E/dalvikvm: Could not find class 'android.support.v4.view.ViewCompat$OnUnhandledKeyEventListenerWrapper', referenced from method android.support.v4.view.ViewCompat.addOnUnhandledKeyEventListener
E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method android.support.v4.view.ViewCompat.dispatchApplyWindowInsets
E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method android.support.v4.view.ViewCompat.onApplyWindowInsets
E/dalvikvm: Could not find class 'android.view.View$OnUnhandledKeyEventListener', referenced from method android.support.v4.view.ViewCompat.removeOnUnhandledKeyEventListener
E/dalvikvm: Could not find class 'android.support.v4.view.ViewCompat$1', referenced from method android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener


Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ojw28commented, Sep 16, 2019

It’s probably just because the video you’re trying to play exceeds the capabilities of the device. I’m not sure how realistic it is to expect potentially 4 year old hardware to decode 2688x1520 video. Some logs from a real device would help to confirm whether that’s the problem. The failure mode is probably different than with the emulator.

1reaction
ojw28commented, Sep 16, 2019

Please see the bottom of this page for guidance on emulators.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stop failed. java.lang.IllegalStateException - on API Level 22 ...
I use ExoPlayer version 2.9.6 (also testing with 2.10.4). On other devices and other cameras - all ok. Please help me to resolve...
Read more >
New features in Android Studio Preview - Android Developers
This page lists the new features introduced in Android Studio preview releases. The preview builds provide early access to the latest features and ......
Read more >
Android Platform Guide - Apache Cordova
This guide shows how to set up your SDK environment to deploy Cordova apps for Android devices, and how to optionally use Android-centered...
Read more >
Exoplayer on Nexus Player [37069375] - Issue Tracker - Google
10-20 00:40:55.140 11891-12360/com.my.app I/libva: VA-API version 0.34.0 ... 10-20 00:40:55.577 11891-12286/com.my.app E/ExoPlayerImplInternal: java.lang.
Read more >
Exoplayer Amazon port crash - Forums - Amazon Developer Forums
05-18 15:42:18.971 5575-6452/com.ngsn.tv E/ExoPlayerImplInternal: Internal runtime error. java.lang.IllegalStateException; at android.media.MediaCodec.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found