Closed GuoXiaoyang closed 9 months ago
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snippet of code, a snack or a link to a GitHub repository that reproduces the problem?
Hey! 👋
It looks like you've omitted a few important sections from the issue template.
Please complete Snack or minimal code example and Description sections.
I have a similar situation. I'm using a build from TestFlight, play with the app for a while, minimize it, restore it a few times, then I tap somewhere (on a tab, on a button) and it freezes up. I attach it to debugger and pause it to see where does it loop, and I see this semaphore stuff:
This should be caused by a previous call to enqueueUpdateViewOnNativeThread
with trySynchronously
argument set to true
, which happens only from updateProps
when there are some whitelisted native props there. And updateProps
is used in useAnimatedStyle
everywhere.
There is a similar older ticket here - https://github.com/software-mansion/react-native-reanimated/issues/1284
This problem may be caused by react-native-screens
, what's your react-native-screens
version?
https://github.com/software-mansion/react-native-screens/issues/726
detachInactiveScreens false
Thanks @zhiqingchen lets me try It's sad that I'm still facing the issue. react-native-screens version is 3.9.0 as well as the latest one 3.11.1. Thank you
Hi @pistonsky , I'm facing exactly the same one. Did you find a solution for that issue? Really appreciate that if you could share. Thank you
"@react-navigation/bottom-tabs": "^6.0.9", "@react-navigation/core": "^6.1.0", "@react-navigation/native": "^6.0.6", "@react-navigation/stack": "^6.0.11", "react-native-reanimated": "~2.3.3", "react-native-screens": "^3.13.1"
We are experiencing the same issue on both iOS 15.2 simulator and a physical device.
package | version |
---|---|
react-native | 0.66.0 |
@react-navigation/native | 6.0.6 |
@react-navigation/native-stack | 6.2.4 |
@react-navigation/stack | 6.0.11 |
react-native-gesture-handler | 2.4.2 |
We have a simple stack navigator which has another nested stack navigator. When navigating normally (back button) from the first screen of the nested navigator everything works as expected. However, when swiping back to the previous screen, the app freezes and then crashes without a sign of an error message other than the local system stack trace. The stack trace is very similar to the ones posted earlier here.
Both navigators are created using the createStackNavigator
method. If both are are changed to createNativeStackNavigator
then there is no issue, but I do not want to use the Native stack as I need to alter some other properties on the screen.
Did someone find a solution for this?
I'm facing facing the same issue.
I'm facing facing the same issue.
After I removed these props from Animated.View
the bug disappeared
key={isVisible}
entering={FadeIn}
exiting={FadeOut}
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
We are still unable to reproduce your problem. If anyone can provide a reproduction please feel free to reopen this issue
Hi @Latropos @vladanyes I have been facing a similar issue in production. I have an Animated.View being rendered with exiting and entering animation right on app start (this is usually when JS thread struggles for 2-3s loading everything), this somehow freezes my app and ends up blocking my UI thread causing ANRs. Also I am able to see high CPU usage using Flashlight occurring on the UI thread. Converting this Animated.View to a normal View completely removes the ANR. Worth mentioning I am using latest reanimated v2, and its not possible to upgrade to v3 in near future.
This is what I get on embrace:
Thread Name: com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.manageChildren
java.lang.System.arraycopy (Native Method)
java.util.Arrays.copyOf (Arrays.java:3258)
java.lang.AbstractStringBuilder.ensureCapacityInternal (AbstractStringBuilder.java:124)
java.lang.AbstractStringBuilder.append (AbstractStringBuilder.java:448)
java.lang.StringBuilder.append (StringBuilder.java:137)
android.view.View.notifyAppearedOrDisappearedForContentCaptureIfNeeded (View.java:9676)
android.view.View.dispatchDetachedFromWindow (View.java:20642)
android.view.ViewGroup.dispatchDetachedFromWindow (ViewGroup.java:4005)
android.view.ViewGroup.removeViewInternal (ViewGroup.java:5629)
android.view.ViewGroup.removeViewAt (ViewGroup.java:5576)
com.facebook.react.views.view.ReactViewGroup.removeViewAt (ReactViewGroup.java:545)
com.facebook.react.views.view.ReactClippingViewManager.removeViewAt (ReactClippingViewManager.java:74)
com.facebook.react.views.view.ReactClippingViewManager.removeViewAt (ReactClippingViewManager.java:19)
com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.manageChildren (ReanimatedNativeHierarchyManager.java:310)
com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute (UIViewOperationQueue.java:217)
com.facebook.react.uimanager.UIViewOperationQueue$1.run (UIViewOperationQueue.java:915)
com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches (UIViewOperationQueue.java:1026)
com.facebook.react.uimanager.UIViewOperationQueue.access$2600 (UIViewOperationQueue.java:47)
com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded (UIViewOperationQueue.java:1086)
com.facebook.react.uimanager.GuardedFrameCallback.doFrame (GuardedFrameCallback.java:29)
com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame (ReactChoreographer.java:175)
com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame (ChoreographerCompat.java:85)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:972)
android.view.Choreographer.doCallbacks (Choreographer.java:797)
android.view.Choreographer.doFrame (Choreographer.java:728)
android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:959)
android.os.Handler.handleCallback (Handler.java:938)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loop (Looper.java:223)
android.app.ActivityThread.main (ActivityThread.java:7706)
java.lang.reflect.Method.invoke (Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:612)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:997)
I'll try to share a small reproduction of this issue over the weekend, but I feel this is worth looking into.
Description
Expected behavior
Do not freeze and crash.
Actual behavior & steps to reproduce
It happens more after staying background for a long time and then comes back to the app by slide gesture. It freezes and then crashes after seconds.
Crash log
Package versions
Affected platforms