You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per my understanding(please correct me if I'm wrong), outputStream could be accessed on:
Any thread that is trying to call cleanupStream() to release it, which could be in disconnectStream and deinit.
writeQueue: for writing data
So if we are releasing outputStream(could be on any thread) and happens to be writing outStream(on writeQueue) at the same time, then there would be a race condition?
We are seeing intermittent crashes(Starscream 3.0.5) as mentioned in #588, looks like memory corruption by threading issue.
The text was updated successfully, but these errors were encountered:
The writeQueue(OperationQueue) is accessing outputStream on an arbitrary thread while outputStream is being released on another thread, as mentioned in issue description.
The system is trying to call stream delegate methods on FoundationStream object on FoundationStream.sharedWorkQueue, while we are releasing WebSocket and FoundationStream objects on any thread(probably due to reconnect)
@fassko Possible fix could be a combination of 2 steps:
Set writeQueue.underlyingQueue = FoundationStream.sharedWorkQueue, to resolve issue 1
Always release FoundationStream object on FoundationStream.sharedWorkQueue
Per my understanding(please correct me if I'm wrong), outputStream could be accessed on:
So if we are releasing outputStream(could be on any thread) and happens to be writing outStream(on writeQueue) at the same time, then there would be a race condition?
We are seeing intermittent crashes(Starscream 3.0.5) as mentioned in #588, looks like memory corruption by threading issue.
The text was updated successfully, but these errors were encountered: