iOS crash at CFAllocatedReferenceCountedObject - ios

My app frequently crashes with the following information:
0 CFNetwork CFAllocatedReferenceCountedObject::_retainable_hash(void const*)
1 CoreFoundation _CFBasicHashFindBucket + 164
2 CoreFoundation CFDictionaryGetValue + 224
3 CFNetwork TubeManager::_onqueue_enqueueRequestForProtocol(MetaConnectionCacheClient*, HTTPRequestMessage const*, MetaConnectionOptions, BaseAwaitingTube*) + 80
4 CFNetwork TubeManager::_onqueue_reenqueueAwaitingTube(BaseAwaitingTube*) + 112
5 CFNetwork ___ZN11TubeManager21_onqueue_newTubeReadyEP4Tube13CFStreamError_block_invoke + 28
6 CFNetwork ___ZNK18QCoreSchedulingSet12performAsyncEU13block_pointerFvvE_block_invoke + 52
7 libdispatch.dylib __dispatch_call_block_and_release + 24
8 libdispatch.dylib __dispatch_client_callout + 16
9 libdispatch.dylib __dispatch_queue_serial_drain$VARIANT$mp + 528
10 libdispatch.dylib __dispatch_queue_invoke$VARIANT$mp + 340
11 libdispatch.dylib __dispatch_queue_serial_drain$VARIANT$mp + 200
12 libdispatch.dylib __dispatch_queue_invoke$VARIANT$mp + 340
13 libdispatch.dylib __dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 404
14 libdispatch.dylib __dispatch_workloop_worker_thread$VARIANT$mp + 644
15 libsystem_pthread.dylib _pthread_wqthread + 932
The crash device informations:
Who know how could this happen and how to solve the problem?

Related

IOS test flight crashes on launch: RCTFatal + 668

React native version: 0.61.5
It cause random crash when app starts, it works with simulator, please help!
Last Exception Backtrace:
0 CoreFoundation 0x1b9036248 _exceptionPreprocess + 164 (NSException.m:202)
1 libobjc.A.dylib 0x1b23f7a68 objc_exception_throw + 60 (objc-exception.mm:356)
2 AppName 0x10238db70 RCTFatal + 668 (RCTAssert.m:146)
3 AppName 0x1023fe4f0 -[RCTExceptionsManager reportFatalException:stack:exceptionId:] + 496 (RCTExceptionsManager.mm:65)
4 CoreFoundation 0x1b90a0a14 invoking + 148 (:-1)
5 CoreFoundation 0x1b904cf2c -[NSInvocation invoke] + 428 (NSForwarding.m:3377)
6 CoreFoundation 0x1b904c944 -[NSInvocation invokeWithTarget:] + 64 (NSForwarding.m:3474)
7 AppName 0x1023bf0e0 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 460 (RCTModuleMethod.mm:569)
8 AppName 0x1023c1238 facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&) + 244 (RCTNativeModule.mm:108)
9 AppName 0x1023c0fa8 operator() + 44 (RCTNativeModule.mm:73)
10 AppName 0x1023c0fa8 invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 88 (RCTNativeModule.mm:65)
11 libdispatch.dylib 0x1c04b04b4 _dispatch_call_block_and_release + 32 (init.c:1518)
12 libdispatch.dylib 0x1c04b1fdc _dispatch_client_callout + 20 (object.m:560)
13 libdispatch.dylib 0x1c04b9694 _dispatch_lane_serial_drain + 672 (inline_internal.h:2632)
14 libdispatch.dylib 0x1c04ba1e0 _dispatch_lane_invoke + 384 (queue.c:3940)
15 libdispatch.dylib 0x1c04c4e10 _dispatch_workloop_worker_thread + 652 (queue.c:6846)
16 libsystem_pthread.dylib 0x205954df8 _pthread_wqthread + 288 (pthread.c:2618)
17 libsystem_pthread.dylib 0x205954b98 start_wqthread + 8 (:-1)
I have tried reset cache, removed ios/pods and did pod install,rebuild the project again but it didn't work.

CFNetwork.Connection crashed

My iOS app had a crash caused by CFNetwork. I cannot reproduce it. The app was running on iOS 12. I am using Alamofire to perform HTTP requests, but I don't think it was caused by Alamofire. Anyone has any idea?
Crashed: com.apple.CFNetwork.Connection
0 libsystem_kernel.dylib 0x1ba289104 __pthread_kill + 8
1 libsystem_pthread.dylib 0x1ba308a00 pthread_kill$VARIANT$armv81 + 296
2 libsystem_c.dylib 0x1ba1e0d78 abort + 140
3 libsystem_c.dylib 0x1ba1ae67c basename_r + 314
4 CFNetwork 0x1bae63478 invocation function for block in TCPIOConnection::_tlsValidateServerTrust(nw_tls_context*) + 346
5 CFNetwork 0x1bae614e0 TCPIOConnection::_handleTLSEvent(nw_tls_context*, tls_handshake_message_t, void () block_pointer, bool) + 720
6 libnetwork.dylib 0x1bb8716b0 __tcp_connection_set_tls_message_handler_on_nw_connection_block_invoke + 168
7 libboringssl.dylib 0x1bb5e505c __boringssl_context_issue_tls_handshake_callback_block_invoke + 188
8 libdispatch.dylib 0x1ba12b6c8 _dispatch_call_block_and_release + 24
9 libdispatch.dylib 0x1ba12c484 _dispatch_client_callout + 16
10 libdispatch.dylib 0x1ba106fb0 _dispatch_lane_serial_drain$VARIANT$armv81 + 548
11 libdispatch.dylib 0x1ba107b2c _dispatch_lane_invoke$VARIANT$armv81 + 468
12 libdispatch.dylib 0x1ba108d70 _dispatch_workloop_invoke$VARIANT$armv81 + 1892
13 libdispatch.dylib 0x1ba10ff14 _dispatch_workloop_worker_thread + 584
14 libsystem_pthread.dylib 0x1ba30e0f0 _pthread_wqthread + 312
15 libsystem_pthread.dylib 0x1ba310d00 start_wqthread + 4

Crash in CFNetwork CFAllocatedReferenceCountedObject::_retainable_hash(void const*)

Crash logs:
1 CRASH
1 USER
CFNetwork
CFAllocatedReferenceCountedObject::_retainable_hash(void const*)
Crashed: com.apple.CFNetwork.LoaderQ
0 CFNetwork 0x183985310 CFAllocatedReferenceCountedObject::_retainable_hash(void const*) + 26
1 CoreFoundation 0x18321e160 CFBasicHashFindBucket + 164
2 CoreFoundation 0x18321e0a0 CFDictionaryGetValue
+ 224
3 CFNetwork 0x1839b5a4c TubeManager::_onqueue_enqueueRequestForProtocol(MetaConnectionCacheClient*, HTTPRequestMessage const*, MetaConnectionOptions, BaseAwaitingTube*) + 80
4 CFNetwork 0x1839b69b4 TubeManager::_onqueue_reenqueueAwaitingTube(BaseAwaitingTube*) + 112
5 CFNetwork 0x1839b6c14 invocation function for block in TubeManager::_onqueue_newTubeReady(Tube*, CFStreamError) + 28
6 CFNetwork 0x183b152e4 invocation function for block in QCoreSchedulingSet::performAsync(void () block_pointer) const
+ 52
7 libdispatch.dylib 0x182cdea54 _dispatch_call_block_and_release + 24
8 libdispatch.dylib 0x182cdea14 _dispatch_client_callout + 16
9 libdispatch.dylib 0x182ce896c _dispatch_queue_serial_drain$VARIANT$mp + 528
10 libdispatch.dylib 0x182ce92fc
_dispatch_queue_invoke$VARIANT$mp + 340
11 libdispatch.dylib 0x182ce8824 _dispatch_queue_serial_drain$VARIANT$mp + 200
12 libdispatch.dylib 0x182ce92fc
_dispatch_queue_invoke$VARIANT$mp + 340
13 libdispatch.dylib 0x182ce9d20 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 404
14 libdispatch.dylib 0x182cf203c
_dispatch_workloop_worker_thread$VARIANT$mp + 644
15 libsystem_pthread.dylib 0x182f86f1c _pthread_wqthread + 932
16 libsystem_pthread.dylib 0x182f86b6c start_wqthread + 4
IOS versions:
11.2.6
11.2.2
11.2.1
Devices:
iPhone 6
iPhone 6S plus
iPad mini 2
Does somebody know why this error occurs and how to solve it?
Please help

CFNetwork is crashed in iOS 7

Application is crashed sometimes with such trace, I can't reproduce it.
Thread 16 Crashed:
0 libobjc.A.dylib 0x3b0f4b26 objc_msgSend + 6
1 CFNetwork 0x308d9491 -[__NSCFLocalSessionTask setConnection:] + 718
2 CFNetwork 0x30933c33 -[__NSCFLocalSessionBridge taskTerminating:] + 136
3 CFNetwork 0x30932945 __64-[__NSCFLocalSessionBridge initWithConfiguration:session:queue:]_block_invoke + 46
4 CFNetwork 0x30950b03 ___ZNK24ClassicConnectionSession28_connection_didFinishLoadingEP16_CFURLConnection_block_invoke + 96
5 libdispatch.dylib 0x3b5dcd1b _dispatch_call_block_and_release + 8
6 libdispatch.dylib 0x3b5e3273 _dispatch_queue_drain$VARIANT$mp + 372
7 libdispatch.dylib 0x3b5e306b _dispatch_queue_invoke$VARIANT$mp + 40
8 libdispatch.dylib 0x3b5e3ce1 _dispatch_root_queue_drain + 74
9 libdispatch.dylib 0x3b5e3f59 _dispatch_worker_thread2 + 54
10 libsystem_pthread.dylib 0x3b71edbf _pthread_wqthread + 296
11 libsystem_pthread.dylib 0x3b71ec84 start_wqthread + 6

Strange NSInternalInconsistencyException and PKService crash in iOS Today Extension

I installed Crashlytics on my iOS Today Extension, and I am getting this strange crash. Does anyone know why this might be happening?
Fatal Exception: NSInternalInconsistencyException
removing inactive plug-in com.somecompany.someapp.TodayExtension(1.0)>
The line that it is crashing on is
11 PlugInKit -[PKService unregisterPersonality:] + 188
In my today extension, in viewDidLoad, it will get the user's current location, and then make a network request to fetch data about that location. Is this happening because my operation is taking too long and iOS is killing my extension? I haven't been able to reproduce this, but I think what user's see is a blank space where the extension should be or it doesn't show anything but the title of the extension.
Thread : Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x0000000181cc2530 __exceptionPreprocess + 132
1 libobjc.A.dylib 0x0000000192c980e4 objc_exception_throw + 60
2 CoreFoundation 0x0000000181cc23f0 +[NSException raise:format:]
3 Foundation 0x0000000182b6dc34 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 112
4 PlugInKit 0x000000018d1c04a0 __35-[PKService unregisterPersonality:]_block_invoke + 488
5 libdispatch.dylib 0x00000001932e9954 _dispatch_client_callout + 16
6 libdispatch.dylib 0x00000001932f31e4 _dispatch_barrier_sync_f_invoke + 76
7 PlugInKit 0x000000018d1c024c -[PKService unregisterPersonality:] + 188
8 PlugInKit 0x000000018d1bdfec -[PKServicePersonality shutdownPlugIn] + 108
9 CoreFoundation 0x0000000181cc8350 __invoking___ + 144
10 CoreFoundation 0x0000000181bc621c -[NSInvocation invoke] + 296
11 Foundation 0x0000000182c9d33c __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT__ + 24
12 Foundation 0x0000000182b4b8c8 -[NSXPCConnection _decodeAndInvokeMessageWithData:] + 1604
13 Foundation 0x0000000182accbd4 message_handler + 708
14 libxpc.dylib 0x00000001934f0c78 _xpc_connection_call_event_handler + 68
15 libxpc.dylib 0x00000001934eeb7c _xpc_connection_mach_event + 2160
16 libdispatch.dylib 0x00000001932e9a28 _dispatch_client_callout4 + 16
17 libdispatch.dylib 0x00000001932ed140 _dispatch_mach_msg_invoke + 492
18 libdispatch.dylib 0x00000001932f42d4 _dispatch_queue_drain + 2008
19 libdispatch.dylib 0x00000001932ec668 _dispatch_mach_invoke + 136
20 libdispatch.dylib 0x00000001932f42d4 _dispatch_queue_drain + 2008
21 libdispatch.dylib 0x00000001932eca5c _dispatch_queue_invoke + 132
22 libdispatch.dylib 0x00000001932f6318 _dispatch_root_queue_drain + 720
23 libdispatch.dylib 0x00000001932f7c4c _dispatch_worker_thread3 + 108
24 libsystem_pthread.dylib 0x00000001934c922c _pthread_wqthread + 816
25 libsystem_pthread.dylib 0x00000001934c8ef0 start_wqthread + 4
Thread : Crashed: service sync
0 libsystem_kernel.dylib 0x000000019342f270 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001934cd170 pthread_kill + 112
2 libsystem_c.dylib 0x00000001933a6b18 abort + 112
3 libc++abi.dylib 0x0000000192465418 __cxa_bad_cast
4 libc++abi.dylib 0x0000000192484b8c default_unexpected_handler()
5 libobjc.A.dylib 0x0000000192c983c0 _objc_terminate() + 128
6 libc++abi.dylib 0x0000000192481bb4 std::__terminate(void (*)()) + 16
7 libc++abi.dylib 0x0000000192481c24 std::terminate() + 64
8 libobjc.A.dylib 0x0000000192c98318 _destroyAltHandlerList
9 libdispatch.dylib 0x00000001932e9968 _dispatch_client_callout + 36
10 libdispatch.dylib 0x00000001932f31e4 _dispatch_barrier_sync_f_invoke + 76
11 PlugInKit 0x000000018d1c024c -[PKService unregisterPersonality:] + 188
12 PlugInKit 0x000000018d1bdfec -[PKServicePersonality shutdownPlugIn] + 108
13 CoreFoundation 0x0000000181cc8350 __invoking___ + 144
14 CoreFoundation 0x0000000181bc621c -[NSInvocation invoke] + 296
15 Foundation 0x0000000182c9d33c __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT__ + 24
16 Foundation 0x0000000182b4b8c8 -[NSXPCConnection _decodeAndInvokeMessageWithData:] + 1604
17 Foundation 0x0000000182accbd4 message_handler + 708
18 libxpc.dylib 0x00000001934f0c78 _xpc_connection_call_event_handler + 68
19 libxpc.dylib 0x00000001934eeb7c _xpc_connection_mach_event + 2160
20 libdispatch.dylib 0x00000001932e9a28 _dispatch_client_callout4 + 16
21 libdispatch.dylib 0x00000001932ed140 _dispatch_mach_msg_invoke + 492
22 libdispatch.dylib 0x00000001932f42d4 _dispatch_queue_drain + 2008
23 libdispatch.dylib 0x00000001932ec668 _dispatch_mach_invoke + 136
24 libdispatch.dylib 0x00000001932f42d4 _dispatch_queue_drain + 2008
25 libdispatch.dylib 0x00000001932eca5c _dispatch_queue_invoke + 132
26 libdispatch.dylib 0x00000001932f6318 _dispatch_root_queue_drain + 720
27 libdispatch.dylib 0x00000001932f7c4c _dispatch_worker_thread3 + 108
28 libsystem_pthread.dylib 0x00000001934c922c _pthread_wqthread + 816
My main thread (did not crash here though):
Thread : com.apple.main-thread
0 TodayExtension 0x00000001000ae370 -[TodayViewController normalView] (TodayViewController.m:32)
1 TodayExtension 0x00000001000adf58 __36-[TodayViewController showErrorView]_block_invoke (TodayViewController.m:173)
2 libdispatch.dylib 0x00000001932e9994 _dispatch_call_block_and_release + 24
3 libdispatch.dylib 0x00000001932e9954 _dispatch_client_callout + 16
4 libdispatch.dylib 0x00000001932ee20c _dispatch_main_queue_callback_4CF + 1608
5 CoreFoundation 0x0000000181c7a2ec __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
6 CoreFoundation 0x0000000181c78394 __CFRunLoopRun + 1492
7 CoreFoundation 0x0000000181ba51f4 CFRunLoopRunSpecific + 396
8 GraphicsServices 0x000000018afc76fc GSEventRunModal + 168
9 UIKit 0x000000018653610c UIApplicationMain + 1488
10 libxpc.dylib 0x00000001934fc250 _xpc_objc_main + 768
11 libxpc.dylib 0x00000001934fdf38 xpc_main + 200
12 Foundation 0x0000000182ca1818 service_connection_handler
13 PlugInKit 0x000000018d1be910 -[PKService run] + 600
14 PlugInKit 0x000000018d1be548 +[PKService main] + 64
15 PlugInKit 0x000000018d1be938 +[PKService _defaultRun:arguments:] + 24
16 libextension.dylib 0x00000001924f9960 NSExtensionMain + 68
17 libdyld.dylib 0x0000000193316a08 start + 4
I see exactly the same thing on Crashlytics.
According to Apple this crash is a known bug in iOS 8 (including the 8.3 beta). The crash only occurs when the extension is shutting down, which means that the user doesn't see the extension crash.
So the only thing we can do right now is ignoring this crash

Resources