FIRCLSReportManager error on Firebase iOS SDK - ios

I'm getting this error everytime my app starts :
Main Thread Checker: UI API called on a background thread: -[UIApplication statusBarOrientation]
PID: 5264, TID: 1948690, Thread name: (none), Queue name: NSOperationQueue 0x107c31d80 (QOS: UNSPECIFIED), QoS: 0
Backtrace:
4 app 0x0000000104debcf4 -[FIRCLSReportManager captureInitialNotificationStates] + 144
5 app 0x0000000104deba88 -[FIRCLSReportManager setupStateNotifications] + 44
6 app 0x0000000104de9478 -[FIRCLSReportManager startCrashReporterWithProfilingMark:report:] + 256
7 app 0x0000000104de8210 -[FIRCLSReportManager startWithProfilingMark:] + 1188
8 app 0x0000000104e01be4 -[FIRCrashlytics initWithApp:appInfo:installations:analytics:] + 1448
9 app 0x0000000104e022e8 __38+[FIRCrashlytics componentsToRegister]_block_invoke + 532
10 app 0x0000000104daf8bc -[FIRComponentContainer instantiateInstanceForProtocol:withBlock:] + 132
11 app 0x0000000104dafb60 -[FIRComponentContainer instanceForProtocol:] + 344
12 app 0x0000000104db0234 +[FIRComponentType instanceForProtocol:inContainer:] + 104
13 app 0x0000000104e023d8 +[FIRCrashlytics crashlytics] + 136
14 app 0x0000000104923488 -[CrashReportingManager logWithFormat:arguments:] + 136
15 app 0x00000001049233e8 -[CrashReportingManager logWithFormat:] + 84
16 app 0x00000001049d6e4c __49-[AccountManager clearTempDataStorageCompletion:]_block_invoke + 636
17 Foundation 0x00000001b04a33a0 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1131424
18 Foundation 0x00000001b03ad0c8 7B1733B1-74C9-3A33-8A58-853B0A029826 + 123080
19 Foundation 0x00000001b04a5628 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1140264
20 Foundation 0x00000001b03acd60 7B1733B1-74C9-3A33-8A58-853B0A029826 + 122208
21 Foundation 0x00000001b04a6020 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1142816
22 Foundation 0x00000001b04a5aec 7B1733B1-74C9-3A33-8A58-853B0A029826 + 1141484
23 libdispatch.dylib 0x0000000107a8d268 _dispatch_block_async_invoke2 + 104
24 libdispatch.dylib 0x0000000107a7ebd8 _dispatch_client_callout + 16
25 libdispatch.dylib 0x0000000107a817dc _dispatch_continuation_pop + 524
26 libdispatch.dylib 0x0000000107a80c5c _dispatch_async_redirect_invoke + 624
27 libdispatch.dylib 0x0000000107a90160 _dispatch_root_queue_drain + 376
28 libdispatch.dylib 0x0000000107a90a88 _dispatch_worker_thread2 + 156
29 libsystem_pthread.dylib 0x00000001afdfab48 _pthread_wqthread + 212
30 libsystem_pthread.dylib 0x00000001afdfd760 start_wqthread + 8
It seems Firebase is calling statusBarOrientation on a background thread ?
Is anyone else getting this or knows how to fix this ?

You are trying to access +[FIRCrashlytics crashlytics] on a non-main thread.

Related

CoreData _NSIsNSSet EXC_BAD_ACCESS KERN_INVALID_ADDRESS - crash on app launch

We are getting this crash on multiple devices but cannot figure out where it originates from. The main thread is crashing.
Stack trace:
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x193dfd58c object_getMethodImplementation + 20
1 CoreFoundation 0x1940f6928 _NSIsNSSet + 40
2 CoreFoundation 0x193fc2c04 -[NSMutableSet unionSet:] + 112
3 CoreData 0x198abe014 -[_NSFaultingMutableSet willReadWithContents:] + 668
4 CoreData 0x198ae4280 -[_NSFaultingMutableSet count] + 32
5 CoreData 0x198be1bb4 __107-[NSManagedObjectContext(_NestedContextSupport) newValueForRelationship:forObjectWithID:withContext:error:]_block_invoke + 360
6 CoreData 0x198be2e70 internalBlockToNSManagedObjectContextPerform + 104
7 libdispatch.dylib 0x193d8b5ac _dispatch_client_callout + 20
8 libdispatch.dylib 0x193d9843c _dispatch_async_and_wait_invoke + 96
9 libdispatch.dylib 0x193d8b5ac _dispatch_client_callout + 20
10 libdispatch.dylib 0x193d977d4 _dispatch_main_queue_callback_4CF + 832
11 CoreFoundation 0x1940648d4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
12 CoreFoundation 0x19405f58c __CFRunLoopRun + 1692
13 CoreFoundation 0x19405ebc8 CFRunLoopRunSpecific + 480
14 GraphicsServices 0x19e4475cc GSEventRunModal + 164
15 UIKitCore 0x198211744 UIApplicationMain + 1936
16 My App 0x100b37324 main + 16 (main.m:16)
17 libdyld.dylib 0x193edb384 start + 4
At the same time, a background thread operating in a PrivateQueue ManagedObjectContext is busy accessing a ManagedObject via awakeFromFetch, stack trace of this thread:
NSManagedObjectContext 0x28066c700
0 libsystem_kernel.dylib 0x1b09617e4 __ulock_wait + 8
1 libdispatch.dylib 0x1b081bf48 _dlock_wait + 56
2 libdispatch.dylib 0x1b081bcf4 _dispatch_thread_event_wait_slow + 56
3 libdispatch.dylib 0x1b0828618 __DISPATCH_WAIT_FOR_QUEUE__ + 336
4 libdispatch.dylib 0x1b0828204 _dispatch_sync_f_slow + 144
5 CoreData 0x1b56686cc _perform + 200
6 CoreData 0x1b558e2c4 -[NSManagedObjectContext(_NestedContextSupport) newValueForRelationship:forObjectWithID:withContext:error:] + 156
7 CoreData 0x1b555033c -[NSFaultHandler retainedFulfillAggregateFaultForObject:andRelationship:withContext:] + 428
8 CoreData 0x1b554df10 -[_NSFaultingMutableSet willReadWithContents:] + 408
9 CoreData 0x1b55ea5bc -[_NSFaultingMutableSet allObjects] + 32
10 My App 0x1044fdc3c PSUser.isAdmin.getter + 286 (PSUser.swift:286)
11 My App 0x1044fdb04 #objc PSUser.isAdmin.getter + 4309900036 (<compiler-generated>:4309900036)
12 My App 0x1044fc694 PSUser.initCurrentTeam() + 212 (PSUser.swift:212)
13 My App 0x1044fcbc0 #objc PSUser.initCurrentTeam() + 4309896128 (<compiler-generated>:4309896128)
14 My App 0x1044fc658 #objc PSUser.awakeFromFetch() + 4309894744 (<compiler-generated>:4309894744)
15 CoreData 0x1b56520e4 _PFFaultHandlerFulfillFault + 3168
16 CoreData 0x1b5650ab0 _PFFaultHandlerLookupRow + 908
17 CoreData 0x1b56527fc _PF_FulfillDeferredFault + 260
18 CoreData 0x1b5666a2c _pvfk_header + 120
19 CoreData 0x1b5663218 _sharedIMPL_pvfk_core + 32
20 My App 0x10438918c +[PSAppSettings isAutoPilotAllowed:] + 97 (PSAppSettings.m:97)
21 My App 0x1043fbb9c LocationTracker.updateTrackingState(user:) + 1120 (LocationTracker.swift:1120)
22 My App 0x104413b4c partial apply for closure #1 in LocationTracker.store(filteredLocations:) + 1275 (LocationTracker.swift:1275)
23 My App 0x1043bae3c thunk for #escaping #callee_guaranteed () -> () + 4308577852 (<compiler-generated>:4308577852)
24 CoreData 0x1b566b650 developerSubmittedBlockToNSManagedObjectContextPerform + 164
25 libdispatch.dylib 0x1b081b5ac _dispatch_client_callout + 20
26 libdispatch.dylib 0x1b0821a64 _dispatch_lane_serial_drain + 568
27 libdispatch.dylib 0x1b0822498 _dispatch_lane_invoke + 400
28 libdispatch.dylib 0x1b082ba5c _dispatch_workloop_worker_thread + 584
29 libsystem_pthread.dylib 0x1b0881718 _pthread_wqthread + 276
30 libsystem_pthread.dylib 0x1b08879c8 start_wqthread + 8
I am not certain if the two stacks are related, or if the background thread is dispatching anything to the main thread (why should it?), but the call newValueForRelationship:forObjectWithID:withContext:error does appear in both stack traces.
The method for awakeFromFetch is initializing a calculated object property currentTeam via the initCurrentTeam() method. This method accesses the teams relationship on that object. Here is the relevant code:
#objc extension PSUser {
override open func awakeFromFetch() {
super.awakeFromFetch()
initCurrentTeam()
}
/**
This method sets the currentTeam by picking
the appropriate team from the `teams` set.
*/
func initCurrentTeam() {
if (isAdmin || isManager), !isEmployee,
var teams = teams?.allObjects as? [PSTeam],
currentTeam == nil {
...
currentTeam = teams.first
}
}
...
}
Enabled com.apple.CoreData.ConcurrencyDebug in Xcode Scheme but Xcode console does not complain. I have not been able to reproduce this issue while debugging in Xcode. The issue is only reported via Crashlytics in production environment.
Any ideas what might be causing this?

Matrix chat gets freezes

I'm using VECTOR 0.6.17 and when I run my app in XCode 9.4, the app is running and chat is getting logged in correctly and the user's to whom I chatted previously is showing. When I click a particular user the app freezes and I can't do anything after that. I have attached the log.
2018-09-11 11:31:03.959131+0530 Vector[317:22327] [MXKRoomDataSource] paginateToFillRect: {{0, 0}, {414, 736}}
2018-09-11 11:31:03.959224+0530 Vector[317:22327] [MXKRoomDataSource] paginateToFillRect: Prefill with data from the store
2018-09-11 11:31:03.959321+0530 Vector[317:22327] [MXEventTimeline] paginate 30 messages in !eCuIjpMTkujUAaerDm:matrix.org (10 are retrieved from the store)
2018-09-11 11:31:03.960371+0530 Vector[317:22327] [MXEventTimeline] paginate : is done from the store
=================================================================
Main Thread Checker: UI API called on a background thread: -[UILabel setText:]
PID: 317, TID: 22759, Thread name: (none), Queue name: MXKRoomDataSource, QoS: 0
Backtrace:
4 Vector 0x0000000101216a6c +[AvatarGenerator imageFromText:withBackgroundColor:] + 480
5 Vector 0x0000000101217060 +[AvatarGenerator avatarForText:andColorIndex:] + 448
6 Vector 0x0000000101217268 +[AvatarGenerator generateAvatarForMatrixItem:withDisplayName:] + 188
7 Vector 0x000000010123c8d8 -[RoomBubbleCellData initWithEvent:andRoomState:andRoomDataSource:] + 348
8 Vector 0x0000000101471548 __41-[MXKRoomDataSource processQueuedEvents:]_block_invoke + 2092
9 libdispatch.dylib 0x00000001023591dc _dispatch_call_block_and_release + 24
10 libdispatch.dylib 0x000000010235919c _dispatch_client_callout + 16
11 libdispatch.dylib 0x0000000102367dfc _dispatch_queue_serial_drain + 768
12 libdispatch.dylib 0x000000010235c6ac _dispatch_queue_invoke + 328
13 libdispatch.dylib 0x0000000102368d54 _dispatch_root_queue_drain_deferred_wlh + 352
14 libdispatch.dylib 0x000000010236fe38 _dispatch_workloop_worker_thread + 676
15 libsystem_pthread.dylib 0x000000018478be70 _pthread_wqthread + 860
16 libsystem_pthread.dylib 0x000000018478bb08 start_wqthread + 4
2018-09-11 11:31:03.981613+0530 Vector[317:22759] [reports] Main Thread Checker: UI API called on a background thread: -[UILabel setText:]
PID: 317, TID: 22759, Thread name: (none), Queue name: MXKRoomDataSource, QoS: 0
Backtrace:
4 Vector 0x0000000101216a6c +[AvatarGenerator imageFromText:withBackgroundColor:] + 480
5 Vector 0x0000000101217060 +[AvatarGenerator avatarForText:andColorIndex:] + 448
6 Vector 0x0000000101217268 +[AvatarGenerator generateAvatarForMatrixItem:withDisplayName:] + 188
7 Vector 0x000000010123c8d8 -[RoomBubbleCellData initWithEvent:andRoomState:andRoomDataSource:] + 348
8 Vector 0x0000000101471548 __41-[MXKRoomDataSource processQueuedEvents:]_block_invoke + 2092
9 libdispatch.dylib 0x00000001023591dc _dispatch_call_block_and_release + 24
10 libdispatch.dylib 0x000000010235919c _dispatch_client_callout + 16
11 libdispatch.dylib 0x0000000102367dfc _dispatch_queue_serial_drain + 768
12 libdispatch.dylib 0x000000010235c6ac _dispatch_queue_invoke + 328
13 libdispatch.dylib 0x0000000102368d54 _dispatch_root_queue_drain_deferred_wlh + 352
14 libdispatch.dylib 0x000000010236fe38 _dispatch_workloop_worker_thread + 676
15 libsystem_pthread.dylib 0x000000018478be70 _pthread_wqthread + 860
16 libsystem_pthread.dylib 0x000000018478bb08 start_wqthread + 4
=================================================================
Main Thread Checker: UI API called on a background thread: -[UILabel setBackgroundColor:]
PID: 317, TID: 22759, Thread name: (none), Queue name: MXKRoomDataSource, QoS: 0
Backtrace:
4 Vector 0x0000000101216a84 +[AvatarGenerator imageFromText:withBackgroundColor:] + 504
5 Vector 0x0000000101217060 +[AvatarGenerator avatarForText:andColorIndex:] + 448
6 Vector 0x0000000101217268 +[AvatarGenerator generateAvatarForMatrixItem:withDisplayName:] + 188
7 Vector 0x000000010123c8d8 -[RoomBubbleCellData initWithEvent:andRoomState:andRoomDataSource:] + 348
8 Vector 0x0000000101471548 __41-[MXKRoomDataSource processQueuedEvents:]_block_invoke + 2092
9 libdispatch.dylib 0x00000001023591dc _dispatch_call_block_and_release + 24
10 libdispatch.dylib 0x000000010235919c _dispatch_client_callout + 16
11 libdispatch.dylib 0x0000000102367dfc _dispatch_queue_serial_drain + 768
12 libdispatch.dylib 0x000000010235c6ac _dispatch_queue_invoke + 328
13 libdispatch.dylib 0x0000000102368d54 _dispatch_root_queue_drain_deferred_wlh + 352
14 libdispatch.dylib 0x000000010236fe38 _dispatch_workloop_worker_thread + 676
15 libsystem_pthread.dylib 0x000000018478be70 _pthread_wqthread + 860
16 libsystem_pthread.dylib 0x000000018478bb08 start_wqthread + 4
2018-09-11 11:31:04.088419+0530 Vector[317:22759] [reports] Main Thread Checker: UI API called on a background thread: -[UILabel setBackgroundColor:]
PID: 317, TID: 22759, Thread name: (none), Queue name: MXKRoomDataSource, QoS: 0
Backtrace:
4 Vector 0x0000000101216a84 +[AvatarGenerator imageFromText:withBackgroundColor:] + 504
5 Vector 0x0000000101217060 +[AvatarGenerator avatarForText:andColorIndex:] + 448
6 Vector 0x0000000101217268 +[AvatarGenerator generateAvatarForMatrixItem:withDisplayName:] + 188
7 Vector 0x000000010123c8d8 -[RoomBubbleCellData initWithEvent:andRoomState:andRoomDataSource:] + 348
8 Vector 0x0000000101471548 __41-[MXKRoomDataSource processQueuedEvents:]_block_invoke + 2092
9 libdispatch.dylib 0x00000001023591dc _dispatch_call_block_and_release + 24
10 libdispatch.dylib 0x000000010235919c _dispatch_client_callout + 16
11 libdispatch.dylib 0x0000000102367dfc _dispatch_queue_serial_drain + 768
12 libdispatch.dylib 0x000000010235c6ac _dispatch_queue_invoke + 328
13 libdispatch.dylib 0x0000000102368d54 _dispatch_root_queue_drain_deferred_wlh + 352
14 libdispatch.dylib 0x000000010236fe38 _dispatch_workloop_worker_thread + 676
15 libsystem_pthread.dylib 0x000000018478be70 _pthread_wqthread + 860
16 libsystem_pthread.dylib 0x000000018478bb08 start_wqthread + 4
Can anyone help me with this issue please???
This is the link where the demo of the issue which I mentioned about,
https://www.dropbox.com/s/za69zs5yzlpdvvb/Vector%20Chat.mov?dl=0
In edit screen enabled pause on issues.
I got the issue at this place what to do for this issue?
As per #holex said I have added dispatch queue
again in that line same error came so added dispatch queue for that line also but my app gets crashed. I have attached the log also.
2018-09-11 13:15:35.113653+0530 Vector[412:50340] [MXLogger] handleUncaughtException:
4744231993351678525 - 2018-09-11 07:45:35 +0000
*** -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: R0)
Application: Vector (com.agriya.devtest)
Application version: 0.2.3 (r0.2.3)
Matrix SDK version: 0.6.17
Build: (no build info)
iPhone 11.4.1
Main thread: YES
(
0 CoreFoundation 0x0000000184b66da4 <redacted> + 252
1 libobjc.A.dylib 0x0000000183d205ec objc_exception_throw + 56
2 CoreFoundation 0x0000000184aff750 _CFArgv + 0
3 CoreFoundation 0x0000000184a34c6c <redacted> + 948
4 Vector 0x0000000100b030a0 +[AvatarGenerator avatarForText:andColorIndex:] + 528
5 Vector 0x0000000100b03258 +[AvatarGenerator generateAvatarForMatrixItem:withDisplayName:] + 188
6 Vector 0x0000000100b2b4c4 -[MXRoom(Vector) setRoomAvatarImageIn:] + 1224
7 Vector 0x0000000100b14554 -[RecentTableViewCell render:] + 3168
8 Vector 0x0000000100d0da4c -[MXKInterleavedRecentsDataSource tableView:cellForRowAtIndexPath:] + 440
9 Vector 0x0000000100b867f8 -[RecentsDataSource tableView:cellForRowAtIndexPath:] + 2876
10 UIKit 0x000000018e8430cc <redacted> + 668
11 UIKit 0x000000018e842d84 <redacted> + 80
12 UIKit 0x000000018e841aa0 <redacted> + 2280
13 UIKit 0x000000018e83d5ec <redacted> + 140
14 UIKit 0x000000018e77a6f4 <redacted> + 1420
15 QuartzCore 0x0000000188cefe54 <redacted> + 184
16 QuartzCore 0x0000000188cf3fe4 <redacted> + 324
17 QuartzCore 0x0000000188c606c8 <redacted> + 320
18 QuartzCore 0x0000000188c881b0 <redacted> + 580
19 QuartzCore 0x0000000188c89030 <redacted> + 92
20 CoreFoundation 0x0000000184b0e910 <redacted> + 32
21 CoreFoundation 0x0000000184b0c238 <redacted> + 412
22 CoreFoundation 0x0000000184b0c884 <redacted> + 1436
23 CoreFoundation 0x0000000184a2cda8 CFRunLoopRunSpecific + 552
24 GraphicsServices 0x0000000186a12020 GSEventRunModal + 100
25 UIKit 0x000000018ea4c758 UIApplicationMain + 236
26 Vector 0x0000000100b13508 main + 184
27 libdyld.dylib 0x00000001844bdfc0 <redacted> + 4
)
2018-09-11 13:15:35.144749+0530 Vector[412:50340] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: R0)'
*** First throw call stack:
(0x184b66d8c 0x183d205ec 0x184aff750 0x184a34c6c 0x100b030a0 0x100b03258 0x100b2b4c4 0x100b14554 0x100d0da4c 0x100b867f8 0x18e8430cc 0x18e842d84 0x18e841aa0 0x18e83d5ec 0x18e77a6f4 0x188cefe54 0x188cf3fe4 0x188c606c8 0x188c881b0 0x188c89030 0x184b0e910 0x184b0c238 0x184b0c884 0x184a2cda8 0x186a12020 0x18ea4c758 0x100b13508 0x1844bdfc0)
libc++abi.dylib: terminating with uncaught exception of type NSException

