google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.74k stars 6.03k forks source link

Exoplayer freezes when rotating or releasing the player. #4749

Closed Ashanen closed 5 years ago

Ashanen commented 6 years ago

Hi guys,

I couldn't find any working answer or any code sniped. At first we had our player in a fragment but after switching to other cameras, or rotating the device many times there was an error with initializing the codec ( we were not releasing player because player.release() completely freezes the app). I decided to move whole player to a separate activity and it still freezes the app after rotation if we use player.release() . I can provide any information you need to help me work through it. It's really important for my company.

I used the code from codelabs because I took it for granted that it should work.

Here is my simple activity code :

` public class CameraActivity extends Activity implements View.OnClickListener, ExoPlayerVideoHandler.ExoPlayerListener {

private PlayerView playerView;
private SimpleExoPlayer player;
private String streamUrl = " --- here is my .mpd stream link --- ";
private boolean playWhenReady = false;

private boolean startAutoPlay;
private long startPosition;
private int startWindow;

private String userAgent;

private static final DefaultBandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();

private static final String KEY_TRACK_SELECTOR_PARAMETERS = "track_selector_parameters";
private static final String KEY_WINDOW = "window";
private static final String KEY_POSITION = "position";
private static final String KEY_AUTO_PLAY = "auto_play";

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.player_activity);
    View rootView = findViewById(R.id.root);
    rootView.setOnClickListener(this);
    playerView = findViewById(R.id.player_view);

    if (savedInstanceState != null) {
        startAutoPlay = savedInstanceState.getBoolean(KEY_AUTO_PLAY);
        startWindow = savedInstanceState.getInt(KEY_WINDOW);
        startPosition = savedInstanceState.getLong(KEY_POSITION);
    }
    initializePlayer();

}

@Override
public void onSaveInstanceState(Bundle outState) {
    updateStartPosition();
    outState.putBoolean(KEY_AUTO_PLAY, startAutoPlay);
    outState.putInt(KEY_WINDOW, startWindow);
    outState.putLong(KEY_POSITION, startPosition);
}

private void updateStartPosition() {
    if (player != null) {
        startAutoPlay = player.getPlayWhenReady();
        startWindow = player.getCurrentWindowIndex();
        startPosition = Math.max(0, player.getContentPosition());
    }
}

private void initializePlayer() {
    TrackSelection.Factory videoTrackSelectionFactory = new AdaptiveTrackSelection.Factory(bandwidthMeter);
    TrackSelector trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory);

    userAgent = Util.getUserAgent(getApplicationContext(), getApplicationName(getApplicationContext()));

    player = ExoPlayerFactory.newSimpleInstance(new DefaultRenderersFactory(this),
            trackSelector, new DefaultLoadControl());

    playerView.setPlayer(player);

    if (streamUrl != null) {
        Uri uri = Uri.parse(streamUrl);
        MediaSource mediaSource = buildMediaSource(uri);
        player.prepare(mediaSource, true, false);
    }

    player.setPlayWhenReady(playWhenReady);
    player.seekTo(startWindow, startPosition);
}

private MediaSource buildMediaSource(Uri uri) {
    DataSource.Factory manifestDataSourceFactory = new DefaultHttpDataSourceFactory(userAgent);
    DashChunkSource.Factory dashChunkSourceFactory = new DefaultDashChunkSource.Factory
            (new DefaultHttpDataSourceFactory(userAgent, bandwidthMeter));
    return new DashMediaSource.Factory(dashChunkSourceFactory, manifestDataSourceFactory).createMediaSource(uri);
}

private String getApplicationName(Context context) {
    ApplicationInfo applicationInfo = context.getApplicationInfo();
    int stringId = applicationInfo.labelRes;
    return stringId == 0 ? applicationInfo.nonLocalizedLabel.toString() : context.getString(stringId);
}

private void releasePlayer() {
    if (player != null) {
        startPosition = player.getCurrentPosition();
        startWindow = player.getCurrentWindowIndex();
        playWhenReady = player.getPlayWhenReady();
        player.release();
        player = null;
    }
}

@Override
public void onStart() {
    super.onStart();
    if (Util.SDK_INT > 23) {
        initializePlayer();
    }
}

@Override
public void onResume() {
    super.onResume();
    if (Util.SDK_INT <= 23 || player == null) {
        initializePlayer();
    }
}

@Override
public void onPause() {
    super.onPause();
    if (Util.SDK_INT <= 23) {
        releasePlayer();
    }
}

@Override
public void onStop() {
    super.onStop();
    if (Util.SDK_INT > 23) {
        releasePlayer();
    }
}`

