CoreTelephony error (not reproducible)

These failures occur only in production.

Crashed Thread
0   
libobjc.A.dylib 0x000000019843fbd0 objc_msgSend + 16
1   
CoreTelephony 0x00000001886bac5c _ZL25_ServerConnectionCallbackP20__CTServerConnectionPK10__CFStringPK14__CFDictionaryPv + 48
2   
CoreTelephony 0x00000001886d1030 ___ZNK13CTServerState21sendNotification_syncE7CTEventPK10__CFStringPK14__CFDictionary_block_invoke14 + 28
3   
libdispatch.dylib 0x0000000198a713ac _dispatch_call_block_and_release + 20
4   
libdispatch.dylib 0x0000000198a7136c _dispatch_client_callout + 12
5   
libdispatch.dylib 0x0000000198a7b4c0 _dispatch_queue_drain + 1212
6   
libdispatch.dylib 0x0000000198a74474 _dispatch_queue_invoke + 128
7   
libdispatch.dylib 0x0000000198a7d224 _dispatch_root_queue_drain + 660
8   
libdispatch.dylib 0x0000000198a7e75c _dispatch_worker_thread3 + 104
9   
libsystem_pthread.dylib 0x0000000198c4d2e4 _pthread_wqthread + 812
10  
libsystem_pthread.dylib 0x0000000198c4cfa8 start_wqthread + 0

this one too

Crashed Thread
0   
libobjc.A.dylib 0x306e1f46 objc_msgSend + 6
1   
CoreTelephony 0x2291fc95 ___ZNK13CTServerState21sendNotification_syncE7CTEventPK10__CFStringPK14__CFDictionary_block_invoke14 + 14
2   
libdispatch.dylib 0x30c662e3 _dispatch_call_block_and_release + 8
3   
libdispatch.dylib 0x30c6e729 _dispatch_queue_drain + 1466
4   
libdispatch.dylib 0x30c68aad _dispatch_queue_invoke + 82
5   
libdispatch.dylib 0x30c6ff9f _dispatch_root_queue_drain + 392
6   
libdispatch.dylib 0x30c713c3 _dispatch_worker_thread3 + 92
7   
libsystem_pthread.dylib 0x30dcddc1 _pthread_wqthread + 666
8   
libsystem_pthread.dylib 0x30dcdb14 start_wqthread + 6

I guess from the magazines that this only happens some time after the device sleeps. since the timestamp between the failure log and the last activity is at least 10 minutes. we ourselves do not use coretelophony, but some of the structures we use have cortetology as an addiction. who knows how to do this, or knows how to get around this?

+4
source share
1 answer

This error occurs when CTTelephonyNetworkInfo receives notifications after its release. Instead, you should use:

   static CTTelephonyNetworkInfo *netInfo; static dispatch_once_t dispatchToken; if (!netInfo) { dispatch_once(&dispatchToken, ^{ netInfo = [[CTTelephonyNetworkInfo alloc] init]; }); }

, , " iOS, CTTelephonyNetworkInfo , . , , , ".

+1

Source: https://habr.com/ru/post/1616148/


All Articles