iOS: Main Thread Checker: UI API called on a background thread: -[UIView retainCount]

I have an error warning:
I usually put a distpach_async on the main thread to avoid the problem, but impossible to found the function -[UIView retainCount] in my code.
Main Thread Checker: UI API called on a background thread: -[UIView retainCount]
PID: 71660, TID: 11215956, Thread name: (none), Queue name: com.apple.keyboard.xpc, QoS: 25
Backtrace:
4 liboainject.dylib 0x0000000128d09ca4 _AllocationsObjcLogger + 74
5 liboainject.dylib 0x0000000128d09e0e ___swapMethods_block_invoke_3 + 301
6 libsystem_blocks.dylib 0x0000000110e91bab _Block_object_assign + 207
7 UIKit 0x000000010df0f4f6 __copy_helper_block_.2638 + 31
8 libsystem_blocks.dylib 0x0000000110e918f0 _Block_copy + 113
9 UIKit 0x000000010e996dcc -[UIKeyboardTaskEntry initWithTask:] + 77
10 UIKit 0x000000010e995a2c -[UIKeyboardTaskQueue performTaskOnMainThread:waitUntilDone:] + 119
11 UIKit 0x000000010df0f498 __70-[UIKeyboardImpl syncInputManagerToKeyboardStateWithExecutionContext:]_block_invoke + 90
12 CoreFoundation 0x000000010c4a336c __invoking___ + 140
13 CoreFoundation 0x000000010c4a3240 -[NSInvocation invoke] + 320
14 Foundation 0x000000010b5b85ce __NSXPCCONNECTION_IS_CALLING_OUT_TO_REPLY_BLOCK__ + 17
15 Foundation 0x000000010b7e488a -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:] + 790
16 Foundation 0x000000010b7e89b0 __88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke.346 + 505
17 libxpc.dylib 0x000000011117c61c _xpc_connection_reply_callout + 36
18 libxpc.dylib 0x00000001111719cc _xpc_connection_call_reply_async + 82
19 libdispatch.dylib 0x0000000110da439f _dispatch_client_callout3 + 8
20 libdispatch.dylib 0x0000000110dbc5b7 _dispatch_mach_msg_async_reply_invoke + 369
21 libdispatch.dylib 0x0000000110dac57d _dispatch_queue_serial_drain + 434
22 libdispatch.dylib 0x0000000110dad1ea _dispatch_queue_invoke + 336
23 libdispatch.dylib 0x0000000110db0102 _dispatch_root_queue_drain + 772
24 libdispatch.dylib 0x0000000110dafda0 _dispatch_worker_thread3 + 132
25 libsystem_pthread.dylib 0x000000011126f1ca _pthread_wqthread + 1387
26 libsystem_pthread.dylib 0x000000011126ec4d start_wqthread + 13
2018-01-21 15:51:21.776157+0100 Formbox_Renault_Showroom_Zoe Levallois[71660:11215956] [reports] Main Thread Checker: UI API called on a background thread: -[UIView retainCount]
PID: 71660, TID: 11215956, Thread name: (none), Queue name: com.apple.keyboard.xpc, QoS: 25
Backtrace:
4 liboainject.dylib 0x0000000128d09ca4 _AllocationsObjcLogger + 74
5 liboainject.dylib 0x0000000128d09e0e ___swapMethods_block_invoke_3 + 301
6 libsystem_blocks.dylib 0x0000000110e91bab _Block_object_assign + 207
7 UIKit 0x000000010df0f4f6 __copy_helper_block_.2638 + 31
8 libsystem_blocks.dylib 0x0000000110e918f0 _Block_copy + 113
9 UIKit 0x000000010e996dcc -[UIKeyboardTaskEntry initWithTask:] + 77
10 UIKit 0x000000010e995a2c -[UIKeyboardTaskQueue performTaskOnMainThread:waitUntilDone:] + 119
11 UIKit 0x000000010df0f498 __70-[UIKeyboardImpl syncInputManagerToKeyboardStateWithExecutionContext:]_block_invoke + 90
12 CoreFoundation 0x000000010c4a336c __invoking___ + 140
13 CoreFoundation 0x000000010c4a3240 -[NSInvocation invoke] + 320
14 Foundation 0x000000010b5b85ce __NSXPCCONNECTION_IS_CALLING_OUT_TO_REPLY_BLOCK__ + 17
15 Foundation 0x000000010b7e488a -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:] + 790
16 Foundation 0x000000010b7e89b0 __88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke.346 + 505
17 libxpc.dylib 0x000000011117c61c _xpc_connection_reply_callout + 36
18 libxpc.dylib 0x00000001111719cc _xpc_connection_call_reply_async + 82
19 libdispatch.dylib 0x0000000110da439f _dispatch_client_callout3 + 8
20 libdispatch.dylib 0x0000000110dbc5b7 _dispatch_mach_msg_async_reply_invoke + 369
21 libdispatch.dylib 0x0000000110dac57d _dispatch_queue_serial_drain + 434
22 libdispatch.dylib 0x0000000110dad1ea _dispatch_queue_invoke + 336
23 libdispatch.dylib 0x0000000110db0102 _dispatch_root_queue_drain + 772
24 libdispatch.dylib 0x0000000110dafda0 _dispatch_worker_thread3 + 132
25 libsystem_pthread.dylib 0x000000011126f1ca _pthread_wqthread + 1387
26 libsystem_pthread.dylib 0x000000011126ec4d start_wqthread + 13
Do you have any idea where to found it, so I could use :
dispatch_async(dispatch_get_main_queue(), ^{
});
Thanks in advance.
You have some of the memory management debugging tools turned on simultaneously with the main thread checker. One of the memory debugging tools is swizzling retain/release to do some additional memory management analysis and that analysis includes a call to retainCount, which UIView requires to be called from the main thread.
I.e. you're using two tools that are incompatible with each other. Turn one off.
As well, please file a bug via http://bugreporter.apple.com. The developer tools should either prevent you from using this configuration or should give a better runtime diagnostic.

