Android App 3.1.0.1 crashes when using "Text with multiple Values"

Hi,

We have an issue with the lastest android Captutre app (3.1.0.1) when using data elements of type “Text with multiple Values”.

The app always crashes when selecting multiple options in a tracker program with the version 3.1.0.1.

It seems the problem does not happen on 3.1.0 and I know that it was working fine on version 3.0.0.2.

I created a sample program on play environment:
https://play.im.dhis2.org/stable-2-41-2/api/29/programs/mm9WbV9Ob7i.json

It has a multiple value data elements and when trying to select multiple options, I have the following error:

java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 3
at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)

Please see below for the fullt details of erreor:
java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 3
at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
at java.util.Objects.checkIndex(Objects.java:359)
at java.util.ArrayList.get(ArrayList.java:434)
at org.dhis2.form.ui.provider.inputfield.MultiSelectionInputProviderKt.ProvideMultiSelectionInput$lambda$7$lambda$6(MultiSelectionInputProvider.kt:50)
at org.dhis2.form.ui.provider.inputfield.MultiSelectionInputProviderKt.$r8$lambda$zXl4jb6e5zZ7CjEBLOwpODE6BY0(Unknown Source:0)
at org.dhis2.form.ui.provider.inputfield.MultiSelectionInputProviderKt$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0)
at org.hisp.dhis.mobile.ui.designsystem.component.InputMultiSelectionKt$InputMultiSelection$1$4.invoke$lambda$3$lambda$2$lambda$1(InputMultiSelection.kt:158)
at org.hisp.dhis.mobile.ui.designsystem.component.InputMultiSelectionKt$InputMultiSelection$1$4.$r8$lambda$2-A1rbk-sJZHP6R2NhTck9ueAL4(Unknown Source:0)
at org.hisp.dhis.mobile.ui.designsystem.component.InputMultiSelectionKt$InputMultiSelection$1$4$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0)
at org.hisp.dhis.mobile.ui.designsystem.component.CheckBoxKt$CheckBox$2$1.invoke$lambda$1$lambda$0(CheckBox.kt:75)
at org.hisp.dhis.mobile.ui.designsystem.component.CheckBoxKt$CheckBox$2$1.$r8$lambda$Wy3l8f7Xf7B3OIRLdGY8MCTqD5A(Unknown Source:0)
at org.hisp.dhis.mobile.ui.designsystem.component.CheckBoxKt$CheckBox$2$1$$ExternalSyntheticLambda0.invoke(D8$$SyntheticClass:0)
at androidx.compose.material3.CheckboxKt$Checkbox$2$1.invoke(Checkbox.kt:99)
at androidx.compose.material3.CheckboxKt$Checkbox$2$1.invoke(Checkbox.kt:99)
at androidx.compose.foundation.ClickablePointerInputNode$pointerInput$3.invoke-k-4lQ0M(Clickable.kt:987)
at androidx.compose.foundation.ClickablePointerInputNode$pointerInput$3.invoke(Clickable.kt:981)
at androidx.compose.foundation.gestures.TapGestureDetectorKt$detectTapAndPress$2$1.invokeSuspend(TapGestureDetector.kt:255)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:175)
at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:164)
at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:470)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:504)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:493)
at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:364)
at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl$PointerEventHandlerCoroutine.offerPointerEvent(SuspendingPointerInputFilter.kt:665)
at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.dispatchPointerEvent(SuspendingPointerInputFilter.kt:544)
at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.onPointerEvent-H0pRuoY(SuspendingPointerInputFilter.kt:566)
at androidx.compose.foundation.AbstractClickablePointerInputNode.onPointerEvent-H0pRuoY(Clickable.kt:947)
at androidx.compose.foundation.AbstractClickableNode.onPointerEvent-H0pRuoY(Clickable.kt:795)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:317)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(HitPathTracker.kt:185)
at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(HitPathTracker.kt:104)
at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(PointerInputEventProcessor.kt:113)
at androidx.compose.ui.platform.AndroidComposeView.sendMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1576)
at androidx.compose.ui.platform.AndroidComposeView.handleMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1527)
at androidx.compose.ui.platform.AndroidComposeView.dispatchTouchEvent(AndroidComposeView.android.kt:1466)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3328)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2998)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:776)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1967)
at android.app.Activity.dispatchTouchEvent(Activity.java:4548)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:70)
at io.sentry.android.core.internal.gestures.WindowCallbackAdapter.dispatchTouchEvent(WindowCallbackAdapter.java:39)
at io.sentry.android.core.internal.gestures.SentryWindowCallback.dispatchTouchEvent(SentryWindowCallback.java:64)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:734)
at android.view.View.dispatchPointerEvent(View.java:16489)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:8602)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:8353)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7682)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7739)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7705)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7908)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7713)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7965)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7686)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7739)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7705)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7713)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7686)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:11250)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:11119)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:11075)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:11384)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:337)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loopOnce(Looper.java:187)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8919)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@9057879, androidx.compose.runtime.BroadcastFrameClock@89f59be, StandaloneCoroutine{Cancelling}@254a1f, AndroidUiDispatcher@f70316c]

Thanks in advance for your attention

I am not sure it is exactly the same thing but this issue seems very similar to this jira ticket already identified by the team:
[ANDROAPP-6715] Crash when selecting a checkbox option set - Jira

1 Like

Hi @gregory I believe it is indeed the same issue and a fix will be included for this upcoming patch.

You can track the progress there, thank you for your patience and sorry for the inconvenience!

Best wishes!

Xavier.

2 Likes

Thank you for sharing the link to the ticket. I’d like to share an update that this issue is fixed for version 3.1.1. Thank you!

Dear @Gassim

Thanks for the update. We are very happy to see that this will be fixed in version 3.1.1, and from what I understand from this page ( Android App – Tableau Agile - Jira, i see that another bug impacting us for large data sets will also be fixed in version 3.1.1.

Is there a way to know in advance the planned date for release of version 3.1.1?

I did not find the info on the roadmap page.

Thanks in advance and have a very good day

1 Like

Hi @gregory

The release is planned for the end of January.

2 Likes

Hi @nancyesp
Many thanks for this info which will help us to plan our deployment of this new version.

1 Like