-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
FoundationStream.cleanup() crashed with *** CFHash() called with NULL *** #422
Comments
Fixed was a poor choice of words. That issue only had a part of a backtrace and I was just guessing I fixed it because it was related to something I was working on. It didn't have anything useful to reproduce the error, but If you have a sample app or some code I could look at that would be helpful. Outside of that, I'm not sure what is happening as I there aren't any known issues with reconnecting. |
I'm also using Starscream 3.0.2 and encountered the same issue. |
We're also just starting to notice this. However, we're using v2.1.1. I can let you know that we're getting it in our "low-bandwidth" testing. And, whether it's write or wrong ( a recent change on our end) is that our app immediately calls |
Interesting observation, I'm also calling connect() immediately within the webSocketDidDisconnect delegate on the first error, and then it goes in the backoff-mode retry. |
3.0.3 has been released. It has some improvements/protections to help with this, but I'd make sure their aren't any race conditions when interacting with the WebSocket object. It is designed to have the public methods to be called from the same thread and that is normally what cases these crashes on cleanup. Also any sample code is greatly appreciated to help track down issues. |
I have some new information regarding this issue. So, to investigate further, I've tried to reproduce the crash. I've downloaded SimpleTest example and added following code to
It's the same code I was using in production with my app before adding delay. I enabled Edge profile in Network Link Conditioner to simulate "low-bandwidth" mode. Test scenario was to open the app, connect to websocket, send the message, get the reply, and then lock the phone, unlock and immediately click on Write Text bar button. Even though I was not able to reproduce the crash, I was able to freeze the app completely -- app would be stuck on waiting in some queue on main thread. Here is the screenshot. Then I added a small delay:
I somehow managed to reproduce the similar freeze, but only once, although I did try many, many times. This was the stack: Interestingly, I looked up what was happening in Thread 60: It appears that in method That would be all. |
I'm using Starscream (3.0.2).
Happens when user returns in the app from background after awhile and the websocket is trying to reconnect. I believe this is a continuance of this "fixed" error.
The text was updated successfully, but these errors were encountered: