-
Notifications
You must be signed in to change notification settings - Fork 3
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 ITMGeolocationManager crash #97
Fix ITMGeolocationManager crash #97
Conversation
|
Thank you for submitting this bug fix PR. If the crash was happening due to updates to To be entirely safe, the code that reads from |
The crash is because |
mobile-sdk/src/main/java/com/github/itwin/mobilesdk/ITMGeolocationManager.kt
Outdated
Show resolved
Hide resolved
Thanks. Your updated fix looks good, aside from the one comment I left regarding indentation. If there is a reason I'm not understanding for that change, let me know. Otherwise, commit a fix. This repository is configured to clear approval reviews after every commit, so I'll wait for your response before approving. |
Problem:
A crash may occur in
ITMGeolocationManager
(in our app - for loop inupdateWatchers
).Solution:
watchIds
isn't read/written to in the same coroutine scope inclearWatch
as in other cases in the file. AddedmainScope.launch { ... }
toclearWatch
. After this change I couldn't reproduce the issue.