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 ConcurrentModificationException on BackgroundDetectionObserver #6469

Merged

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Jul 5, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Fix crash

Thread: main, Exception: java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:757)
at java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:780)
at org.matrix.android.sdk.internal.util.DefaultBackgroundDetectionObserver.onStart(BackgroundDetectionObserver.kt:63)
at androidx.lifecycle.FullLifecycleObserverAdapter.onStateChanged(FullLifecycleObserverAdapter.java:39)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:354)
at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:265)

See https://github.com/matrix-org/element-android-rageshakes/issues/40142

Motivation and context

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@bmarty bmarty requested review from ouchadam and ganfra July 5, 2022 10:12
@ouchadam ouchadam added the Z-NextRelease For issues and PRs which should be included in the NextRelease. label Jul 5, 2022
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 5, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@ouchadam ouchadam merged commit 4126e64 into develop Jul 7, 2022
@ouchadam ouchadam deleted the feature/bma/fix_crash_on_DefaultBackgroundDetectionObserver branch July 7, 2022 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-NextRelease For issues and PRs which should be included in the NextRelease.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants