Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in timeline: sublist #4959

Closed
bmarty opened this issue Jan 17, 2022 · 1 comment
Closed

Crash in timeline: sublist #4959

bmarty opened this issue Jan 17, 2022 · 1 comment
Assignees
Labels
A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems Z-Crash

Comments

@bmarty
Copy link
Member

bmarty commented Jan 17, 2022

The crash is at line is https://github.com/vector-im/element-android/blob/main/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/TimelineEventController.kt#L195, and there is another occurrence of sublist in this file.

Maybe some missing synchronized and maybe make the code more robust when using sublist (check the list size)

Reported by the PlayStore:

java.lang.IndexOutOfBoundsException: 
  at java.util.ArrayList.subListRangeCheck (ArrayList.java:1016)
  at java.util.ArrayList.subList (ArrayList.java:1008)
  at im.vector.app.features.home.room.detail.timeline.TimelineEventController$listUpdateCallback$1.onChanged (TimelineEventController.kt:9)
  at androidx.recyclerview.widget.BatchingListUpdateCallback.dispatchLastEvent (BatchingListUpdateCallback.java:2)
  at androidx.recyclerview.widget.BatchingListUpdateCallback.onRemoved (BatchingListUpdateCallback.java:4)
  at androidx.recyclerview.widget.DiffUtil$DiffResult.dispatchUpdatesTo (DiffUtil.java:19)
  at im.vector.app.features.home.room.detail.timeline.TimelineEventController.submitSnapshot$lambda-1 (TimelineEventController.kt:5)
  at im.vector.app.features.home.room.detail.timeline.TimelineEventController.$r8$lambda$3TTrlC1CKqzF1pipfR2kqQsG6m8 (Unknown Source)

and rageshakes:
https://github.com/matrix-org/element-android-rageshakes/issues/31789

Thread: Timeline_Building_Thread, Exception: java.lang.IndexOutOfBoundsException: toIndex = 100
at java.util.ArrayList.subListRangeCheck(ArrayList.java:1016)
at java.util.ArrayList.subList(ArrayList.java:1008)
at im.vector.app.features.home.room.detail.timeline.TimelineEventController$listUpdateCallback$1.onChanged(TimelineEventController.kt:9)
at androidx.recyclerview.widget.BatchingListUpdateCallback.dispatchLastEvent(BatchingListUpdateCallback.java:2)
at androidx.recyclerview.widget.BatchingListUpdateCallback.onRemoved(BatchingListUpdateCallback.java:4)
at androidx.recyclerview.widget.DiffUtil$DiffResult.dispatchUpdatesTo(DiffUtil.java:19)
at im.vector.app.features.home.room.detail.timeline.TimelineEventController.submitSnapshot$lambda-1(TimelineEventController.kt:5)
at im.vector.app.features.home.room.detail.timeline.TimelineEventController.$r8$lambda$3TTrlC1CKqzF1pipfR2kqQsG6m8(Unknown Source:0)
@bmarty bmarty added O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems Z-Crash A-Timeline labels Jan 17, 2022
@bmarty
Copy link
Member Author

bmarty commented Jan 19, 2022

Fixed in 1.3.15

@bmarty bmarty closed this as completed Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems Z-Crash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants