Skip to content

Fix ConcurrentModificationException in UpgradeAnswerControls#20343

Merged
BrayanDSO merged 1 commit intoankidroid:mainfrom
lukstbit:fix_concurrentPreferencesUpgrade
Feb 20, 2026
Merged

Fix ConcurrentModificationException in UpgradeAnswerControls#20343
BrayanDSO merged 1 commit intoankidroid:mainfrom
lukstbit:fix_concurrentPreferencesUpgrade

Conversation

@lukstbit
Copy link
Member

Purpose / Description

Add a new copy list to be modified in the problematic forEach loop in UpgradeAnswerControls.

Fixes

How Has This Been Tested?

Ran tests, verified the reproduction behavior:

Checkout and run a commit before UpgradeAnswerControls was introduced -> Add a new Question & answer key -> Checkout and run the latest code

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@lukstbit lukstbit added Needs Review Review High Priority Request for high priority review labels Feb 20, 2026
@BrayanDSO BrayanDSO added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Feb 20, 2026
@BrayanDSO BrayanDSO added this pull request to the merge queue Feb 20, 2026
@BrayanDSO BrayanDSO added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Feb 20, 2026
@BrayanDSO
Copy link
Member

gonna release a new alpha to test this

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 20, 2026
@BrayanDSO BrayanDSO merged commit 221783e into ankidroid:main Feb 20, 2026
19 checks passed
@github-actions github-actions bot added this to the 2.24 release milestone Feb 20, 2026
@github-actions github-actions bot removed Review High Priority Request for high priority review Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) labels Feb 20, 2026
Copy link
Member

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concurrent Modification is a classic, and keeping an original list copy is a classic solution

I'm on the late show reviewing but this looks good - thanks @lukstbit and @BrayanDSO - and I see the new alpha7 just was marked as accepted + available in the store so even the affected alpha users prior to me halting rollout should now get this fix and have the app startup correctly

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

alpha6 crash on open

3 participants

Comments