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

SRWebSocket crashes #348

Closed
jphribovsek opened this issue Sep 12, 2014 · 4 comments
Closed

SRWebSocket crashes #348

jphribovsek opened this issue Sep 12, 2014 · 4 comments
Labels
Milestone

Comments

@jphribovsek
Copy link

We have quite a lot of those crash reports:

Thread : Crashed: com.apple.root.default-overcommit-priority
0  libsystem_kernel.dylib         0x3aa711f0 __pthread_kill + 8
1  libsystem_pthread.dylib        0x3aad97b7 pthread_kill + 58
2  libsystem_c.dylib              0x3aa21ff9 abort + 76
3  libc++abi.dylib                0x39e7098f abort_message + 74
4  libc++abi.dylib                0x39e886f3 __cxa_pure_virtual + 18
5  CFNetwork                      0x2f4d0447 CoreStreamBase::_streamSetEventAndScheduleDelivery(unsigned long, unsigned char) + 114
6  CFNetwork                      0x2f4d02f7 CoreStreamBase::_streamInterface_SignalEvent(unsigned long, CFStreamError const*) + 34
7  CFNetwork                      0x2f4cfd2f SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*) + 142
8  CFNetwork                      0x2f4cfc6b SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 58
9  CoreFoundation                 0x2f8b0189 __CFSocketPerformV0 + 580
10 CoreFoundation                 0x2f8adfaf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
11 CoreFoundation                 0x2f8ad477 __CFRunLoopDoSources0 + 206
12 CoreFoundation                 0x2f8abc67 __CFRunLoopRun + 630
13 CoreFoundation                 0x2f816729 CFRunLoopRunSpecific + 524
14 CoreFoundation                 0x2f81650b CFRunLoopRunInMode + 106
15 Foundation                     0x3020a497 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 254
16 xxxxxxxxxx                     0x00b2cabd -[_SRRunLoopThread main] (SRWebSocket.m:1785)
17 Foundation                     0x302cca0f __NSThread__main__ + 1062
18 libsystem_pthread.dylib        0x3aad8959 _pthread_body + 140
19 libsystem_pthread.dylib        0x3aad88cb _pthread_start + 102
@jleandroperez
Copy link
Contributor

Hello JP,

Our patched SRWebSocket has only 1769 lines of code, while this crashlog says... line 1785!. Plus, the official repository has just 1739.

Would you please check if the sources for that file match with what's in the git repository?

Thanks!

@jleandroperez jleandroperez added this to the v0.7.0 milestone Sep 12, 2014
@jphribovsek
Copy link
Author

Hey Jorge,

Our live version is still using the SDK from June, SRWebsocket was edited on July 11, which would explain the line difference.

line 1785 corresponds to line 1756 in the latest version https://github.com/Simperium/simperium-ios/blob/develop/External/SocketRocket/SRWebSocket.m#L1756

Thanks!

@jphribovsek
Copy link
Author

Similar reports for SRWebSocket crashes:
http://stackoverflow.com/questions/22245057/socketrocket-runloop-sporadic-crash

@jleandroperez jleandroperez modified the milestones: v0.7.0, v0.7.1 Oct 6, 2014
@jleandroperez jleandroperez modified the milestones: v0.7.1, v0.7.2 Oct 21, 2014
@jleandroperez jleandroperez modified the milestones: v0.7.2, v0.7.3, v0.7.4, v0.7.5 Nov 17, 2014
@jleandroperez jleandroperez modified the milestones: v0.7.5, v0.7.6 Nov 28, 2014
@jleandroperez
Copy link
Contributor

@jphribovsek we've been unable to trigger this crash. However:

  • We've merged in the latest SRWebSocket changes, from the official repository.
  • Plus, we've implemented two extra failsafes: when the webSocket is closed, the streams are now immediately unscheduled from the network runloop.

If you're still seeing this around after this patch, please, feel free to reopen.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants