-
Notifications
You must be signed in to change notification settings - Fork 166
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 under FoundationStream.cleanup() -> () (Starscream.swift) #173
Comments
Hey @shawnce do you have any more contextual info you can provide about the crash? For example:
|
|
@hamchapman our layer of code calling into PusherSwift, again we are currently only calling into the bind function after app login to attach them to one or more "projects" and only calling unbind on logout which almost is never done (and all crashes show them logged in at the time). https://gist.github.com/shawnce/63d701b6359fa98db986f0f9f2658bb5 |
@hamchapman we are continuing to see this crash |
FYI - we are disabling pusher given the crash rate we are seeing, if we find the time we may help with a patch |
Hey @shawnce that's understandable - apologies for the issue. Just wanted to let you know that I'm looking into this today. I started doing some groundwork to get things more stable and standardised yesterday with #175 I'll be sure to keep this updated if I find the cause. Equally, if you do have time to give to help debug then of course that's always massively appreciated! |
It looks as though this might be the cause of the issue: daltoniam/Starscream#476 I'm going to keep tracking that and see what comes of it. Will update here when I've got more info 👍 |
I am fairly sure you will want locking and/or shunting to a serial queue of your own... up higher in your code as wells since multiple thread can easily be involved in calling into your API. You will continue to have concurrent access/mutation to shared data otherwise which will crash in different ways. |
Yeah that's fair. I'll look into adding that extra layer of synchronisation later today. |
You should be able to try the This should have fixed this problem. Let me know if you're able to and what results you see 👍 I'm hoping to merge that PR and release 6.0.0 on Monday if all goes well. |
Hi, thanks very much for releasing a fix. Entirely understand if it's impossible, but wanted to verify there's no way to backport this fix to Edit: just noticed the |
What is the issue?
Recently added PusherSwift to our app replacing the older Objective-C library we had. We are seeing a number of users hitting the following crashes. It looks like in general the PusherSwift code doesn't have much in it to deal with concurrency despite having code calling into it from multiple queues / threads. I believe that could be playing into these crashes.
In my use of PusherSwift I am currently ensuring any and all calls I make into it are happening on the main thread given missing concurrency support in the code.
Is it a crash report? Submit stack traces or anything that you think would help
and
Any improvements you suggest
I believe the code needs to have stronger logic in place to deal with concurrency (shuttle things to a serial queue and/or locking).
CC @pusher/mobile
The text was updated successfully, but these errors were encountered: