Skip to content

Conversation

@crleona
Copy link
Collaborator

@crleona crleona commented Jul 25, 2024

Summary

I've been able to reproduce the crash mentioned in #498 with the following initialization:

let amp = Amplitude.instance(withName: "foo")
amp.initializeApiKey("...")
amp.logEvent("test")
DispatchQueue.global().async {
     while true {
          amp.setTrackingOptions(AMPTrackingOptions().disableLatLng())
     }
}    

It seems this is caused by concurrent access to tracking options, so I've marked the related variables as atomic.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: no

@crleona crleona merged commit 83465ed into main Jul 26, 2024
@crleona crleona deleted the AMP-105317-fix-trackingoptions-crash branch July 26, 2024 18:06
github-actions bot pushed a commit that referenced this pull request Aug 5, 2024
## [8.19.3](v8.19.2...v8.19.3) (2024-08-05)

### Bug Fixes

* mark trackingoptions as atomic to prevent issues from concurrent access ([#499](#499)) ([83465ed](83465ed))
@github-actions
Copy link

github-actions bot commented Aug 5, 2024

🎉 This PR is included in version 8.19.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants