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's bug with Proguard #4827

Closed AntonAndev closed 6 years ago

AntonAndev commented 6 years ago

Issue description

Currently in my project I use ExoPlayer r2.4.4. Half year ago I tried to upgrade to 2.6.2 and got many complains from users, app crashes on some devices, mostly TV boxes were affected, but some mobile devices too. My app has 100K users daily and is running on very different devices. Because I did not know a reason and I decided to return back to 2.4.4. In this case Firebase Crashlytics do not report about exceptions from ExoPlayer. One of my user has H96 Pro+ device, this device has a this problem. I decided to repeat a problem with version 2.8.4. I sent to a user apk for testing. He said app crashed. And again I couldn't find exception in the Crashlytics. Because Proguard gave me some problems with RenderScript and Google Cast(TM) I decided to add ExoPlayer class to proguard-rules.pro file. And sent new apk to user. With such setting app doesn't crash.

-keep class com.google.android.exoplayer.** {*;}

Reproduction steps

Run app with ExoPlayer 2.8.4 on H96 Pro+ with Proguard enabled

Link to test content

App crashes when playing HLS

Version of ExoPlayer being used

2.8.4

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

H96 Pro+ and some other

A full bug report captured from the device

Couldn't catch an exceptions on my test devices

andrewlewis commented 6 years ago

In v2 the package name changed to com.google.android.exoplayer2 (with a 2 on the end), so, given the proguard configuration made a difference, I wonder whether the problem is not in your direct usage of ExoPlayer but in another of your app's dependencies which bundles ExoPlayer v1.

To make progress on this, could you ask the user with the H96 Pro+ device to take a bug report after reproducing the error so we can see what the crash is?

AntonAndev commented 6 years ago

Hello, I tried to comment "-keep class com.google.android.exoplayer.* {;}" with Proguard enabled and sent new apk to the user, app doesn't crash... So I do not know what happened before.