Touch ID slows down the app or crash

I really dont know what happened to my app but since I've added the touchid function, app is slower then before and strange writings appear.
I've added a UiViewController before the main controller, so I can check there without show any data to the user until he logged success with touchid.
All right, on my iphone 6s also, but it is very very slow now and it has appeared this on my console after the success of the touchid function:
success!!!!
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 8460, TID: 1642991, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 21
Backtrace:
4 LAMer 0x000000010c035d96 _T0So16UIViewControllerC5LAMerE14displaySpinnerSo0A0CAF6onView_tFZ + 54
5 LAMer 0x000000010c060a85 _T05LAMer18AuthViewControllerC13viewDidAppearySbFySbcfU_ + 245
6 LAMer 0x000000010c060e4e _T05LAMer18AuthViewControllerC13viewDidAppearySbFySbcfU_TA + 62
7 LAMer 0x000000010c0374d0 _T0So16UIViewControllerC5LAMerE25authenticationWithTouchIDyySbc10completion_tFySb_s5Error_pSgtcfU_ + 336
8 LAMer 0x000000010c037c2c _T0So16UIViewControllerC5LAMerE25authenticationWithTouchIDyySbc10completion_tFySb_s5Error_pSgtcfU_TA + 108
9 LAMer 0x000000010c037cb3 _T0Sbs5Error_pSgIxyx_SbSo7NSErrorCSgIyByy_TR + 115
10 LocalAuthentication 0x000000010f42edf6 __50-[LAContext evaluatePolicy:localizedReason:reply:]_block_invoke_2 + 72
11 LocalAuthentication 0x000000010f42e2a9 __42-[LAContext evaluatePolicy:options:reply:]_block_invoke_2 + 615
12 LocalAuthentication 0x000000010f4293df __52-[LAClient evaluatePolicy:options:uiDelegate:reply:]_block_invoke + 224
13 libdispatch.dylib 0x00000001124dc2f7 _dispatch_call_block_and_release + 12
14 libdispatch.dylib 0x00000001124dd33d _dispatch_client_callout + 8
15 libdispatch.dylib 0x00000001124e2251 _dispatch_queue_override_invoke + 1458
16 libdispatch.dylib 0x00000001124e9102 _dispatch_root_queue_drain + 772
17 libdispatch.dylib 0x00000001124e8da0 _dispatch_worker_thread3 + 132
18 libsystem_pthread.dylib 0x00000001129a81ca _pthread_wqthread + 1387
19 libsystem_pthread.dylib 0x00000001129a7c4d start_wqthread + 13
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView initWithFrame:]
PID: 8460, TID: 1642991, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 21
Backtrace:
4 LAMer 0x000000010c03802d _T0So6UIViewCABSC6CGRectV5frame_tcfcTO + 77
5 LAMer 0x000000010c036064 _T0So6UIViewCABSC6CGRectV5frame_tcfC + 100
6 LAMer 0x000000010c035db3 _T0So16UIViewControllerC5LAMerE14displaySpinnerSo0A0CAF6onView_tFZ + 83
7 LAMer 0x000000010c060a85 _T05LAMer18AuthViewControllerC13viewDidAppearySbFySbcfU_ + 245
8 LAMer 0x000000010c060e4e _T05LAMer18AuthViewControllerC13viewDidAppearySbFySbcfU_TA + 62
9 LAMer 0x000000010c0374d0 _T0So16UIViewControllerC5LAMerE25authenticationWithTouchIDyySbc10completion_tFySb_s5Error_pSgtcfU_ + 336
10 LAMer 0x000000010c037c2c _T0So16UIViewControllerC5LAMerE25authenticationWithTouchIDyySbc10completion_tFySb_s5Error_pSgtcfU_TA + 108
11 LAMer 0x000000010c037cb3 _T0Sbs5Error_pSgIxyx_SbSo7NSErrorCSgIyByy_TR + 115
12 LocalAuthentication 0x000000010f42edf6 __50-[LAContext evaluatePolicy:localizedReason:reply:]_block_invoke_2 + 72
13 LocalAuthentication 0x000000010f42e2a9 __42-[LAContext evaluatePolicy:options:reply:]_block_invoke_2 + 615
14 LocalAuthentication 0x000000010f4293df __52-[LAClient evaluatePolicy:options:uiDelegate:reply:]_block_invoke + 224
15 libdispatch.dylib 0x00000001124dc2f7 _dispatch_call_block_and_release + 12
16 libdispatch.dylib 0x00000001124dd33d _dispatch_client_callout + 8
17 libdispatch.dylib 0x00000001124e2251 _dispatch_queue_override_invoke + 1458
18 libdispatch.dylib 0x00000001124e9102 _dispatch_root_queue_drain + 772
19 libdispatch.dylib 0x00000001124e8da0 _dispatch_worker_thread3 + 132
20 libsystem_pthread.dylib 0x00000001129a81ca _pthread_wqthread + 1387
21 libsystem_pthread.dylib 0x00000001129a7c4d start_wqthread + 13
After this, main controller appear and data of that controller correctly log into console.
Could I ask you what is this code above that appears in my console and if you are already know that touchid make app doing this stuff..
Thank you in advice
This doesn't look like a TouchID issue at all. You are performing UI actions on a background thread. You must call all UI on the main thread.
Look at recent changes to your code and see what you've changed.
Slowness and/or unresponsiveness is classic UI on a background thread issue.
See Main Thread Checker