Here is logcat :

08-29 16:59:44.340 28508-28751/com.ftsgps.monarch E/ExoPlayerImplInternal: Internal runtime error.
    java.lang.IllegalStateException
        at android.media.MediaCodec.native_dequeueInputBuffer(Native Method)
        at android.media.MediaCodec.dequeueInputBuffer(MediaCodec.java:2507)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:646)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:583)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:518)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:301)
        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-29 16:59:44.350 28508-28768/com.ftsgps.monarch E/Surface: getSlotFromBufferLocked: unknown buffer: 0x963a43e0
08-29 16:59:44.352 28508-28768/com.ftsgps.monarch E/Surface: getSlotFromBufferLocked: unknown buffer: 0x963a4500
08-29 16:59:44.354 28508-28768/com.ftsgps.monarch E/Surface: getSlotFromBufferLocked: unknown buffer: 0x963a4620
08-29 16:59:44.355 28508-28768/com.ftsgps.monarch E/Surface: getSlotFromBufferLocked: unknown buffer: 0x963a48c0
08-29 16:59:44.356 28508-28768/com.ftsgps.monarch E/Surface: getSlotFromBufferLocked: unknown buffer: 0x963a4a40
08-29 16:59:44.357 28508-28768/com.ftsgps.monarch E/Surface: getSlotFromBufferLocked: unknown buffer: 0x963a4b00
08-29 16:59:44.359 28508-28768/com.ftsgps.monarch E/Surface: getSlotFromBufferLocked: unknown buffer: 0x963a4f80
08-29 16:59:44.360 28508-28768/com.ftsgps.monarch E/Surface: getSlotFromBufferLocked: unknown buffer: 0x963a50a0
08-29 16:59:44.361 28508-28768/com.ftsgps.monarch E/Surface: getSlotFromBufferLocked: unknown buffer: 0x963a5040
08-29 16:59:44.375 28508-28751/com.ftsgps.monarch E/ExoPlayerImplInternal: Stop failed.
    java.lang.IllegalStateException
        at android.media.MediaCodec.native_stop(Native Method)
        at android.media.MediaCodec.stop(MediaCodec.java:2007)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.releaseCodec(MediaCodecRenderer.java:527)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.releaseCodec(MediaCodecVideoRenderer.java:477)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:483)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onDisabled(MediaCodecVideoRenderer.java:365)
        at com.google.android.exoplayer2.BaseRenderer.disable(BaseRenderer.java:153)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:972)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:768)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:731)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:353)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:154)
        at android.os.HandlerThread.run(HandlerThread.java:61)

Version of ExoPlayer being used 2.8.4

Gradle :

implementation  'com.google.android.exoplayer:exoplayer-core:2.8.4'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.8.4'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.8.4'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.8.4'
implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.8.4'

Also it's woth to mention that this s workin on a demo app and the same device. Device Alcatel TCL 9024W Android 7.1.1

*UPDATE I have just copied a whole demo app into our app ( without gradle) stream plays but it fails the same way when rotating device.

AquilesCanta commented 6 years ago

@ojw28 Mind providing some insight?

AquilesCanta commented 6 years ago

@Ashanen, also please fill the issue template. Please provide a bugreport and, if possible, send sample media, unless the issue reproduces with one of the sample streams from the demo app.

Ashanen commented 6 years ago

Ok, so there are some updates. I have spotted the issue which was freezing the app and it was caused by android:configChanges in the manifest. Since that I created new activity, ported manifest from demoApp and everything seems to be working. Player is releasing correctly etc. But.. I spotted another issue :

1) When opening the stream for the 1st time on camera no.1 everything seems to work, but when returning to a fragment and choosing another camera ( wanting to play another stream) I get an error:

