react-native-reanimated: Fatal Exception: java.lang.ArrayIndexOutOfBoundsException

Description

Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
       at java.util.ArrayList.get(ArrayList.java:439)
       at com.swmansion.reanimated.NodesManager.onAnimationFrame(NodesManager.java:70)
       at com.swmansion.reanimated.NodesManager.access$000(NodesManager.java)
       at com.swmansion.reanimated.NodesManager$1.doFrameGuarded(NodesManager.java:2)
       at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java)
       at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:46)
       at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:2)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1106)
       at android.view.Choreographer.doCallbacks(Choreographer.java:866)
       at android.view.Choreographer.doFrame(Choreographer.java:792)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1092)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8751)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Steps to reproduce

idk

Snack or a link to a repository

https://snack.expo.dev/1234

Reanimated version

3.0.0-rc8

React Native version

0.70.5

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Release mode

Device

Real device

Device model

No response

Acknowledgements

Yes

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 26 (1 by maintainers)

Most upvoted comments

Got the same issue in my project. Since I added Reanimated to my project, I have been seeing crashes in my logs with indexOutOfBounds on Android. I have tried versions 2.12.0, 2.13.0 and 3.0.0-rc.8.

Fatal Exception: java.lang.IndexOutOfBoundsException index=48 count=44 Index and count varies per crash.

android.view.ViewGroup.addInArray (ViewGroup.java:5606)
android.view.ViewGroup.addViewInner (ViewGroup.java:5499)
android.view.ViewGroup.addView (ViewGroup.java:5296)
com.facebook.react.views.view.ReactViewGroup.addView (ReactViewGroup.java:517)
android.view.ViewGroup.addView (ViewGroup.java:5236)
com.facebook.react.views.view.ReactClippingViewManager.addView (ReactClippingViewManager.java:38)
com.facebook.react.views.view.ReactClippingViewManager.addView (ReactClippingViewManager.java:19)
com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren (NativeViewHierarchyManager.java:533)
com.swmansion.reanimated.layoutReanimation.ReanimatedNativeHierarchyManager.manageChildren (ReanimatedNativeHierarchyManager.java:262)
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:1299)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:1309)
android.view.Choreographer.doCallbacks (Choreographer.java:923)
android.view.Choreographer.doFrame (Choreographer.java:847)
android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1283)
android.os.Handler.handleCallback (Handler.java:942)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loopOnce (Looper.java:226)
android.os.Looper.loop (Looper.java:313)
android.app.ActivityThread.main (ActivityThread.java:8741)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)

@pierroo facing the same issue in android with v3 too.

Facing the same issue, the crashes are increasing rapidly.

Can we reopen @Willham12 ? Since v3 is still facing the issue as mentioned by @Jscripter-pk