CTTelephonyNetworkInfo Crash

You help me find this is what causes the collapse:



Incident Identifier: 00405757-86DC-4865-AA40-A20EF38552F8

CrashReporter Key: c4cc132c3fc3c8975a7d1baff8102eef4c338403

Hardware Model: iPhone6,2

Process: Data Usage [2839]

Path: /private/var/mobile/Containers/Bundle/Application/DDF96797-0E73-4232-9DE8-A68F746C2DDC/Data Usage.app/Data Usage

Identifier: com.app136.Data-Usage

Version: 2.7.2 (2.7.0)

Code Type: ARM-64 (Native)

Parent Process: launchd [1]



Date/Time: 2015-12-10 10:43:21.402 +0800

Launch Time: 2015-12-09 14:40:29.504 +0800

OS Version: iOS 8.4.1 (12H321)

Report Version: 105



Exception Type: EXC_BAD_ACCESS (SIGSEGV)

Exception Subtype: KERN_INVALID_ADDRESS at 0x00000001544cbeb8

Triggered by Thread: 15



Thread 15 name:

Thread 15 Crashed:

0 libobjc.A.dylib 0x00000001955efbd0 objc_msgSend + 16 (objc-msg-arm64.s:96)

1 CoreTelephony 0x000000018431a328 _ServerConnectionCallback(__CTServerConnection*, __CFString const*, __CFDictionary const*, void*) + 48 (CTTelephonyNetworkInfo.mm:125)

2 CoreTelephony 0x000000018433093c ___ZNK13CTServerState21sendNotification_syncE7CTEventPK10__CFStringPK14__CFDictionary_block_invoke14 + 28 (DispatchObjects.h:143)

3 libdispatch.dylib 0x0000000195c59990 _dispatch_call_block_and_release + 20 (init.c:731)

4 libdispatch.dylib 0x0000000195c59950 _dispatch_client_callout + 12 (object.m:489)

5 libdispatch.dylib 0x0000000195c640a0 _dispatch_queue_drain + 1444 (inline_internal.h:954)

6 libdispatch.dylib 0x0000000195c5ca58 _dispatch_queue_invoke + 128 (queue.c:3566)

7 libdispatch.dylib 0x0000000195c66314 _dispatch_root_queue_drain + 716 (inline_internal.h:934)

8 libdispatch.dylib 0x0000000195c67c48 _dispatch_worker_thread3 + 104 (atomic_llsc.h:4869)

9 libsystem_pthread.dylib 0x0000000195e39218 _pthread_wqthread + 812 (pthread.c:1941)

10 libsystem_pthread.dylib 0x0000000195e38edc start_wqthread + 0 (pthread_asm.s:181)






my code:



code1:



self.info = [[CTTelephonyNetworkInfo alloc] init];

if (self.info) {

self.info.subscriberCellularProviderDidUpdateNotifier = ^(CTCarrier* carrier) {

dispatch_async(dispatch_get_main_queue(), ^{

[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(checkSIM) object:nil];

[self performSelector:@selector(checkSIM) withObject:nil afterDelay:1.0];

//NSLog(@"Notifier -- checkSIM");

// [self checkSIM];

});

};

}



code2:



int MCC = 0;

int MNC = 0;



CTTelephonyNetworkInfo* telephonyNetworkInfo = [[[CTTelephonyNetworkInfo alloc] init] autorelease];

if (telephonyNetworkInfo && [telephonyNetworkInfo subscriberCellularProvider]) {

MCC = [[[telephonyNetworkInfo subscriberCellularProvider] mobileCountryCode] intValue];

MNC = [[[telephonyNetworkInfo subscriberCellularProvider] mobileNetworkCode] intValue];

}

same issue!

same issue!

Probably not. I’m replying here to post a link to your thread because it includes an Apple crash report and that sheds some light on your specific issue.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
CTTelephonyNetworkInfo Crash
 
 
Q