iAd Crash Report

I am seeing the following crash log in Crashlytics with an iOS app. It is certainly infrequent, and I have been unable to replicate, but it is very annoying.
Anyone able to suggest what this is likely linked to?
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x000000019548c0b4 objc_retain + 20
1 libsystem_blocks.dylib 0x0000000195b0dbf8 _Block_object_assign + 320
2 libsystem_blocks.dylib 0x0000000195b0d738 _Block_copy_internal + 384
3 UIKit 0x0000000189b49988 +[_UIAsyncInvocation invocationWithBlock:] + 84
4 UIKit 0x0000000189b2e378 +[_UIRemoteViewControllerConnectionRequest __requestRemoteViewController:service:fromServiceWithBundleIdentifier:serializedAppearanceCustomizations:legacyAppearance:exportedHostingObject:serviceViewControllerDeputyInterface:connectionHandler:] + 1320
5 UIKit 0x0000000189b2e7a8 +[_UIRemoteViewControllerConnectionRequest requestViewController:fromServiceWithBundleIdentifier:serializedAppearanceCustomizations:legacyAppearance:exportedHostingObject:serviceViewControllerDeputyInterface:connectionHandler:] + 72
6 UIKit 0x0000000189b30b00 +[_UIRemoteViewController _requestViewController:traitCollection:fromServiceWithBundleIdentifier:service:connectionHandler:] + 528
7 iAd 0x000000018a12c130 +[ADAdSpaceRemoteViewController adSpaceRemoteViewControllerWithCompletionHandler:] + 96
8 iAd 0x000000018a126908 -[ADAdSpace _requestServiceAdSpace] + 228
9 iAd 0x000000018a1264ac __30-[ADAdSpace initForRecipient:]_block_invoke + 36
10 libdispatch.dylib 0x0000000195ab93ac _dispatch_call_block_and_release + 24
11 libdispatch.dylib 0x0000000195ab936c _dispatch_client_callout + 16
12 libdispatch.dylib 0x0000000195abd980 _dispatch_main_queue_callback_4CF + 932
13 CoreFoundation 0x0000000184cd5fa4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
14 CoreFoundation 0x0000000184cd404c __CFRunLoopRun + 1492
15 CoreFoundation 0x0000000184c010a4 CFRunLoopRunSpecific + 396
16 GraphicsServices 0x000000018dda35a4 GSEventRunModal + 168
17 UIKit 0x00000001895363c0 UIApplicationMain + 1488
18 xxxxxxxx 0x00000001000d6380 main (main.m:16)
19 libdyld.dylib 0x0000000195ae2a08 start + 4

Resources