Open hampelm opened 6 years ago
I'm also seeing this fairly ofter. Any guidance would be appreciated! Saw it in current master build as well.
I had to disable Android 4.x distribution with our app which is fair, it's ancient and didn't impact a lot of users. Would be nice to still support those devices if possible.
I am having same crash. on Android. Model- Pixel Android version- 7.1.2 Here is the log- Here is the crash.
Could you please help me resolve this?
07-10 12:57:42.365 9511-9511/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.aws.android, PID: 9511 java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index: 11, Size: 0 at com.facebook.react.bridge.ReactContext.handleException(Unknown Source) at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(Unknown Source) at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(Unknown Source) at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(Unknown Source) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:872) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:618) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860) 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:6121) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) Caused by: java.lang.IndexOutOfBoundsException: Index: 11, Size: 0 at java.util.ArrayList.get(ArrayList.java:411) at com.mapbox.rctmgl.components.styles.sources.RCTSource.getLayerAt(Unknown Source) at com.mapbox.rctmgl.components.styles.sources.RCTMGLShapeSourceManager.getChildAt(Unknown Source) at com.mapbox.rctmgl.components.styles.sources.RCTMGLShapeSourceManager.getChildAt(Unknown Source) at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView(Unknown Source) at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView(Unknown Source) at com.facebook.react.uimanager.NativeViewHierarchyManager.dropView(Unknown Source) at com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren(Unknown Source) at com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute(Unknown Source) at com.facebook.react.uimanager.UIViewOperationQueue$1.run(Unknown Source) at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(Unknown Source) at com.facebook.react.uimanager.UIViewOperationQueue.access$2100(Unknown Source) at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(Unknown Source) at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(Unknown Source) at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(Unknown Source) at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(Unknown Source) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:872) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:618) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860) 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:6121) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Hi all, I have kit kat on my android and i am using after release an apk with "gradlew assembleRelease" under ur_project/android. And it is working. I advise you to try this. I was getting error kind of like this error(I dont remember exactly)...
Ran into this sporatically when a component was being re-rendered due to props changing. Quick fix was to override shouldComponentUpdate
.
It seems there might be some sort of race condition in the android side of things here.
This can also be caused by MapView
having non react-native-mapbox-gl
components as children.
This can also be caused by
MapView
having nonreact-native-mapbox-gl
components as children.
Thank you! this is resolve my problem.
I'm getting these errors when swapping out layers on devices running old versions of android (eg KitKat 4.4). I'm working to isolate this in my code (and hopefully have a more reproducible bug) but it looks like maybe there could be an array length check to defend against this in
RCTSource.java:169
, similar to that inremoveLayer
inRCTSource.java:161
?Also seeing a variant here: