-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix Android camera unmount ANR or Freezes #3331
Fix Android camera unmount ANR or Freezes #3331
Conversation
…may cause ANRs or slow down the UI when unmounting. The side effect of this is a nasty warning `BufferQueue has been abandoned` that can be ignored.
Hi @cristianoccazinsp we're experiencing some issues on low-mid end devices related to unmount of RNCamera. #3346 @MarcoScabbiolo @fabriziobertoglio1987 sorry to tag you folks, but what do you think about this PR? |
I haven’t seen issues with these changes neither, but we still haven’t got enough users to test the latest update with this change, reason I’m waiting to see if another ANR pops up. How were you able to reproduce the issue? I haven’t been able to consistently reproduce it, all I know is that it randomly happens. |
@cristianoccazinsp take a look at #3346 there I left an explanation of what we're doing. But in short we have consecutive screens, each one with an RNCamera component. If the user goes back or forth in the navigation even if we unmount the RNCamera, we get this error on some devices. |
Do you think we can follow with this @cristianoccazinsp ? We can easily revert this if with start noticing any problem. |
@MateusAndrade yes, I think it is safe to merge and release. With Android nothing is ever 100% sure, so I can't guarantee that it won't fail on some devices. |
## [4.2.1](v4.2.0...v4.2.1) (2021-09-21) ### Bug Fixes * Remove the `mCamera.setPreviewDisplay` call on surface destroy as it may cause ANRs or slow down the UI when unmounting. The side effect of this is a nasty warning `BufferQueue has been abandoned` that can be ignored. ([#3331](#3331)) ([9c0b87e](9c0b87e))
🎉 This PR is included in version 4.2.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Remove the
mCamera.setPreviewDisplay
call on surface destroy as it may cause ANRs or slow down the UI when unmounting.The side effect of this is a nasty warning
BufferQueue has been abandoned
that can be ignored.I will be testing this on various other devices to ensure the buffer warning is still a warning and does not cause surprise crash on different devices.