Exception java.lang.IndexOutOfBoundsException: getChildDrawingOrder() returned invalid index 3 (child count is 3)
Description
I found that a large number of users reported this error from the google play backend of the online log. At present to track ". Com. Swmansion rnscreens. ScreenStack. PerformDraw (ScreenStack. Kt: 334) "here, but I am unable to reproduce the problem. May I ask if there are any others who have encountered similar problems?
Steps to reproduce
I am unable to reproduce the problem.Only these Log:
Exception java.lang.IndexOutOfBoundsException: getChildDrawingOrder() returned invalid index 3 (child count is 3)
at android.view.ViewGroup.getAndVerifyPreorderedIndex (ViewGroup.java:2239)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4522)
at android.view.View.draw (View.java:23881)
at android.view.View.updateDisplayListIfDirty (View.java:22729)
at android.view.View.draw (View.java:23604)
at android.view.ViewGroup.drawChild (ViewGroup.java:4766)
at com.facebook.react.views.view.ReactViewGroup.drawChild (ReactViewGroup.java:972)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4549)
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw (ReactViewGroup.java:943)
at android.view.View.draw (View.java:23881)
at com.facebook.react.views.view.ReactViewGroup.draw (ReactViewGroup.java:934)
at android.view.View.updateDisplayListIfDirty (View.java:22729)
at android.view.View.draw (View.java:23604)
at android.view.ViewGroup.drawChild (ViewGroup.java:4766)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4549)
at android.view.View.updateDisplayListIfDirty (View.java:22720)
at android.view.View.draw (View.java:23604)
at android.view.ViewGroup.drawChild (ViewGroup.java:4766)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4525)
at android.view.View.updateDisplayListIfDirty (View.java:22720)
at android.view.View.draw (View.java:23604)
at android.view.ViewGroup.drawChild (ViewGroup.java:4766)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4525)
at android.view.View.updateDisplayListIfDirty (View.java:22720)
at android.view.View.draw (View.java:23604)
at android.view.ViewGroup.drawChild (ViewGroup.java:4766)
at com.facebook.react.views.view.ReactViewGroup.drawChild (ReactViewGroup.java:972)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4549)
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw (ReactViewGroup.java:943)
at android.view.View.draw (View.java:23881)
at com.facebook.react.views.view.ReactViewGroup.draw (ReactViewGroup.java:934)
at android.view.View.updateDisplayListIfDirty (View.java:22729)
at android.view.View.draw (View.java:23604)
at android.view.ViewGroup.drawChild (ViewGroup.java:4766)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4549)
at android.view.View.updateDisplayListIfDirty (View.java:22720)
at android.view.View.draw (View.java:23604)
at android.view.ViewGroup.drawChild (ViewGroup.java:4766)
at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild (CoordinatorLayout.java:1312)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4525)
at android.view.View.updateDisplayListIfDirty (View.java:22720)
at android.view.View.draw (View.java:23604)
at android.view.ViewGroup.drawChild (ViewGroup.java:4766)
at com.swmansion.rnscreens.ScreenStack.performDraw (ScreenStack.kt:334)
at com.swmansion.rnscreens.ScreenStack.access$performDraw (ScreenStack.kt:20)
at com.swmansion.rnscreens.ScreenStack$DrawingOp.draw (ScreenStack.kt:347)
at com.swmansion.rnscreens.ScreenStack.drawAndRelease (ScreenStack.kt:303)
at com.swmansion.rnscreens.ScreenStack.dispatchDraw (ScreenStack.kt:313)
at android.view.View.updateDisplayListIfDirty (View.java:22720)
at android.view.View.draw (View.java:23604)
at android.view.ViewGroup.drawChild (ViewGroup.java:4766)
at com.facebook.react.views.view.ReactViewGroup.drawChild (ReactViewGroup.java:972)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4549)
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw (ReactViewGroup.java:943)
at android.view.View.draw (View.java:23881)
at com.facebook.react.views.view.ReactViewGroup.draw (ReactViewGroup.java:934)
at android.view.View.updateDisplayListIfDirty (View.java:22729)
at android.view.View.draw (View.java:23604)
at android.view.ViewGroup.drawChild (ViewGroup.java:4766)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4549)
at android.view.View.updateDisplayListIfDirty (View.java:22720)
at android.view.View.draw (View.java:23604)
at android.view.ViewGroup.drawChild (ViewGroup.java:4766)
at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild (CoordinatorLayout.java:1312)
at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4525)
at android.view.View.updateDisplayListIfDirty (View.java:22720)
at android.view.View.draw (View.java:23604)
at android.view.ViewGroup.drawChild (ViewGroup.java:4766)
at com.swmansion.rnscreens.ScreenStack.performDraw (ScreenStack.kt:334)
at com.swmansion.rnscreens.ScreenStack.access$performDraw (ScreenStack.kt:20)
at com.swmansion.rnscreens.ScreenStack$DrawingOp.draw (ScreenStack.kt:347)
at com.swmansion.rnscreens.ScreenStack.drawAndRelease (ScreenStack.kt:303)
at com.swmansion.rnscreens.ScreenStack.dispatchDraw (ScreenStack.kt:313)
at android.view.View.updateDisplayListIfDirty (View.java:22720)
at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4748)
at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4721)
at android.view.View.updateDisplayListIfDirty (View.java:22683)
at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4748)
at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4721)
at android.view.View.updateDisplayListIfDirty (View.java:22683)
at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4748)
at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4721)
at android.view.View.updateDisplayListIfDirty (View.java:22683)
at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4748)
at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4721)
at android.view.View.updateDisplayListIfDirty (View.java:22683)
at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4748)
at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4721)
at android.view.View.updateDisplayListIfDirty (View.java:22683)
at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4748)
at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4721)
at android.view.View.updateDisplayListIfDirty (View.java:22683)
at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4748)
at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4721)
at android.view.View.updateDisplayListIfDirty (View.java:22683)
at android.view.ViewGroup.recreateChildDisplayList (ViewGroup.java:4748)
at android.view.ViewGroup.dispatchGetDisplayList (ViewGroup.java:4721)
at android.view.View.updateDisplayListIfDirty (View.java:22683)
at android.view.ThreadedRenderer.updateViewTreeDisplayList (ThreadedRenderer.java:719)
at android.view.ThreadedRenderer.updateRootDisplayList (ThreadedRenderer.java:725)
at android.view.ThreadedRenderer.draw (ThreadedRenderer.java:835)
at android.view.ViewRootImpl.draw (ViewRootImpl.java:6147)
at android.view.ViewRootImpl.performDraw (ViewRootImpl.java:5823)
at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:4904)
at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:3258)
at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:11161)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1938)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1946)
at android.view.Choreographer.doCallbacks (Choreographer.java:1226)
at android.view.Choreographer.doFrame (Choreographer.java:1089)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1892)
at android.os.Handler.handleCallback (Handler.java:971)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loopOnce (Looper.java:206)
at android.os.Looper.loop (Looper.java:296)
at android.app.ActivityThread.main (ActivityThread.java:9194)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:591)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1018)
Snack or a link to a repository
no the repository
Screens version
4.11.1
React Native version
0.79.3
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Release mode
Device
Real device
Device model
No response
Acknowledgements
Yes
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?
I unfortunately do not have any context from the maintainers side. I've seen some similar issue reported back a while ago, but can't find it right now. Might be worth looking through the issues though.
One thing you might try is to disable view clipping across the app. I recognize that this is not a permanent solution, however this would be mine primary suspect - that the issue lies somewhere on integration of the library with the view clipping system.
Additional logs and informations on #2982. I think your problem is the same as mine
It might be related to the use of "react-navigation" in the project. Unfortunately, I can't reproduce this problem
Having this issue too... Trying to get some info, but I'm guessing it is related to some drastic changes in the navigation tree (reset)
facing the same issue after enabling new architecture and react compiler with react native screens@~4.11.1
I can reproduce but not much consistently... seems to require some 3 minutes inactivity after screen automatically turn off
I got 3% crash rate, and most of them are related to this issue. Does anyone have a solution? This crash happens on various Android versions and devices.
override fun onCreate(savedInstanceState: Bundle?) {
// super.onCreate(savedInstanceState)
//for solve Android crash when restore in background, https://github.com/software-mansion/react-native-screens/issues/17#issuecomment
super.onCreate(null)
}
add this " super.onCreate(null)",it can significantly reduce the probability of this bug.
Thanks @sunny635533, but Expo initially has this line of code.
I'm having the same problem. Has anyone managed to solve it?
"react-native-screens": "^4.16.0", "react-native": "^0.80.0",
I'm having the same problem. It hasn't appeared since I upgraded to 4.18.0
I'm having the same problem. Has anyone managed to solve it?
"react-native-screens": "^4.16.0", "react-native": "^0.80.0",
after updating the version to 4.18.0 this problem was solved, after 4 days of work this error disappeared
This problem appears again in the new version :(
This problem appears again in the new version :(
@Dtrust Are you talking about the new version of your app or about 4.19.0?
This problem appears again in the new version :(
@Dtrust Are you talking about the new version of your app or about 4.19.0?
I'm talking about the react-native-screens library version 4.18.0
I'm also having this in production. Any updates on this? I'm using 4.11.1 too.
having same issue on production. i am using this 4.16.0