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

Crash in [ARTRealtime transitionSideEffects:] (508) #624

Closed
andreiChis70 opened this issue Aug 1, 2017 · 4 comments
Closed

Crash in [ARTRealtime transitionSideEffects:] (508) #624

andreiChis70 opened this issue Aug 1, 2017 · 4 comments

Comments

@andreiChis70
Copy link

andreiChis70 commented Aug 1, 2017

Ably v1.0.6
*** Collection <ARTRealtimeChannels: 0x17403f1c0> was mutated while being enumerated.
-[ARTRealtime transitionSideEffects:]

The problem is that I cannot reproduce it.

Fatal Exception: NSGenericException
0 CoreFoundation 0x1909a2fe0 __exceptionPreprocess
1 libobjc.A.dylib 0x18f404538 objc_exception_throw
2 CoreFoundation 0x1909a2a30 -[NSException name]
3 Ably 0x1001f0d80 -[ARTRealtime transitionSideEffects:] (ARTRealtime.m:508)
4 Ably 0x1001ef950 __40-[ARTRealtime transition:withErrorInfo:]_block_invoke (ARTRealtime.m:328)
5 Ably 0x1001de66c __artDispatchSync_block_invoke.21 (ARTGCD.m:88)
6 libdispatch.dylib 0x18f85a9a0 _dispatch_client_callout
7 libdispatch.dylib 0x18f867ee0 _dispatch_barrier_sync_f_invoke
8 Ably 0x1001de3b8 artDispatchSync (ARTGCD.m:99)
9 Ably 0x1001ef6b8 -[ARTRealtime transition:withErrorInfo:] (ARTRealtime.m:334)
10 Ably 0x1001f2cf8 -[ARTRealtime onError:] (ARTRealtime.m:672)
11 Ably 0x1001f80b0 -[ARTRealtime realtimeTransport:didReceiveMessage:] (ARTRealtime.m:1175)
12 Ably 0x100220680 -[ARTWebSocketTransport receive:] (ARTWebSocketTransport.m:94)
13 Ably 0x10022072c -[ARTWebSocketTransport receiveWithData:] (ARTWebSocketTransport.m:101)
14 Ably 0x1002227cc __46-[ARTWebSocketTransport webSocketMessageData:]_block_invoke (ARTWebSocketTransport.m:370)
15 libdispatch.dylib 0x18f85a9e0 _dispatch_call_block_and_release
16 libdispatch.dylib 0x18f85a9a0 _dispatch_client_callout
17 libdispatch.dylib 0x18f868ad4 _dispatch_queue_serial_drain
18 libdispatch.dylib 0x18f85e2cc _dispatch_queue_invoke
19 libdispatch.dylib 0x18f86aa50 _dispatch_root_queue_drain
20 libdispatch.dylib 0x18f86a7d0 _dispatch_worker_thread3
21 libsystem_pthread.dylib 0x18fa63100 _pthread_wqthread
22 libsystem_pthread.dylib 0x18fa62cac start_wqthread

@tcard
Copy link
Contributor

tcard commented Aug 1, 2017

Thanks for the report @andreiChis70. This looks to me like a thread-safety issue, as the ARTRealtimeChannels collection is being mutated (ie. a channel is created or released) in a thread while being iterated in another thread. Luckily, we're in the process of making the whole library thread-safe. The next release will fix this and other related issues.

@andreiChis70
Copy link
Author

I'm lucky :)
Looking forward to the next release.

@tcard
Copy link
Contributor

tcard commented Nov 3, 2017

@andreiChis70 Can you confirm this is fixed? The thread-safe release was made a while ago. Sorry, should've updated this issue then.

@andreiChis70
Copy link
Author

@tcard Yes it is fixed. Thank you!

@tcard tcard closed this as completed Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants