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

Crash on Android 5.1 when try to release player #7954

Closed
WagesOfSin opened this issue Sep 21, 2020 · 8 comments
Closed

Crash on Android 5.1 when try to release player #7954

WagesOfSin opened this issue Sep 21, 2020 · 8 comments

Comments

@WagesOfSin
Copy link

WagesOfSin commented Sep 21, 2020

[REQUIRED] Issue description

Updated on the latest version 2.12.0 and I have crash on Android 5, Android 6 when I try to release the player. Don't have this crash on version 2.11.8. I can't reproduce this issue on your demo app.

[REQUIRED] Reproduction steps

  1. Open the app with player.
  2. Release player.

[REQUIRED] Link to test content

It doesn't mater

[REQUIRED] A full bug report captured from the device

java.lang.NoClassDefFoundError: com.google.android.exoplayer2.-$$Lambda$ExoPlayerImplInternal$vdH6YQpqyxP6KbK0sRxQC-SGllM
    at com.google.android.exoplayer2.ExoPlayerImplInternal.release(ExoPlayerImplInternal.java:402)
    at com.google.android.exoplayer2.ExoPlayerImpl.release(ExoPlayerImpl.java:708)
    at com.google.android.exoplayer2.SimpleExoPlayer.release(SimpleExoPlayer.java:1710)
    at com.everydoggy.android.presentation.view.adapter.viewholders.VideoTypeViewHolder.releasePlayer(VideoTypeViewHolder.kt:164)
    at com.everydoggy.android.presentation.view.adapter.viewholders.VideoTypeViewHolder.access$releasePlayer(VideoTypeViewHolder.kt:47)
    at com.everydoggy.android.presentation.view.adapter.viewholders.VideoTypeViewHolder$observer$1.onStateChanged(VideoTypeViewHolder.kt:254)
    at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:361)
    at androidx.lifecycle.LifecycleRegistry.backwardPass(LifecycleRegistry.java:316)
    at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:334)
    at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:145)
    at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:131)
    at androidx.fragment.app.FragmentViewLifecycleOwner.handleLifecycleEvent(FragmentViewLifecycleOwner.java:51)
    at androidx.fragment.app.Fragment.performPause(Fragment.java:2874)
    at androidx.fragment.app.FragmentStateManager.pause(FragmentStateManager.java:383)
    at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1206)
    at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1356)
    at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1434)
    at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1504)
    at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2007)
    at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1953)
    at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1849)
    at androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:413)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5254)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

[REQUIRED] Version of ExoPlayer being used

Version is 2.12.0

[REQUIRED] Device(s) and version(s) of Android being used

Lyf Wind 7 Black LS-5016 Android 6.0.1
Vivo Y21 Android 5.1.1

@Samrobbo
Copy link
Contributor

Samrobbo commented Sep 21, 2020

Please provide complete information as requested in the issue template. The issue template can be found here. If you're unable to share bug reports or test content publicly, please send them to dev.exoplayer@gmail.com using a subject in the format "Issue #1234", where "#1234" should be replaced with your issue number. Please also update this issue to indicate you’ve done this.

The parts in particular that we really need is a bug report captured using adb, as well as a link to some test content.

@ojw28
Copy link
Contributor

ojw28 commented Sep 21, 2020

This is normally caused by some kind of build issue, rather than being a problem with the library. Forgetting to enable Java 8 support is a common cause, so it's definitely worth checking this. It's also possible that you're using overly aggressive code stripping / Proguard configuration.

@WagesOfSin
Copy link
Author

WagesOfSin commented Sep 21, 2020

Thank you for your answer @ojw28. But I provide log from debug version of my app. For this reason it can't be proguard configuration. Of cause I use Java 8 for my app :) I'll try to delete gradle cache. May be it helps...

@boylenssen
Copy link

I can confirm this issue. I upgraded to 2.12.0 last week and got crashes from the field.
Created an Android 6.0 emulator and could reproduce it. No proguard needed

@ojw28
Copy link
Contributor

ojw28 commented Oct 9, 2020

@boylenssen - If that's the case then please provide detailed reproduction steps. For example, a small sample project that reproduces the issue, along with steps necessary to get to the point where the emulator crashes when using it.

Note that we have been unable to reproduce the issue internally. We don't see the issue occurring for Google owned apps, which obviously have fairly wide usage. There are also only limited reports of the issue affecting external developers. This is pretty strong evidence to suggest that it's not as straightforward as just being an issue with 2.12.0, and is more likely to be something specific (and probably unusual) about the way your particular app(s) are being built.

@google-oss-bot
Copy link
Collaborator

Hey @WagesOfSin. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link
Collaborator

Since there haven't been any recent updates here, I am going to close this issue.

@WagesOfSin if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@adrian-linca
Copy link

adrian-linca commented Dec 17, 2020

I think this issue is caused by guava, it's been reported in related issues, but I'm adding my fix here too.
I'm forcing the latest guava library:

configurations.all {
    resolutionStrategy {
        failOnVersionConflict()
        force (
                'com.google.guava:guava:30.1-android'
        )
    }
}

@google google locked and limited conversation to collaborators Jan 8, 2021
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

6 participants