08-31 14:18:31.585 5355-5355/com.ftsgps.monarch I/com.ftsgps.monarch.views.PullableNestedScrollView: 0.0 true
08-31 14:18:31.619 5355-5355/com.ftsgps.monarch I/com.ftsgps.monarch.views.PullableNestedScrollView: 0.0 true
08-31 14:18:32.548 5355-5355/com.ftsgps.monarch I/Activity: 8587152
08-31 14:18:32.606 5355-5374/com.ftsgps.monarch V/FA: Recording user engagement, ms: 6615
08-31 14:18:32.608 5355-5374/com.ftsgps.monarch V/FA: Using measurement service
08-31 14:18:32.609 5355-5374/com.ftsgps.monarch V/FA: Connecting to remote service
08-31 14:18:32.615 5355-5355/com.ftsgps.monarch I/ExoPlayerImpl: Release 28e1496 [ExoPlayerLib/2.8.4] [PIXI5-8_4G_TMO, 9024W, TCL, 25] [goog.exo.core, goog.exo.ui, goog.exo.dash]
08-31 14:18:32.616 5355-5374/com.ftsgps.monarch V/FA: Activity paused, time: 62627273
08-31 14:18:32.620 5355-6389/com.ftsgps.monarch E/ACodec: [OMX.qcom.video.decoder.avc] ERROR(0x80001009)
    signalError(omxError 0x80001009, internalError -2147483648)
08-31 14:18:32.622 5355-5374/com.ftsgps.monarch D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=6615, _sc=DownloadingActivity, _si=-2701163106923029096}]
08-31 14:18:32.627 5355-6388/com.ftsgps.monarch E/MediaCodec: Codec reported err 0x80001009, actionCode 0, while in state 9
08-31 14:18:32.661 5355-5374/com.ftsgps.monarch V/FA: Using measurement service
    Connection attempt already in progress`

**when I pasted our 2 stream link into DemoAPP switching is also not possible without an error :** 

`08-31 14:26:52.490 306-306/? E/SurfaceFlinger: hwc1 createLayer1 for (1 x 1), name=com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity
    hwc1 createLayer2 for (1 x 1), name=com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity
08-31 14:26:52.541 306-306/? E/SurfaceFlinger: hwc1 createLayer1 for (800 x 1184), name=SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity
    hwc1 createLayer2 for (800 x 1184), name=SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity
08-31 14:26:52.545 306-306/? E/SurfaceFlinger: hwc1 createLayer1 for (800 x 1184), name=SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity
    hwc1 createLayer2 for (800 x 1184), name=SurfaceView - com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity
08-31 14:26:53.313 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null
08-31 14:26:53.678 338-529/? E/OMX-VDEC-1080P: Extension: OMX.google.android.index.storeANWBufferInMetadata not implemented
08-31 14:26:53.690 338-3698/? E/OMX-VDEC-1080P: Extension: OMX.google.android.index.storeANWBufferInMetadata not implemented
08-31 14:26:53.691 338-3698/? E/OMX-VDEC-1080P: Extension: OMX.google.android.index.configureVideoTunnelMode not implemented
    Extension: OMX.google.android.index.useAndroidNativeBuffer is supported
08-31 14:26:53.691 338-5554/? E/OMX-VDEC-1080P: Extension: OMX.google.android.index.describeHDRStaticInfo not implemented
08-31 14:26:53.696 338-5554/? E/OMX-VDEC-1080P: Does not handle dataspace request
08-31 14:26:53.696 338-5554/? E/OMXNodeInstance: getConfig(1520058:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
08-31 14:26:53.749 338-28409/? E/OMX-VDEC-1080P: Does not handle dataspace request
08-31 14:26:53.749 338-28409/? E/OMXNodeInstance: getConfig(1520058:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
08-31 14:26:53.791 338-529/? E/OMX-VDEC-1080P: Does not handle dataspace request
08-31 14:26:53.791 338-529/? E/OMXNodeInstance: getConfig(1520058:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
08-31 14:26:55.990 306-306/? E/SurfaceFlinger: hwc1 createLayer1 for (800 x 1280), name=com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.SampleChooserActivity
    hwc1 createLayer2 for (800 x 1280), name=com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.SampleChooserActivity
08-31 14:26:56.344 338-7985/? E/OMX-VDEC-1080P: OMX_COMPONENT_GENERATE_HARDWARE_ERROR
    ERROR: Sending OMX_ErrorHardware to Client
08-31 14:26:56.345 7900-7983/com.google.android.exoplayer2.demo E/ACodec: [OMX.qcom.video.decoder.avc] ERROR(0x80001009)
    signalError(omxError 0x80001009, internalError -2147483648)
08-31 14:26:56.345 7900-7982/com.google.android.exoplayer2.demo E/MediaCodec: Codec reported err 0x80001009, actionCode 0, while in state 9
08-31 14:26:58.292 2343-3700/? E/IzatSvc_PassiveLocListener: E/Exiting with error virtual void izat_manager::IzatPassiveLocationListener::onLocationChanged(const izat_manager::IzatLocation *, const IzatLocationStatus) line 171 "1"
08-31 14:27:01.178 355-355/? E/cnss-daemon: gateway mac address: %02x:%02x:%02x:%02x:%02x:%02x
    : 00:00:00:00:00:00
    Invalid mac address: 0xafa70e6cM
08-31 14:27:03.330 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null
08-31 14:27:12.582 2343-3279/? E/WifiHAL: Error polling socket
08-31 14:27:15.433 2343-2661/? E/ActivityManager: ANR in com.google.android.exoplayer2.demo (com.google.android.exoplayer2.demo/.SampleChooserActivity)
    PID: 7900
    Reason: Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago.  Wait queue length: 3.  Wait queue head age: 5683.7ms.)
    Load: 5.15 / 4.87 / 4.92
    CPU usage from 11892ms to 0ms ago (2018-08-31 14:27:00.001 to 2018-08-31 14:27:11.893):
      4.2% 2343/system_server: 2.6% user + 1.5% kernel / faults: 107 minor
      2.1% 3312/com.android.systemui: 1.3% user + 0.8% kernel / faults: 37 minor
      1.3% 7932/com.ftsgps.monarch: 1.1% user + 0.1% kernel / faults: 1841 minor
      1.7% 306/surfaceflinger: 0.9% user + 0.8% kernel / faults: 63 minor
      0.5% 4992/kworker/0:1: 0% user + 0.5% kernel
      0.4% 7262/kworker/2:1: 0% user + 0.4% kernel
      0.3% 17108/kworker/u8:3: 0% user + 0.3% kernel
      0.2% 34/kworker/u9:0: 0% user + 0.2% kernel
      0.2% 4819/kworker/u8:2: 0% user + 0.2% kernel
      0.2% 11692/adbd: 0% user + 0.1% kernel / faults: 107 minor
      0% 196/irq/224-spdm_bw: 0% user + 0% kernel
      0% 4679/com.tct.tablet.weather: 0% user + 0% kernel / faults: 16 minor
      0.1% 5394/kworker/1:0: 0% user + 0.1% kernel
      0.1% 6346/com.tct.tablet.filemanager: 0% user + 0.1% kernel / faults: 3 minor
      0% 6/kworker/u8:0: 0% user + 0% kernel
      0% 7/rcu_preempt: 0% user + 0% kernel
      0% 16/ksoftirqd/2: 0% user + 0% kernel
      0% 20/ksoftirqd/3: 0% user + 0% kernel
      0% 72/system: 0% user + 0% kernel
      0% 163/irq/325-fts_ts: 0% user + 0% kernel
      0% 170/cfinteractive: 0% user + 0% kernel
      0% 198/mmcqd/0: 0% user + 0% kernel
      0% 221/ueventd: 0% user + 0% kernel / faults: 110 minor
      0% 239/logd: 0% user + 0% kernel / faults: 1 minor
      0% 352/netd: 0% user + 0% kernel / faults: 84 minor
      0% 355/cnss-daemon: 0% user + 0% kernel
      0% 2043/com.android.vending: 0% user + 0% kernel / faults: 5 minor
      0% 3271/VosTXThread: 0% user + 0% kernel
      0% 3539/com.android.chrome: 0% user + 0% kernel / faults: 3 minor
      0% 3727/com.android.phone: 0% user + 0% kernel / faults: 4 minor
      0% 4264/com.tct.tablet.launcher: 0% user + 0% kernel / faults: 4 minor
      0% 4381/android.process.media: 0% user + 0% kernel / faults: 5 minor
      0% 6150/kworker/3:0: 0% user + 0% kernel
      0% 6835/com.theappninjas.gpsjoystick:remote: 0% user + 0% kernel
      0% 7961/logcat: 0% user + 0% kernel
      0% 18382/mdss_fb0: 0% user + 0% kernel
      0% 31138/kworker/u8:1: 0% user + 0% kernel
    3.7% TOTAL: 1.9% user + 1.8% kernel + 0% iowait + 0% softirq
    CPU usage from 2767ms to 3307ms later (2018-08-31 14:27:14.661 to 2018-08-31 14:27:15.200):
      9.1% 2343/system_server: 3.6% user + 5.4% kernel / faults: 1 minor
        9.1% 2661/ActivityManager: 3.6% user + 5.4% kernel
        1.8% 7322/Binder:2343_D: 1.8% user + 0% kernel
      1% 2/kthreadd: 0% user + 1% kernel
      1.2% 3312/com.android.systemui: 1.2% user + 0% kernel / faults: 7 minor
        1.2% 3675/RenderThread: 1.2% user + 0% kernel
      1.3% 4381/android.process.media: 0% user + 1.3% kernel / faults: 2 minor
      1.4% 4992/kworker/0:1: 0% user + 1.4% kernel
    4.1% TOTAL: 1.3% user + 2.7% kernel
08-31 14:27:15.472 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null
08-31 14:27:15.527 306-306/? E/SurfaceFlinger: hwc1 createLayer1 for (87 x 87), name=Application Not Responding: com.google.android.exoplayer2.demo
    hwc1 createLayer2 for (87 x 87), name=Application Not Responding: com.google.android.exoplayer2.demo
08-31 14:27:18.931 498-498/? E/VM_BMS: failed to set wake_lock rc=-13
08-31 14:27:18.936 498-498/? E/VM_BMS: failed to wake_unlock rc=-13
08-31 14:27:22.878 352-2925/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found
08-31 14:27:22.878 2343-3232/? E/NetdConnector: yingjie i: 36 ,start: 0
08-31 14:27:23.371 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null
08-31 14:27:24.264 352-2925/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found
08-31 14:27:24.265 2343-3232/? E/NetdConnector: yingjie i: 38 ,start: 0
08-31 14:27:33.392 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null
08-31 14:27:43.412 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null
08-31 14:27:53.433 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null
08-31 14:27:58.292 2343-3700/? E/IzatSvc_PassiveLocListener: E/Exiting with error virtual void izat_manager::IzatPassiveLocationListener::onLocationChanged(const izat_manager::IzatLocation *, const IzatLocationStatus) line 171 "1"
08-31 14:28:03.448 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null
08-31 14:28:07.074 498-498/? E/VM_BMS: failed to set wake_lock rc=-13
08-31 14:28:07.079 498-498/? E/VM_BMS: failed to wake_unlock rc=-13
08-31 14:28:13.471 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null
08-31 14:28:15.438 352-2925/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found
08-31 14:28:15.438 2343-3232/? E/NetdConnector: yingjie i: 36 ,start: 0
08-31 14:28:18.231 352-2925/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found
08-31 14:28:18.233 2343-3232/? E/NetdConnector: yingjie i: 38 ,start: 0
08-31 14:28:23.491 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null
08-31 14:28:33.513 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null
08-31 14:28:43.541 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null
08-31 14:28:55.223 498-498/? E/VM_BMS: failed to set wake_lock rc=-13
08-31 14:28:55.228 498-498/? E/VM_BMS: failed to wake_unlock rc=-13
08-31 14:28:58.291 2343-3700/? E/IzatSvc_PassiveLocListener: E/Exiting with error virtual void izat_manager::IzatPassiveLocationListener::onLocationChanged(const izat_manager::IzatLocation *, const IzatLocationStatus) line 171 "1"
08-31 14:29:03.574 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null
`

also : 
`  java.lang.IllegalArgumentException: Attachment cache cannot be null.
        at oyk.a(Unknown Source)
        at ozy.a(Unknown Source)
        at xth.a(SourceFile:2)
        at wtm.b(SourceFile:2)
        at wtn.a(Unknown Source)
        at xth.a(SourceFile:2)
        at xso.run(SourceFile:1)
        at wko.run(Unknown Source)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:761)
08-31 15:24:44.378 355-355/? E/cnss-daemon: gateway mac address: %02x:%02x:%02x:%02x:%02x:%02x
    : 00:00:00:00:00:00
    Invalid mac address: 0xafa70e6cM
08-31 15:24:45.595 338-26270/? E/OMX-VDEC-1080P: OMX_COMPONENT_GENERATE_HARDWARE_ERROR
    ERROR: Sending OMX_ErrorHardware to Client
08-31 15:24:45.596 26174-26263/com.google.android.exoplayer2.demo E/ACodec: [OMX.qcom.video.decoder.avc] ERROR(0x80001009)
    signalError(omxError 0x80001009, internalError -2147483648)
08-31 15:24:45.597 26174-26262/com.google.android.exoplayer2.demo E/MediaCodec: Codec reported err 0x80001009, actionCode 0, while in state 7
08-31 15:24:45.606 26174-26245/com.google.android.exoplayer2.demo E/ExoPlayerImplInternal: Internal runtime error.
    android.media.MediaCodec$CodecException: Error 0x80001009
        at android.media.MediaCodec.native_flush(Native Method)
        at android.media.MediaCodec.flush(MediaCodec.java:2054)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.flushCodec(MediaCodecRenderer.java:624)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.flushCodec(MediaCodecVideoRenderer.java:493)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onPositionReset(MediaCodecRenderer.java:475)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onPositionReset(MediaCodecVideoRenderer.java:299)
        at com.google.android.exoplayer2.BaseRenderer.resetPosition(BaseRenderer.java:136)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.resetRendererPosition(ExoPlayerImplInternal.java:718)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.seekToPeriodPosition(ExoPlayerImplInternal.java:687)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.seekToPeriodPosition(ExoPlayerImplInternal.java:648)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.seekToInternal(ExoPlayerImplInternal.java:633)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:304)
        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-31 15:24:48.825 26174-26245/com.google.android.exoplayer2.demo E/ExoPlayerImplInternal: Stop failed.
    java.lang.IllegalStateException
        at android.media.MediaCodec.native_stop(Native Method)
        at android.media.MediaCodec.stop(MediaCodec.java:2007)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.releaseCodec(MediaCodecRenderer.java:527)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.releaseCodec(MediaCodecVideoRenderer.java:477)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:483)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onDisabled(MediaCodecVideoRenderer.java:365)
        at com.google.android.exoplayer2.BaseRenderer.disable(BaseRenderer.java:153)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:972)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:768)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:731)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:353)
        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-31 15:24:48.839 26174-26174/com.google.android.exoplayer2.demo E/EventLogger: playerFailed [9.50, 0.64, window=0]
    com.google.android.exoplayer2.ExoPlaybackException
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:354)
        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: android.media.MediaCodec$CodecException: Error 0x80001009
        at android.media.MediaCodec.native_flush(Native Method)
        at android.media.MediaCodec.flush(MediaCodec.java:2054)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.flushCodec(MediaCodecRenderer.java:624)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.flushCodec(MediaCodecVideoRenderer.java:493)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onPositionReset(MediaCodecRenderer.java:475)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onPositionReset(MediaCodecVideoRenderer.java:299)
        at com.google.android.exoplayer2.BaseRenderer.resetPosition(BaseRenderer.java:136)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.resetRendererPosition(ExoPlayerImplInternal.java:718)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.seekToPeriodPosition(ExoPlayerImplInternal.java:687)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.seekToPeriodPosition(ExoPlayerImplInternal.java:648)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.seekToInternal(ExoPlayerImplInternal.java:633)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:304)
        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-31 15:24:50.368 3727-3727/? E/QtiImsExtUtils: getConfigForPhoneId subId is invalid
    isCarrierConfigEnabled bundle is null

BUG report from DemoAPP

bugreport-NMF26F-2018-08-31-14-59-09.zip

BUG report from OurAPP

bugreport-NMF26F-2018-08-31-15-05-23.zip

Its working on : Samsung Tab s2 android 7.0 Garmin 670 android 6.0.1

Not Working on : LGE VK700 5.0.2 TCL 9024W 7.1.1

tonihei commented 5 years ago

I think we never got any concrete media and reproduction steps to test with. Closing, but feel free to reopen if you can provide them.