Android crashes: getChildDrawingOrder() returned invalid index 1
See original GitHub issueWe get many crash reports like that:
java.lang.IndexOutOfBoundsException: getChildDrawingOrder() returned invalid index 1 (child count is 1)
at android.view.ViewGroup.getAndVerifyPreorderedIndex(ViewGroup.java:1802)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3751)
at android.view.View.draw(View.java:18401)
at android.view.View.updateDisplayListIfDirty(View.java:17376)
at android.view.View.draw(View.java:18160)
at android.view.ViewGroup.drawChild(ViewGroup.java:3968)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3778)
at android.view.View.updateDisplayListIfDirty(View.java:17371)
at android.view.View.draw(View.java:18160)
at android.view.ViewGroup.drawChild(ViewGroup.java:3968)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3754)
at android.view.View.updateDisplayListIfDirty(View.java:17371)
at android.view.View.draw(View.java:18160)
at android.view.ViewGroup.drawChild(ViewGroup.java:3968)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3754)
at android.view.View.updateDisplayListIfDirty(View.java:17371)
at android.view.View.draw(View.java:18160)
at android.view.ViewGroup.drawChild(ViewGroup.java:3968)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3754)
at android.view.View.updateDisplayListIfDirty(View.java:17371)
at android.view.View.draw(View.java:18160)
at android.view.ViewGroup.drawChild(ViewGroup.java:3968)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3754)
at android.view.View.draw(View.java:18401)
at android.view.View.updateDisplayListIfDirty(View.java:17376)
at android.view.View.draw(View.java:18160)
at android.view.ViewGroup.drawChild(ViewGroup.java:3968)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3754)
at android.view.View.updateDisplayListIfDirty(View.java:17371)
at android.view.View.draw(View.java:18160)
at android.view.ViewGroup.drawChild(ViewGroup.java:3968)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3754)
at android.view.View.updateDisplayListIfDirty(View.java:17371)
at android.view.View.draw(View.java:18160)
at android.view.ViewGroup.drawChild(ViewGroup.java:3968)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3754)
at android.view.View.updateDisplayListIfDirty(View.java:17371)
at android.view.View.draw(View.java:18160)
at android.view.ViewGroup.drawChild(ViewGroup.java:3968)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3754)
at android.view.View.draw(View.java:18401)
at com.android.internal.policy.DecorView.draw(DecorView.java:966)
at android.view.View.updateDisplayListIfDirty(View.java:17376)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:722)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:728)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:836)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:3168)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2964)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2552)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1537)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7183)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:959)
at android.view.Choreographer.doCallbacks(Choreographer.java:734)
at android.view.Choreographer.doFrame(Choreographer.java:670)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:945)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1518)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
I have no clue which component might cause this.
Which platform(s) does your issue occur on?
Android only
Please provide the following version numbers that your issue occurs with:
- CLI: 4.1.2
- Cross-platform modules: 4.1.1
- Runtime(s): 4.1.3
Please tell us how to recreate the issue in as much detail as possible.
I don’t know how to reproduce
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
getChildDrawingOrder() returned invalid index 1 (child count ...
IndexOutOfBoundsException: getChildDrawingOrder() returned invalid index 1 (child count is 1) at android.view.ViewGroup.
Read more >IndexOufOfBoundsException in the ViewPager [36990872]
The crash contains none of our code, just android and support library code. ... IndexOutOfBoundsException: Invalid index 0, size is 0 at java.util....
Read more >错误闪退java.lang.IndexOutOfBoundsException
04-16 15:28:17.173 2537 2537 E app3c : java.lang.IndexOutOfBoundsException: getChildDrawingOrder() returned invalid index 2 (child count is 2)
Read more >好几个APP闪退问题 - DCloud问答
IndexOutOfBoundsException: getChildDrawingOrder() returned invalid index 1 (child count is 1) at android.view.ViewGroup.
Read more >Crashes - Android Developers
Figure 1. An app crash on an Android device. An app doesn't need to be running in the foreground for it to crash....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dbenninger try to isolate the case locally in a sample app or Playground. If this error is received via Crashlytics or similar reporting service please post as much information as possible about the type of devices that are hitting the issue (API level/ model). Let us know if you are using some specific UI plugin (post the content of
package.jsonfile).You could also update the application to the latest version of runtimes and tns-core-modules and retest the scenario.
The method is part of android’s ViewGroup so check if you are using ListView and trying to access invalid item index at some point. Also, check if any third-party UI plugin is using ViewGroup in its own logic.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.