Skip to content
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

Possible fix for issue 261 and issue 234. #262

Closed
wants to merge 2 commits into from

Conversation

dgatwood
Copy link

@dgatwood dgatwood commented May 8, 2015

Basic changes:

  1. Consolidated the socket cleanup path so that each location does everything.
  2. Switched from using the self pointer (which might in weird circumstances get nil'ed out while the code is running) to using the queue itself in setspecific/getspecific in an attempt to fix Crash in MPWebSocket.m:1277 (call to assertOnWorkQueue) #261.
  3. Significantly reduced the number of places where the self-referencing pointer is set to nil, to ensure that it doesn't happen until any code that depends on "self" has finished.

Thus far, with these changes, I haven't seen the weird crashes in #234 (_MPRunLoopThread main crash in CFSocketEnableCallBacks/_spin_lock). However, the bug was nondeterministic, so this isn't guaranteed to fix the problem.

David Gatwood added 2 commits May 8, 2015 14:22
* Simplified the logic for releasing the web socket object's
  self reference.
* Consolidated and standardized the cleanup code.
@samgreen
Copy link
Contributor

This is resolved with #302 and will be out with the next release.

@samgreen samgreen closed this Jul 28, 2015
gmorning pushed a commit to gmorning/mixpanel-iphone that referenced this pull request Apr 28, 2020
sdk to set user and device id fields on events and people updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash in MPWebSocket.m:1277 (call to assertOnWorkQueue)
3 participants