Android SDK crash: ReactionInputView.highlightSelectedReaction > IndexOutOfBoundsException

I’ve got the following crash report that’s come in via Crashlytics.

I’m using SDK 5.4.1

Unfortunately I don’t have any context or recreation steps, just the stacktrace

Fatal Exception: java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
at java.util.ArrayList.get + 437(ArrayList.java:437)
at io.intercom.android.sdk.conversation.ReactionInputView.highlightSelectedReaction + 232(ReactionInputView.java:232)
at io.intercom.android.sdk.conversation.ReactionInputView$2.handleTouchMove + 198(ReactionInputView.java:198)
at io.intercom.android.sdk.conversation.ReactionInputView$2.onTouch + 161(ReactionInputView.java:161)
at android.view.View.dispatchTouchEvent + 12228(View.java:12228)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3075(ViewGroup.java:3075)
at android.view.ViewGroup.dispatchTouchEvent + 2720(ViewGroup.java:2720)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3081(ViewGroup.java:3081)
at android.view.ViewGroup.dispatchTouchEvent + 2734(ViewGroup.java:2734)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3081(ViewGroup.java:3081)
at android.view.ViewGroup.dispatchTouchEvent + 2734(ViewGroup.java:2734)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3081(ViewGroup.java:3081)
at android.view.ViewGroup.dispatchTouchEvent + 2734(ViewGroup.java:2734)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3081(ViewGroup.java:3081)
at android.view.ViewGroup.dispatchTouchEvent + 2734(ViewGroup.java:2734)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3081(ViewGroup.java:3081)
at android.view.ViewGroup.dispatchTouchEvent + 2734(ViewGroup.java:2734)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3081(ViewGroup.java:3081)
at android.view.ViewGroup.dispatchTouchEvent + 2734(ViewGroup.java:2734)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3081(ViewGroup.java:3081)
at android.view.ViewGroup.dispatchTouchEvent + 2734(ViewGroup.java:2734)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3081(ViewGroup.java:3081)
at android.view.ViewGroup.dispatchTouchEvent + 2734(ViewGroup.java:2734)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3081(ViewGroup.java:3081)
at android.view.ViewGroup.dispatchTouchEvent + 2734(ViewGroup.java:2734)
at com.android.internal.policy.DecorView.superDispatchTouchEvent + 450(DecorView.java:450)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent + 1829(PhoneWindow.java:1829)
at android.app.Activity.dispatchTouchEvent + 3336(Activity.java:3336)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent + 69(WindowCallbackWrapper.java:69)
at com.android.internal.policy.DecorView.dispatchTouchEvent + 412(DecorView.java:412)
at android.view.View.dispatchPointerEvent + 12480(View.java:12480)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent + 4986(ViewRootImpl.java:4986)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess + 4796(ViewRootImpl.java:4796)
at android.view.ViewRootImpl$InputStage.deliver + 4328(ViewRootImpl.java:4328)
at android.view.ViewRootImpl$InputStage.onDeliverToNext + 4381(ViewRootImpl.java:4381)
at android.view.ViewRootImpl$InputStage.forward + 4347(ViewRootImpl.java:4347)
at android.view.ViewRootImpl$AsyncInputStage.forward + 4474(ViewRootImpl.java:4474)
at android.view.ViewRootImpl$InputStage.apply + 4355(ViewRootImpl.java:4355)
at android.view.ViewRootImpl$AsyncInputStage.apply + 4531(ViewRootImpl.java:4531)
at android.view.ViewRootImpl$InputStage.deliver + 4328(ViewRootImpl.java:4328)
at android.view.ViewRootImpl$InputStage.onDeliverToNext + 4381(ViewRootImpl.java:4381)
at android.view.ViewRootImpl$InputStage.forward + 4347(ViewRootImpl.java:4347)
at android.view.ViewRootImpl$InputStage.apply + 4355(ViewRootImpl.java:4355)
at android.view.ViewRootImpl$InputStage.deliver + 4328(ViewRootImpl.java:4328)
at android.view.ViewRootImpl.deliverInputEvent + 6911(ViewRootImpl.java:6911)
at android.view.ViewRootImpl.doProcessInputEvents + 6885(ViewRootImpl.java:6885)
at android.view.ViewRootImpl.enqueueInputEvent + 6842(ViewRootImpl.java:6842)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent + 7022(ViewRootImpl.java:7022)
at android.view.InputEventReceiver.dispatchInputEvent + 186(InputEventReceiver.java:186)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(InputEventReceiver.java)
at android.view.InputEventReceiver.consumeBatchedInputEvents + 177(InputEventReceiver.java:177)
at android.view.ViewRootImpl.doConsumeBatchedInput + 6989(ViewRootImpl.java:6989)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run + 7045(ViewRootImpl.java:7045)
at android.view.Choreographer$CallbackRecord.run + 921(Choreographer.java:921)
at android.view.Choreographer.doCallbacks + 729(Choreographer.java:729)
at android.view.Choreographer.doFrame + 658(Choreographer.java:658)
at android.view.Choreographer$FrameDisplayEventReceiver.run + 907(Choreographer.java:907)
at android.os.Handler.handleCallback + 790(Handler.java:790)
at android.os.Handler.dispatchMessage + 99(Handler.java:99)
at android.os.Looper.loop + 164(Looper.java:164)
at android.app.ActivityThread.main + 6524(ActivityThread.java:6524)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 451(RuntimeInit.java:451)
at com.android.internal.os.ZygoteInit.main + 888(ZygoteInit.java:888)

Hey @kassim - Can I ask you to write into our Intercom messenger or email us at team@intercom.io, so we can add a little more context to investigate this a little bit more closely? It will also be a better way for us to keep you in the loop, if this takes a deeper dive. Feel free to link to this post in your message! Thanks!