-
Notifications
You must be signed in to change notification settings - Fork 22
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
Crash in Gist.invalidateTimer
#839
Comments
Thanks for reporting! It seems like we won't be able to reproduce the issue which makes it difficult to look into. Can you elaborate on how often does this happen? % of unique users or sessions? This would help us prioritize looking into the issue and it would definitely help if you are able to reproduce the issue and let us know when it happens. |
This issue crashes a small percentage – about 1/10th of a percent – of all sessions. I have not reproduced the issue locally, however it seems potentially easy to put up a speculative fix where you only interact with this timer from a single thread, regardless of what thread your code was called from. Working with mutable state across multiple queues is not a best practice, and is likely the cause of this crash. |
Thanks for providing more info! We have created a ticket on our backlog to look into adding a preventive fix for the issue. |
SDK version: 3.5.0 (though I believe also 3.6.0 – haven't shipped with that yet)
Environment: Production
Are logs available?
No. But we do have a crash log:
No other threads are working within Gist or other CustomerIO code. Note that we're calling
identify(userId:traits:)
from a queue other than main.Describe the bug
A crash sometimes occurs when a timer is invalidated within CustomerIO.
To Reproduce
Unknown. We're seeing a few of these crashes in the wild in recent-ish builds.
Expected behavior
CustomerIO does not crash
Screenshots
N/A
Additional context
I see the following code in
Gist.swift
:It looks like we're invalidating the timer on a queue other than main. We probably want to only talk to the timer on main...
The text was updated successfully, but these errors were encountered: