-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
use overflow:hidden and borderRadius crash on some android9 and android10 devices #29312
Comments
Thanks for the report. Could you please refactor the message as following: (if you agree)
|
additionally you can build from source my react native version https://github.com/fabriziobertoglio1987/react-native/tree/rotation-issue-sdk-24-28 and install it in your project instead of the version from facebook as by this guide https://github.com/facebook/react-native/wiki/Building-from-source#publish-your-own-version-of-react-native |
ok.I have refactor it. |
This is strange, because react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java Lines 276 to 280 in bd38686
is only enabled for versions older then JellyBean which means your applications is crashing because of LAYER_TYPE_NONE https://github.com/facebook/react-native/search?q=LAYER_TYPE_NONE&unscoped_q=LAYER_TYPE_NONE |
can you reproduce without Thanks |
does the bug persist after using |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
this issue is not stale, I wrote a pr that fixes this issue.
|
You could try fixing this by using prop https://reactnative.dev/docs/view#rendertohardwaretextureandroid
My pr would just enable hardware accelleration on that view after applying the border radius, but you could solve this issue by enabling hardware accelleration on the view in Javascript for Android API N till P react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java Lines 267 to 270 in e6658a2
the prop allows you to call react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java Lines 120 to 122 in 1465c8f
|
+1, also encountering this crash. |
react-native 0.64.3, still encountering this issue. Crash goes way after removing overflow style from View. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Description
We found a crash on some android 9 and android 10 devices(xiaomi ,vivo).
#28881 Fixes this issue
The crash is fixed when we use
setLayerType(View.LAYER_TYPE_HARDWARE, null)
incom.facebook.react.views.view.ReactViewGroup#dispatchOverflowDraw
as @fabriziobertoglio1987 suggested in #28881The crash happens on RenderThread, likes below:
React Native version:
react native: 0.60.5
android: 9
device: Vivo x23,MI 8,etc.
Steps To Reproduce
our code likes below.it crash sometimes.if we remove
overflow: 'hidden'
,the crash disappeared.The text was updated successfully, but these errors were encountered: