Crash when sending http/https request on iOS root process (jailbroken device) - ios

I'm trying to access some url (any URL) and it failed from iOS root process (running on Jailbroken device)
I Creating an application which running SockPuppet Exploit (iOS 12.0)
After exploitation, the app responsible to running another process on root privileges
The new process responsible to access url
On any URL I tried to, I'm getting a crash.
Here is my code:
NSURL *url = [NSURL URLWithString:#"https://jsonplaceholder.typicode.com/todos/1"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[url standardizedURL]];
[request setHTTPMethod:#"GET"];
[request setValue:#"application/x-www-form-urlencoded; charset=utf-8" forHTTPHeaderField:#"Content-Type"];
NSURLSessionDataTask *sessionPostDataTask = [[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (data == nil)
{
return;
}
NSLog(#"data: %#", data);
}];
[sessionPostDataTask resume];
Crash Info:
OS Version: iPhone OS 12.0 (16A366)
Baseband Version: 3.00.01
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 1
Application Specific Information:
abort() called
Last Exception Backtrace:
0 CoreFoundation 0x220e4bef8 __exceptionPreprocess + 228
1 libobjc.A.dylib 0x220019a40 objc_exception_throw + 55
2 CoreFoundation 0x220dc185c _CFThrowFormattedException + 111
3 CoreFoundation 0x220d30e20 -[__NSArrayM insertObject:atIndex:] + 1211
4 Foundation 0x2217c6480 -[NSUserDefaults+ 25728 (NSUserDefaults) init] + 255
5 Foundation 0x2217c6338 +[NSUserDefaults+ 25400 (NSUserDefaults) standardUserDefaults] + 83
6 UIFoundation 0x22b45f8a0 attributeDictionaryHash + 367
7 Foundation 0x2218a7324 hashProbe + 71
8 Foundation 0x2217c4e34 -[NSConcreteHashTable getItem:] + 39
9 UIFoundation 0x22b40a868 +[NSAttributeDictionary newWithDictionary:] + 135
10 UIFoundation 0x22b45f678 +[NSAttributeDictionary initialize] + 899
11 libobjc.A.dylib 0x220015024 CALLING_SOME_+initialize_METHOD + 23
12 libobjc.A.dylib 0x22001af84 _class_initialize + 295
13 libobjc.A.dylib 0x2200248f8 lookUpImpOrForward + 279
14 libobjc.A.dylib 0x220031098 _objc_msgSend_uncached + 55
15 Foundation 0x2217eff0c -[NSConcreteMutableAttributedString replaceCharactersInRange:withString:] + 419
16 Foundation 0x22180caf8 -[NSConcreteMutableAttributedString initWithString:] + 267
17 liblog_network.dylib 0x24abb6bb8 NWOLCopyFormattedStringIPv4Address + 379
18 liblog_network.dylib 0x24abb6a20 OSLogCopyFormattedString + 195
19 libsystem_trace.dylib 0x220a7fac4 _os_log_fmt_compose_annotated + 703
20 libsystem_trace.dylib 0x220a7f250 os_log_fmt_compose + 883
21 libsystem_trace.dylib 0x220a84c0c _os_log_impl_flatten_and_send + 3163
22 libsystem_trace.dylib 0x220a868ec os_log_pack_compose + 83
23 libnetwork.dylib 0x221ff3b88 -[NWConcrete_nw_address_endpoint createDescription:] + 315
24 libnetwork.dylib 0x221ff5130 -[NWConcrete_nw_endpoint getDescription] + 83
25 libnetwork.dylib 0x221f809c8 nw_endpoint_resolver_update + 5511
26 libnetwork.dylib 0x221e8c020 __nw_resolver_update_client_block_invoke + 103
27 libdispatch.dylib 0x2208836c8 _dispatch_call_block_and_release + 23
28 libdispatch.dylib 0x220884484 _dispatch_client_callout + 15
29 libdispatch.dylib 0x22082db9c _dispatch_workloop_invoke$VARIANT$mp + 2311
30 libdispatch.dylib 0x220834f00 _dispatch_workloop_worker_thread + 599
31 libsystem_pthread.dylib 0x220a660f0 _pthread_wqthread + 311
32 libsystem_pthread.dylib 0x220a68d00 start_wqthread + 3
Thread 1 name: Dispatch queue: com.apple.network.connections
Thread 1 Crashed:
0 libsystem_kernel.dylib 0x00000002209e1104 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000220a5c0e0 pthread_kill$VARIANT$mp + 380
2 libsystem_c.dylib 0x0000000220938d78 abort + 140
3 libc++abi.dylib 0x0000000220000f78 __cxa_bad_cast + 0
4 libc++abi.dylib 0x0000000220001120 default_unexpected_handler+ 8480 () + 0
5 libobjc.A.dylib 0x0000000220019e48 _objc_terminate+ 28232 () + 124
6 libc++abi.dylib 0x000000022000d0fc std::__terminate(void (*)+ 57596 ()) + 16
7 libc++abi.dylib 0x000000022000d188 std::terminate+ 57736 () + 84
8 libsystem_trace.dylib 0x0000000220a7fc54 _os_log_fmt_compose_annotated + 1104
9 libsystem_trace.dylib 0x0000000220a7f250 os_log_fmt_compose + 884
10 libsystem_trace.dylib 0x0000000220a84c0c _os_log_impl_flatten_and_send + 3164
11 libsystem_trace.dylib 0x0000000220a868ec os_log_pack_compose + 84
12 libnetwork.dylib 0x0000000221ff3b88 -[NWConcrete_nw_address_endpoint createDescription:] + 316
13 libnetwork.dylib 0x0000000221ff5130 -[NWConcrete_nw_endpoint getDescription] + 84
14 libnetwork.dylib 0x0000000221f809c8 nw_endpoint_resolver_update + 5512
15 libnetwork.dylib 0x0000000221e8c020 __nw_resolver_update_client_block_invoke + 104
16 libdispatch.dylib 0x00000002208836c8 _dispatch_call_block_and_release + 24
17 libdispatch.dylib 0x0000000220884484 _dispatch_client_callout + 16
18 libdispatch.dylib 0x000000022082db9c _dispatch_workloop_invoke$VARIANT$mp + 2312
19 libdispatch.dylib 0x0000000220834f00 _dispatch_workloop_worker_thread + 600
20 libsystem_pthread.dylib 0x0000000220a660f0 _pthread_wqthread + 312
21 libsystem_pthread.dylib 0x0000000220a68d00 start_wqthread + 4

Related

Can anyone help me with the crash? (React Native)

The app crashed when I just stay in it for over 1 hour. I did not do anything else beside staying in it. I have no idea what this log is trying to tell me so if anyone can help me I would appreciate it a lot.
This is the crash log
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 29
Last Exception Backtrace:
0 CoreFoundation 0x1856a186c __exceptionPreprocess + 220 (NSException.m:199)
1 libobjc.A.dylib 0x19a6bcc50 objc_exception_throw + 60 (objc-exception.mm:565)
2 unikapp 0x1002f52ac RCTFatal + 668 (RCTAssert.m:146)
3 unikapp 0x100374e7c -[RCTExceptionsManager reportFatal:stack:exceptionId:suppressRedBox:] + 504 (RCTExceptionsManager.mm:78)
4 unikapp 0x1003758d0 -[RCTExceptionsManager reportException:] + 1532 (RCTExceptionsManager.mm:148)
5 CoreFoundation 0x1856a68f4 __invoking___ + 148
6 CoreFoundation 0x18557ddf8 -[NSInvocation invoke] + 448 (NSForwarding.m:3389)
7 CoreFoundation 0x18557e3cc -[NSInvocation invokeWithTarget:] + 80 (NSForwarding.m:3495)
8 unikapp 0x10032780c -[RCTModuleMethod invokeWithBridge:module:arguments:] + 460 (RCTModuleMethod.mm:584)
9 unikapp 0x100329e18 facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&, int, (anonymous namespace)::SchedulingContext) + 540 (RCTNativeModule.mm:183)
10 unikapp 0x100329a48 operator() + 68 (RCTNativeModule.mm:104)
11 unikapp 0x100329a48 invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 112 (RCTNativeModule.mm:95)
12 libdispatch.dylib 0x18529424c _dispatch_call_block_and_release + 32 (init.c:1454)
13 libdispatch.dylib 0x185295db0 _dispatch_client_callout + 20 (object.m:559)
14 libdispatch.dylib 0x18529d10c _dispatch_lane_serial_drain + 580 (inline_internal.h:2548)
15 libdispatch.dylib 0x18529dc5c _dispatch_lane_invoke + 408 (queue.c:3862)
16 libdispatch.dylib 0x1852a7d78 _dispatch_workloop_worker_thread + 708 (queue.c:6601)
17 libsystem_pthread.dylib 0x1d1151814 _pthread_wqthread + 276 (pthread.c:2211)
18 libsystem_pthread.dylib 0x1d115876c start_wqthread + 8
Thread 29 Crashed:
0 libsystem_kernel.dylib 0x00000001b35f6414 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001d1150b50 pthread_kill + 272 (pthread.c:1392)
2 libsystem_c.dylib 0x000000018eacfb74 abort + 104 (abort.c:110)
3 libc++abi.dylib 0x000000019a7c2cf8 abort_message + 132 (abort_message.cpp:76)
4 libc++abi.dylib 0x000000019a7b3e4c demangling_terminate_handler() + 308 (cxa_default_handlers.cpp:67)
5 libobjc.A.dylib 0x000000019a6bcf64 _objc_terminate() + 144 (objc-exception.mm:701)
6 libc++abi.dylib 0x000000019a7c20e0 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
7 libc++abi.dylib 0x000000019a7c206c std::terminate() + 44 (cxa_handlers.cpp:88)
8 libdispatch.dylib 0x0000000185295dc4 _dispatch_client_callout + 40 (object.m:562)
9 libdispatch.dylib 0x000000018529d10c _dispatch_lane_serial_drain + 580 (inline_internal.h:2548)
10 libdispatch.dylib 0x000000018529dc5c _dispatch_lane_invoke + 408 (queue.c:3862)
11 libdispatch.dylib 0x00000001852a7d78 _dispatch_workloop_worker_thread + 708 (queue.c:6601)
12 libsystem_pthread.dylib 0x00000001d1151814 _pthread_wqthread + 276 (pthread.c:2211)
13 libsystem_pthread.dylib 0x00000001d115876c start_wqthread + 8

Crashed: NSOperationQueue 0x11f10ac10 (QOS: UNSPECIFIED) SIGABRT ABORT 0x00000001b5efe84c

I'm getting a crash, reported in Crashlytics, and I have no idea how to reproduce the error, It happens randomly so it's hard to debug it with Xcode. Any ideas?
Crashed: NSOperationQueue 0x11f10ac10 (QOS: UNSPECIFIED)
0 libsystem_kernel.dylib 0x1b5efe84c __pthread_kill + 8
1 libsystem_pthread.dylib 0x1d211a9e8 pthread_kill + 212
2 libsystem_c.dylib 0x1934bd8f4 abort + 100
3 libsystem_malloc.dylib 0x199b73030 _malloc_put + 554
4 libsystem_malloc.dylib 0x199b732a4 malloc_zone_error + 100
5 libsystem_malloc.dylib 0x199b732e0 nanov2_allocate_from_block$VARIANT$mp.cold.1 + 36
6 libsystem_malloc.dylib 0x199b58498 nanov2_find_block_and_allocate$VARIANT$mp + 510
7 libsystem_malloc.dylib 0x199b57710 nanov2_allocate$VARIANT$mp + 124
8 libsystem_malloc.dylib 0x199b57644 nanov2_malloc$VARIANT$mp + 60
9 libsystem_malloc.dylib 0x199b689ac _malloc_zone_malloc + 144
10 CoreFoundation 0x18a6b7c14 -[__NSArrayM insertObject:atIndex:] + 264
11 CoreFoundation 0x18a756fdc __CFSetApplyFunction_block_invoke + 24
12 CoreFoundation 0x18a7f86f0 CFBasicHashApply + 136
13 CoreFoundation 0x18a756f9c CFSetApplyFunction + 192
14 CoreFoundation 0x18a747e50 CFRunLoopCopyAllModes + 136
15 CoreFoundation 0x18a74c4ec __CFRunLoopSourceRemoveFromRunLoop + 64
16 CoreFoundation 0x18a6ebab4 __CFBagApplyFunction_block_invoke + 48
17 CoreFoundation 0x18a7f86f0 CFBasicHashApply + 136
18 CoreFoundation 0x18a6eba5c CFBagApplyFunction + 84
19 CoreFoundation 0x18a74c450 CFRunLoopSourceInvalidate + 208
20 Realm 0x102993634 realm::util::EventLoopSignal<realm::_impl::WeakRealmNotifier::Callback>::~EventLoopSignal() + 24
21 Realm 0x102888c70 realm::_impl::RealmCoordinator::unregister_realm(realm::Realm*) + 388
22 Realm 0x10295a858 realm::Realm::~Realm() + 40
23 Realm 0x10284c210 std::__1::shared_ptr<realm::_impl::CollectionNotifier>::~shared_ptr() + 64
24 libobjc.A.dylib 0x19eb37ae0 object_cxxDestructFromClass(objc_object*, objc_class*) + 112
25 libobjc.A.dylib 0x19eb4d8a4 objc_destructInstance + 88
26 libobjc.A.dylib 0x19eb546ec _objc_rootDealloc + 52
27 Realm 0x10292bcac -[RLMRealm dealloc] + 92
28 libobjc.A.dylib 0x19eb57574 AutoreleasePoolPage::releaseUntil(objc_object**) + 200
29 libobjc.A.dylib 0x19eb57450 objc_autoreleasePoolPop + 208
30 libswiftObjectiveC.dylib 0x1aea1bf4c autoreleasepool<A>(invoking:) + 68
31 Foresight 0x100eaad74 specialized BloodPressureDataManager.getUnSyncedReadings(getHistoricData:fromAppleHealth:) + 441 (BloodPressure.swift:441)
32 Foresight 0x100fccd14 specialized CloudDataManager.syncAllVitalData(withType:syncHistoricalData:fromAppleHealth:_:) + 408 (VitalDataManager.swift:408)
33 Foresight 0x100dba408 SyncAllVitalOperation.main() + 4310885384 (<compiler-generated>:4310885384)
34 Foresight 0x100dba560 #objc SyncAllVitalOperation.main() + 4310885728 (<compiler-generated>:4310885728)
35 Foresight 0x101340af4 #objc SynchronizationOperation.start() + 4316678900 (<compiler-generated>:4316678900)
36 Foundation 0x18ba84f98 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 20
37 Foundation 0x18ba84a64 __NSOQSchedule_f + 180
38 libdispatch.dylib 0x18a3b775c _dispatch_block_async_invoke2 + 104
39 libdispatch.dylib 0x18a408280 _dispatch_client_callout + 16
40 libdispatch.dylib 0x18a3ad390 _dispatch_continuation_pop$VARIANT$mp + 412
41 libdispatch.dylib 0x18a3acad4 _dispatch_async_redirect_invoke + 596
42 libdispatch.dylib 0x18a3b9f3c _dispatch_root_queue_drain + 376
43 libdispatch.dylib 0x18a3ba704 _dispatch_worker_thread2 + 124
44 libsystem_pthread.dylib 0x1d211b568 _pthread_wqthread + 212
45 libsystem_pthread.dylib 0x1d211e874 start_wqthread + 8
Please help me how to reproduce and debug this type of crash and What i need to check in my code related to crash.

iOS 10 AVPlayer crash when dealloc

I got a crash when using AVPlayer to play a remote audio. The App crash on main thread. The crash log is below:
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001806a7014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x000000018076f450 pthread_kill + 112
2 libsystem_c.dylib 0x000000018061b49c __abort + 144
3 libsystem_c.dylib 0x000000018061b40c __abort + 0
4 libc++abi.dylib 0x00000001800e52d4 __cxa_bad_cast + 0
5 libc++abi.dylib 0x0000000180102cc0 default_unexpected_handler+ 126144 () + 0
6 libobjc.A.dylib 0x0000000180110844 _objc_terminate+ 34884 () + 124
7 FanXing 0x0000000103712edc 0x10007c000 + 57241308
8 libc++abi.dylib 0x00000001800ff66c std::__terminate(void (*)+ 112236 ()) + 16
9 libc++abi.dylib 0x00000001800ff234 __cxa_rethrow + 144
10 libobjc.A.dylib 0x000000018011071c objc_exception_rethrow + 44
11 Foundation 0x0000000182154644 NSKVODeallocate + 380
12 CoreFoundation 0x00000001816ca36c -[__NSSingleObjectArrayI dealloc] + 44
13 AVFoundation 0x0000000188e166b0 -[AVPlayer dealloc] + 696
14 libsystem_blocks.dylib 0x00000001805b7a28 _Block_release + 144
15 libdispatch.dylib 0x00000001805621bc _dispatch_client_callout + 16
16 libdispatch.dylib 0x0000000180566d68 _dispatch_main_queue_callback_4CF + 1000
17 CoreFoundation 0x0000000181686810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
18 CoreFoundation 0x00000001816843fc __CFRunLoopRun + 1660
19 CoreFoundation 0x00000001815b22b8 CFRunLoopRunSpecific + 444
20 GraphicsServices 0x0000000183066198 GSEventRunModal + 180
21 UIKit 0x00000001875f97fc -[UIApplication _run] + 684
22 UIKit 0x00000001875f4534 UIApplicationMain + 208
23 FanXing 0x00000001004c248c 0x10007c000 + 4482188
24 libdyld.dylib 0x00000001805955b8 start + 4

How to solve "SpringBoard quit unexpected" issues on iOS with Xamarin?

How to resolve "SpringBoard quit unexpected" issues?
I don't use Test Cloud, would anyone be able to explain in detail what is happening?
Process: SpringBoard [7365] Path:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/CoreServices/SpringBoard.app/SpringBoard
Identifier: SpringBoard Version: 1.0 (50) Code Type: X86 (Native)
Parent Process: launchd_sim [7247] Responsible: launchd_sim [7247]
User ID: 501
Date/Time: 2015-07-12 18:27:14.767 +0700 OS Version: Mac OS X 10.10.4
(14E46) Report Version: 11 Anonymous UUID:
4F86C8E2-284F-6FD5-30D3-E2519C6D5409
Time Awake Since Boot: 36000 seconds
Crashed Thread: 8 Dispatch queue:
com.apple.frontboard.applicationLibrary.taskQueue
Exception Type: EXC_CRASH (SIGABRT) Exception Codes:
0x0000000000000000, 0x0000000000000000
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application is required.'
terminating with uncaught exception of type NSException abort() called
CoreSimulator 110.4 - Device: iPhone 4s - Runtime: iOS 8.1 (12B411) -
DeviceType: iPhone 4s
Application Specific Backtrace 1: 0 CoreFoundation 0x0821c946
exceptionPreprocess + 182 1 libobjc.A.dylib 0x07cffa97
objc_exception_throw + 44 2 CoreFoundation 0x0821c7da +[NSException
raise:format:arguments:] + 138 3 Foundation 0x04059810
-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 118 4
FrontBoard 0x01d09b66 __47-[FBApplicationLibrary
applicationsDidInstall:]block_invoke_2 + 335 5 FrontBoard 0x01d0998f
__47-[FBApplicationLibrary applicationsDidInstall:]_block_invoke + 1784 6 libdispatch.dylib 0x087f303f _dispatch_client_callout + 14 7
libdispatch.dylib 0x087dadb8 _dispatch_barrier_sync_f_invoke + 79 8
libdispatch.dylib 0x087da8ea dispatch_barrier_sync_f + 105 9
libdispatch.dylib 0x087dae40 dispatch_barrier_sync + 54 10 FrontBoard
0x01d091ca -[FBApplicationLibrary applicationsDidInstall:] + 292 11
MobileCoreServices 0x060e5ce9 -[LSApplicationWorkspaceRemoteObserver
applicationsDidInstall:] + 233 12 CoreFoundation 0x080ff76d __invoking
+ 29 13 CoreFoundation 0x080ff618 -[NSInvocation invoke] + 360 14 Foundation 0x041913fd
NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT + 30 15 Foundation
0x0401f568 -[NSXPCConnection _decodeAndInvokeMessageWithData:] + 1881
16 Foundation 0x0401bbb5 message_handler + 721 17 Foundation
0x0401b8cd __51-[NSXPCConnection
initWithMachServiceName:options:]_block_invoke + 20 18 libxpc.dylib
0x08ac1973 _xpc_connection_call_event_handler + 65 19 libxpc.dylib
0x08ac1779 _xpc_connection_mach_event + 2278 20 libdispatch.dylib
0x087f3121 _dispatch_client_callout4 + 37 21 libdispatch.dylib
0x087e35a9 _dispatch_mach_msg_invoke + 318 22 libdispatch.dylib
0x087dbc1b _dispatch_queue_drain + 527 23 libdispatch.dylib 0x087e3ab7
_dispatch_mach_invoke + 225 24 libdispatch.dylib 0x087dbc1b _dispatch_queue_drain + 527 25 libdispatch.dylib 0x087db8ac _dispatch_queue_invoke + 197 26 libdispatch.dylib 0x087dd9e7 _dispatch_root_queue_drain + 367 27 libdispatch.dylib 0x087de985 _dispatch_worker_thread3 + 108 28 libsystem_pthread.dylib 0x08b491da _pthread_wqthread + 724 29 libsystem_pthread.dylib 0x08b46e2e start_wqthread + 30
Thread 0:: Dispatch queue: com.apple.main-thread 0
libsystem_kernel.dylib 0x08b169ce mach_msg_trap + 10 1
libsystem_kernel.dylib 0x08b15a70 mach_msg + 68 2
com.apple.CoreFoundation 0x08136026 __CFRunLoopServiceMachPort + 214 3
com.apple.CoreFoundation 0x08135408 __CFRunLoopRun + 1400 4
com.apple.CoreFoundation 0x08134bcb CFRunLoopRunSpecific + 443 5
com.apple.CoreFoundation 0x081349fb CFRunLoopRunInMode + 123 6
com.apple.GraphicsServices 0x043ef24f GSEventRunModal + 192 7
com.apple.GraphicsServices 0x043ef08c GSEventRun + 104 8
com.apple.UIKit 0x0096d8b6 UIApplicationMain + 1526 9
com.apple.springboard 0x0007e4b0 0x76000 + 33968 10 libdyld.dylib
0x08819ac9 start + 1
Thread 1:: Dispatch queue: com.apple.libdispatch-manager 0
libsystem_kernel.dylib 0x08b1d8ce kevent64 + 10 1 libdispatch.dylib
0x087e23be _dispatch_mgr_invoke + 245 2 libdispatch.dylib 0x087e2116
_dispatch_mgr_thread + 60
Thread 2: 0 libsystem_kernel.dylib 0x08b169ce mach_msg_trap + 10 1
libsystem_kernel.dylib 0x08b15a70 mach_msg + 68 2
com.apple.CoreFoundation 0x08136026 CFRunLoopServiceMachPort + 214 3
com.apple.CoreFoundation 0x08135408 __CFRunLoopRun + 1400 4
com.apple.CoreFoundation 0x08134bcb CFRunLoopRunSpecific + 443 5
com.apple.CoreFoundation 0x081349fb CFRunLoopRunInMode + 123 6
com.apple.Foundation 0x03fecd98 -[NSRunLoop(NSRunLoop)
runMode:beforeDate:] + 309 7 com.apple.Foundation 0x0408c67b
-[NSRunLoop(NSRunLoop) run] + 82 8 com.apple.UIKit 0x00ea982b -[UIStatusBarServerThread main] + 796 9 com.apple.Foundation 0x03feae60 __NSThread__main + 1326 10 libsystem_pthread.dylib
0x08b48e13 _pthread_body + 138 11 libsystem_pthread.dylib 0x08b48d89
_pthread_start + 162 12 libsystem_pthread.dylib 0x08b46e52 thread_start + 34
Thread 3: 0 libsystem_kernel.dylib 0x08b169ce mach_msg_trap + 10 1
libsystem_kernel.dylib 0x08b15a70 mach_msg + 68 2
com.apple.CoreFoundation 0x08136026 __CFRunLoopServiceMachPort + 214 3
com.apple.CoreFoundation 0x08135408 __CFRunLoopRun + 1400 4
com.apple.CoreFoundation 0x08134bcb CFRunLoopRunSpecific + 443 5
com.apple.CoreFoundation 0x081349fb CFRunLoopRunInMode + 123 6
com.apple.springboard 0x000f5592 0x76000 + 521618 7
libsystem_pthread.dylib 0x08b48e13 _pthread_body + 138 8
libsystem_pthread.dylib 0x08b48d89 _pthread_start + 162 9
libsystem_pthread.dylib 0x08b46e52 thread_start + 34xamarin.
I'm finding it impossible to solve.

VectorKit crash reports with MKMapSnapshotter on iOS

I'm getting different kind of crash reports related to VectorKit and MKMapSnapShotter. Crashes occur pretty random, but it seems like they happen most when returning from the background. The device does not send out any memory warnings before it happens.
What's happening here?
I'm using:
if (!_snapshotQueue) {
_snapshotQueue = dispatch_queue_create("com.bestappever.snapshot", DISPATCH_QUEUE_SERIAL);
}
[_snapshotter cancel]
_snapshotter = [[MKMapSnapshotter alloc] initWithOptions:options];
__weak __typeof(self)__self = self;
[_snapshotter startWithQueue:queue completionHandler:^(MKMapSnapshot *snapshot, NSError *error) {
dispatch_async(dispatch_get_main_queue(), ^{
__strong __typeof(__self)_self = __self;
[_self doSomething];
});
}];
The most common one is as follows:
Thread 11 Crashed:
0 libobjc.A.dylib 0x38502b66 objc_msgSend + 5
1 VectorKit 0x35bc8997 -[VKTileProvider changeTileForKey:toState:withMetadata:withTile:forLayer:] + 51
2 VectorKit 0x35c1f88d -[VKTileProvider tileSource:invalidateKeys:] + 168
3 VectorKit 0x35c41325 -[VKTileSource didFailToLoadTileKey:error:] + 196
4 GeoServices 0x32ca906b ___ZN8LoadItem15deleteRequesterEP8NSStringbb_block_invoke + 87
5 libdispatch.dylib 0x389ec0c3 _dispatch_call_block_and_release + 11
6 libdispatch.dylib 0x389f0e7b _dispatch_queue_drain + 375
7 libdispatch.dylib 0x389edf93 _dispatch_queue_invoke + 43
8 libdispatch.dylib 0x389f1745 _dispatch_root_queue_drain + 77
9 libdispatch.dylib 0x389f19c5 _dispatch_worker_thread2 + 57
10 libsystem_pthread.dylib 0x38b1bdff _pthread_wqthread + 298
11 libsystem_pthread.dylib 0x38b1bcc4 start_wqthread + 8
Some other examples:
Thread 11 Crashed:
0 libobjc.A.dylib 0x3850a7aa lookUpImpOrForward + 94
1 libobjc.A.dylib 0x3850302b _class_lookupMethodAndLoadCache3 + 35
2 libobjc.A.dylib 0x38502df9 _objc_msgSend_uncached + 25
3 VectorKit 0x35bc8997 -[VKTileProvider changeTileForKey:toState:withMetadata:withTile:forLayer:] + 50
4 VectorKit 0x35bc895d -[VKTileProvider tileSource:didFetchTile:forKey:] + 60
5 VectorKit 0x35bc8915 -[VKTileSource fetchedTile:forKey:] + 44
6 VectorKit 0x35bc9a95 -[VKTileSetBackedTileSource fetchedTile:forKey:] + 212
7 VectorKit 0x35bc889d -[VKTileSource _fetchedTile:] + 224
8 VectorKit 0x35bc8409 __49-[VKTileSource decodeData:downloadKey:sourceKey:]_block_invoke_3 + 109
9 libdispatch.dylib 0x389ec0c3 _dispatch_call_block_and_release + 11
10 libdispatch.dylib 0x389f0e7b _dispatch_queue_drain + 375
11 libdispatch.dylib 0x389edf93 _dispatch_queue_invoke + 43
12 libdispatch.dylib 0x389f1745 _dispatch_root_queue_drain + 77
13 libdispatch.dylib 0x389f19c5 _dispatch_worker_thread2 + 57
14 libsystem_pthread.dylib 0x38b1bdff _pthread_wqthread + 298
15 libsystem_pthread.dylib 0x38b1bcc4 start_wqthread + 8
Thread 6 Crashed:
0 libsystem_kernel.dylib 0x390a41fc __pthread_kill + 8
1 libsystem_c.dylib 0x39054ffd abort + 76
2 Ding Dong 0x00090de7 uncaught_exception_handler + 27
3 CoreFoundation 0x2e6a524f __handleUncaughtException + 579
4 libobjc.A.dylib 0x38ae590f _objc_terminate() + 175
5 libc++abi.dylib 0x3839a1c7 std::__terminate(void (*)()) + 79
6 libc++abi.dylib 0x38399a1d __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 1
7 libobjc.A.dylib 0x38ae5783 objc_exception_throw + 250
8 CoreFoundation 0x2e6a88e7 -[NSObject doesNotRecognizeSelector:] + 202
9 CoreFoundation 0x2e6a71cb ___forwarding___ + 707
10 CoreFoundation 0x2e5f64d8 _CF_forwarding_prep_0 + 24
11 VectorKit 0x36077cb9 -[VKTileProvider tileSource:keyIsNeeded:] + 68
12 VectorKit 0x36077c2b -[VKTileSource _shouldDecodeTile:] + 178
13 VectorKit 0x36077a91 -[VKTileSource didFetchData:forKey:] + 108
14 GeoServices 0x3319a087 ___ZNK49-[GEOTileLoaderInternal _loadedTile:forKey:info:]66__49-[GEOTileLoaderInternal _loadedTile:forKey:info:]_block_invoke3$_1clERKN8LoadItem9RequesterE_block_invoke_2 + 55
15 libdispatch.dylib 0x38fc8d1b _dispatch_call_block_and_release + 11
16 libdispatch.dylib 0x38fcf273 _dispatch_queue_drain$VARIANT$mp + 375
17 libdispatch.dylib 0x38fcf06b _dispatch_queue_invoke$VARIANT$mp + 43
18 libdispatch.dylib 0x38fcfce1 _dispatch_root_queue_drain + 77
19 libdispatch.dylib 0x38fcff59 _dispatch_worker_thread2 + 57
20 libsystem_pthread.dylib 0x3910adbf _pthread_wqthread + 298
21 libsystem_pthread.dylib 0x3910ac84 start_wqthread + 8
Thread 16 Crashed:
0 VectorKit 0x35a36476 std::__1::__hash_iterator<std::__1::__hash_node<std::__1::pair<VKTileKey, void const*>, void*>*> std::__1::__hash_table<std::__1::pair<VKTileKey, void const*>, std::__1::__unordered_map_hasher<VKTileKey, void const*, hashkey, true>, std::__1::__unordered_map_equal<VKTileKey, void const*, eqkey, true>, vk_allocator<std::__1::pair<VKTileKey, void const*> > >::find<VKTileKey>(VKTileKey const&) + 54
1 VectorKit 0x35a3642d -[VKTileKeyMap objectForKey:] + 24
2 VectorKit 0x35a3a837 -[VKTileKeyList containsKey:] + 34
3 VectorKit 0x35a54b9f -[VKTileProvider tileMatters:] + 78
4 VectorKit 0x35a549c1 -[VKTileProvider changeTileForKey:toState:withMetadata:withTile:forLayer:] + 92
5 VectorKit 0x35a5495d -[VKTileProvider tileSource:didFetchTile:forKey:] + 60
6 VectorKit 0x35a54915 -[VKTileSource fetchedTile:forKey:] + 44
7 VectorKit 0x35a5489d -[VKTileSource _fetchedTile:] + 224
8 VectorKit 0x35a54409 __49-[VKTileSource decodeData:downloadKey:sourceKey:]_block_invoke_3 + 109
9 libdispatch.dylib 0x388780c3 _dispatch_call_block_and_release + 11
10 libdispatch.dylib 0x3887ce7b _dispatch_queue_drain + 375
11 libdispatch.dylib 0x38879f93 _dispatch_queue_invoke + 43
12 libdispatch.dylib 0x3887d745 _dispatch_root_queue_drain + 77
13 libdispatch.dylib 0x3887d9c5 _dispatch_worker_thread2 + 57
14 libsystem_pthread.dylib 0x389a7dff _pthread_wqthread + 298
15 libsystem_pthread.dylib 0x389a7cc4 start_wqthread + 8
How repeatable is this? Is the device coming out of sleep mode? What is on the screen when the App goes into the background?
Within the ViewController you can try registering the NSNotification event, UIApplicationWillResignActiveNotification
When the App is going into the background, calling cancel on any MKMapSnapshotter
If that doesn't work, you could attempt more drastic measures, like hiding views, just to identify if they are related to the crash.
I had the same issue with frequent but random crashes ususally looking like:
VectorKit 0x10663fe9 -[VKTileProvider tileSource:didFetchTile:forKey:] + 105
I fixed it by removing this line:
this.mapSnapshotter.Cancel();
So I think Apple has a bug with the MKMapSnapshotter Cancel method.
Hope that's helpful

Resources