-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Occasionally ANRs on Huawei devices #6294
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
Could you try to set the same workarounds as used in #3724? That is set |
Unfortunatly this would mean that we enable the workaround in our production environment since we cannot reproduce this issue on our local devices. And I think we should avoid this 🙈. |
To reproduce locally, can you try to switch surfaces
|
Great! Thanks for the fast reply! I will try to reproduce this on one of these devices 👍 |
I build a demo application to try these switches on a Pixel 3a and an Honor10. Turns out, app is not crashing on Honor10 but exoplayer is cycling buffers from a previous set surface into the video rendering. When setting codecNeedsSetOutputSurfaceWorkaround to true this issue is gone. |
On Pixel3a, sm-t813, lg-h850 the app behaviour is as expected. |
I tested the surface switches on a Mate 10 Pro (because that seems to get the most errors in your table above), but couldn't reproduce the problem nor any cycling buffers. There also shouldn't be any problems in theory because Android device specification now ensures the correct behavior on SDK versions 27+. The cycling buffer issue you mentioned above is probably different from the setVideoSurface ANR one. So maybe file a new issue and provide more detailed reproduction steps so that we can have a closer look. For the ANR issue, this might also just be a case of the Android platform MediaCodec code being too slow to respond to the setSurface command. See #5887 and #5078 for other examples of this. Unfortunately, we need to block on these methods to ensure we don't accidentally leak decoder instances for other apps to use. And we are also trying to get stricter guarantees for MediaCodec calls in future Android releases to prevent this from happening. Besides that. it would still be good to see if setting the workaround flag helps to eliminate the issues you are having with these devices because we could then add them to the workaround list. |
Thanks for your efforts and feedback! |
Can we duplicate this onto #6331? The symptoms may be different but it seems like the solution is going to be the same. |
May let us wait until we have verified ANR statistics with our upcoming release to ensure that this will help with the ANR issues. (~1.5 Weeks) |
Hey @stetro. We need more information to resolve this issue but there hasn't been an update in 14 days. 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! |
Hi, we now have our release distributed to clients and it turns out that these ANRs still happen during app start on the above shown devicelist in a similar frequency. In conclusion to this I assume that the workaround does not have any effect. 😞 We now investigate further if this ANR happens in combination of Exoplayer and a weird view-lifecycle on devices running EMUI 9. But this again will take a couple of days until we see evidence after our sprint release. |
Thanks for the update! |
Hello,
I investigated a little bit and I think that the cause is a possible deadlock in the following scenario:
In my application I need to perform some logic on the ExoPlayer thread, since this is the only way I can access various states of the player. So, during this I may request a lock on a shared resource in my application.
I assume that the dead-lock is bacause you need the ExoPlayer thread to be running, in order to activate a flow that will release the message block - but it's blocked. I would like to suggest to add a special case where the Thanks |
@stetro. Do you have any updates for the investigations mentioned above? |
Hi @tonihei Thanks for the reminder: Unfortunately we could not find any evidence with different view behavior on EMUI devices. |
Thanks! In this case, I'll close this issue because there is nothing we can do about it. If anything new comes up, please feel free to reopen (or file a new issue). |
But maybe for completeness: Since we constantly keep updating to the latest ExoPlayer release we see a decay of ANRs in our releases during the last couple months. Unfortunately I cannot pinpoint a specific release which might has fixed an issue here. |
Did a new release solve the issue for you @stetro? We happen to have a similar ANR experienced only on |
Issue description
We experience occasionally ANRs on different Huawai devices when clearing video surface on an simpleExoPlayer instance. We experienced something similar before reported by my colleague in #3724.
Reproduction steps
Although we have similar or same devices to test on we cannot reproduce this issue in our environment.
A full bug report captured from the device
Unfortunatly we only have the obfuscated ANR log available but we could deobfuscate the following ANR report from play console:
Version of ExoPlayer being used
We are using
2.10.3
in our current release.Device(s) and version(s) of Android being used
Happens in Android 9 in the following devices
The text was updated successfully, but these errors were encountered: