software-mansion / software-mansion/react-native-screens

Exception java.lang.IndexOutOfBoundsException: getChildDrawingOrder() returned invalid index 3 (child count is 3)

Open
#3,096 37 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

missing-repro platform:android
Dominant language
TypeScript
Stars
3.7k
Forks
714
Avg merge
2d 23h
Merged PRs (30d)
71

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting ScreenStack.kt around performDraw at line 334, then trace the Android getChildDrawingOrder exception in the supplied stack trace. Compare the reported React Native 0.79.3, Screens 4.11.1, Fabric, Hermes, and release-mode conditions. Done means identifying a reproducible cause or confirming the conditions needed to investigate it further.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin, react-native
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.