You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
App crashes when I attempt to remove (after first adding) several instances of Caption/Description fields.
Steps to reproduce
choose image to upload in Commons app
on step 1 of 4: Media Details click in + button several times to add more Caption/Description fields
click on X button several times to remove Captions/Descriptions added in previous step
Expected behaviour
extra Captions/Descriptions fields should be removed all the way until we're back on only one instance Caption/Description field.
Actual behaviour
app crashes
Device name
Samsung Galaxy S23+
Android version
Android 14 (OneUI 6.1)
Commons app version
5.0.1~af028cbdd (latest F-droid)
Device logs
FATAL EXCEPTION: main
Process: fr.free.nrw.commons, PID: 15984
java.lang.IndexOutOfBoundsException: Index 5 out of bounds for length 5
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 fr.free.nrw.commons.upload.UploadMediaDetailAdapter.removeDescription(UploadMediaDetailAdapter.java:195)
at fr.free.nrw.commons.upload.UploadMediaDetailAdapter$ViewHolder.lambda$bind$5(UploadMediaDetailAdapter.java:300)
at fr.free.nrw.commons.upload.UploadMediaDetailAdapter$ViewHolder.$r8$lambda$icSYp6LLQKJERqNSGIAA-LSzeUk(UploadMediaDetailAdapter.java:0)
at fr.free.nrw.commons.upload.UploadMediaDetailAdapter$ViewHolder$$ExternalSyntheticLambda5.onClick(R8$$SyntheticClass:0)
at android.view.View.performClick(View.java:8047)
at android.view.View.performClickInternal(View.java:8024)
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$PerformClick.run(View.java:31890)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
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)
Summary
App crashes when I attempt to remove (after first adding) several instances of Caption/Description fields.
Steps to reproduce
1 of 4: Media Details
click in+
button several times to add more Caption/Description fieldsX
button several times to remove Captions/Descriptions added in previous stepExpected behaviour
extra Captions/Descriptions fields should be removed all the way until we're back on only one instance Caption/Description field.
Actual behaviour
app crashes
Device name
Samsung Galaxy S23+
Android version
Android 14 (OneUI 6.1)
Commons app version
5.0.1~af028cbdd (latest F-droid)
Device logs
Screen-shots
small_Screen_Recording_20240511_221232_Commons.mp4
Would you like to work on the issue?
None
The text was updated successfully, but these errors were encountered: