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

fix(android): Avoid ConcurrentModificationException #1297

Merged
merged 6 commits into from Oct 8, 2022

Conversation

spydon
Copy link
Member

@spydon spydon commented Oct 3, 2022

Description

When playing a lot of sounds simultaneously apparently some users get ConcurrentModificationException in this for loop.
The best solution would be to be able to use a ConcurrentHashMap, but I don't know how to do that in here.

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs:, chore: etc).
  • I have read the Contributor Guide and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation and added dartdoc comments with ///, where necessary.
  • I have updated/added relevant examples in example.

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

Related Issues

Closes #1274

@Gustl22
Copy link
Collaborator

Gustl22 commented Oct 4, 2022

I'll have a look later this week :)

@spydon
Copy link
Member Author

spydon commented Oct 4, 2022

I'll have a look later this week :)

None of my tried things worked so not much to have a look at yet 😅

@spydon spydon closed this Oct 7, 2022
@Gustl22 Gustl22 reopened this Oct 8, 2022
@Gustl22 Gustl22 changed the title fix: Avoid ConcurrentModificationException fix(android): Avoid ConcurrentModificationException Oct 8, 2022
@Gustl22
Copy link
Collaborator

Gustl22 commented Oct 8, 2022

@spydon I reproduced the issue reliably and with the ConcurrentMap it was fixed. Only the declaration was missing :)

@spydon
Copy link
Member Author

spydon commented Oct 8, 2022

@spydon I reproduced the issue reliably and with the ConcurrentMap it was fixed. Only the declaration was missing :)

That's awesome to hear!

@spydon spydon merged commit d15ef5a into main Oct 8, 2022
@spydon spydon deleted the spydon/fix-concurrent-modification branch October 8, 2022 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash on Android Error: java.util.ConcurrentModificationException
2 participants