App is crashing while a bluetooth device is disconnected.
I've seen few related threads and they say
"A notification delegate was not reset to nil. A fix has been applied at version 10.3.79."
Following is crash log:
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 libobjc.A.dylib 0x000000018544c430 objc_msgSend + 16
1 ExternalAccessory 0x000000019c07c4dc -[EAAccessoryManager _notifyObserversThatAccessoryDisconnectedWithUserInfo:] + 104 (EAAccessoryManager.m:909)
2 ExternalAccessory 0x000000019c07eddc -[EAAccessoryManager _externalAccessoryDisconnected:] + 928 (EAAccessoryManager.m:1537)
3 CoreAccessories 0x00000001a7892ccc __54-[ACCExternalAccessoryProvider ExternalAccessoryLeft:]_block_invoke + 316 (ACCExternalAccessoryProvider.m:453)
4 libdispatch.dylib 0x0000000185b6d088 _dispatch_call_block_and_release + 24 (init.c:994)
5 libdispatch.dylib 0x0000000185b6d048 _dispatch_client_callout + 16 (object.m:502)
6 libdispatch.dylib 0x0000000185b79b74 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1016 (inline_internal.h:2500)
7 CoreFoundation 0x0000000186191eb0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1815)
8 CoreFoundation 0x000000018618fa8c __CFRunLoopRun + 2012 (CFRunLoop.c:3111)
9 CoreFoundation 0x00000001860affb8 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3245)
10 GraphicsServices 0x0000000187f47f84 GSEventRunModal + 100 (GSEvent.c:2245)
11 UIKit 0x000000018f6842e8 UIApplicationMain + 208 (UIApplication.m:3949)
12 MYAPP 0x0000000100ab8d58 main + 172 (main.m:16)
13 libdyld.dylib 0x0000000185bd256c start + 4
I am having a testflight user reporting random crashes which I cannot seem to replicate. The relevant section of their crash log is here:
Thread 0 name:
Thread 0 Crashed:
0 iMavlink 0x00000001001045a4 0x10009c000 + 427428
1 iMavlink 0x00000001001049fc 0x10009c000 + 428540
2 iMavlink 0x00000001000ee54c 0x10009c000 + 337228
3 iMavlink 0x00000001000b9354 0x10009c000 + 119636
4 libdispatch.dylib 0x0000000182a894bc _dispatch_call_block_and_release + 24 (init.c:760)
5 libdispatch.dylib 0x0000000182a8947c _dispatch_client_callout + 16 (object.m:506)
6 libdispatch.dylib 0x0000000182a8eb84 _dispatch_main_queue_callback_4CF + 1844 (inline_internal.h:1063)
7 CoreFoundation 0x0000000182ff4d50 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1613)
8 CoreFoundation 0x0000000182ff2bb8 __CFRunLoopRun + 1628 (CFRunLoop.c:2718)
9 CoreFoundation 0x0000000182f1cc50 CFRunLoopRunSpecific + 384 (CFRunLoop.c:2814)
10 GraphicsServices 0x0000000184804088 GSEventRunModal + 180 (GSEvent.c:2245)
11 UIKit 0x0000000188206088 UIApplicationMain + 204 (UIApplication.m:3772)
12 iMavlink 0x00000001000dbc94 0x10009c000 + 261268
13 libdyld.dylib 0x0000000182aba8b8 start + 4 (start_glue.s:78)
Im not sure where to even begin with this. It dosent seem to have any reference to my code which I can see, but I am new to debugging in Xcode using testflight so I am probably missing something really obvious.
Can anyone help?
Thanks!
Tom
I can see from the Crashlytics that some of my app users are getting the following crashes. I have never seen these myself and don't know how to reproduce them as they don't have my code in the stack trace. I have read about OpenGL that some crashes are possible when trying to update the surface while the app is in the background. Not sure if that is the case here because the crashes didn't occur before iOS 9.
I have several annotations on the map, custom MKAnnotationView derived views, some custom overlays and a MKTileOverlay derived tile source. The map handling code and overlays are Objective-C, but my app has also some Swift code.
Does anybody have any ideas what could be the reason for the crashes?
1)
Thread : Crashed: com.apple.maps.geogl.renderQueue
0 VectorKit 0x18c82a894 ___ZN3ggl10GLRenderer5frameEPNS_12RenderTargetEPNS_11RenderQueueE_block_invoke_2 + 876
1 VectorKit 0x18c82a47c ___ZN3ggl10GLRenderer5frameEPNS_12RenderTargetEPNS_11RenderQueueE_block_invoke + 212
2 libdispatch.dylib 0x182625630 _dispatch_call_block_and_release + 24
3 libdispatch.dylib 0x1826255f0 _dispatch_client_callout + 16
4 libdispatch.dylib 0x182631634 _dispatch_queue_drain + 864
2)
Thread : Crashed: com.apple.mapdisplay.stylesheetLoadQueue
0 libdispatch.dylib 0x183ec2a90 dispatch_async + 76
1 libdispatch.dylib 0x183ec2a88 dispatch_async + 68
2 VectorKit 0x18df501c4 std::__1::__function::__func<-[VKTileSetBackedTileSource setStyleManager:]::$_0, std::__1::allocator<-[VKTileSetBackedTileSource setStyleManager:]::$_0>, void (std::__1::shared_ptr<gss::StyleManager>, bool)>::operator()(std::__1::shared_ptr<gss::StyleManager>&&, bool&&) + 176
3 VectorKit 0x18e11533c std::__1::__function::__func<gss::StyleManager::addFinishedDecodingGlobalPropertiesCallback(std::__1::function<void (std::__1::shared_ptr<gss::StyleManager>, bool)>)::$_0, std::__1::allocator<gss::StyleManager::addFinishedDecodingGlobalPropertiesCallback(std::__1::function<void (std::__1::shared_ptr<gss::StyleManager>, bool)>)::$_0>, void (bool)>::operator()(bool&&) + 88
4 VectorKit 0x18e10c248 ___ZN3gss10StyleSheet43addFinishedDecodingGlobalPropertiesCallbackENSt3__18functionIFvbEEE_block_invoke + 56
5 libdispatch.dylib 0x183ec1630 _dispatch_call_block_and_release + 24
6 libdispatch.dylib 0x183ec15f0 _dispatch_client_callout + 16
7 libdispatch.dylib 0x183ecd634 _dispatch_queue_drain + 864
8 libdispatch.dylib 0x183ec50f4 _dispatch_queue_invoke + 464
9 libdispatch.dylib 0x183ecf504 _dispatch_root_queue_drain + 728
10 libdispatch.dylib 0x183ecf224 _dispatch_worker_thread3 + 112
11 libsystem_pthread.dylib 0x1840d5470 _pthread_wqthread + 1092
12 libsystem_pthread.dylib 0x1840d5020 start_wqthread + 4
3)
Thread : Fatal Exception: NSGenericException
0 CoreFoundation 0x23f6a2eb __exceptionPreprocess
1 libobjc.A.dylib 0x23736dff objc_exception_throw
2 CoreFoundation 0x23f69d6d -[NSException name]
3 VectorKit 0x2c923af9 -[VKRasterOverlayTileSource _queueDraw:]
4 VectorKit 0x2c5e74ad -[VKTileSource fetchTileForKey:]
5 VectorKit 0x2c7c512d -[VKTileProvider dirtyTilesFromTileSource:]
6 libdispatch.dylib 0x23b07dd7 _dispatch_call_block_and_release
7 libdispatch.dylib 0x23b07dc3 _dispatch_client_callout
8 libdispatch.dylib 0x23b0c671 _dispatch_main_queue_callback_4CF
9 CoreFoundation 0x23f2cfc5 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
10 CoreFoundation 0x23f2b4bf __CFRunLoopRun
11 CoreFoundation 0x23e7dbb9 CFRunLoopRunSpecific
12 CoreFoundation 0x23e7d9ad CFRunLoopRunInMode
13 GraphicsServices 0x250f7af9 GSEventRunModal
14 UIKit 0x28169fb5 UIApplicationMain
15 MyApp 0x252d44 main (main.swift:12)
16 libdispatch.dylib 0x23b30873 (Missing)
A similar crashlog from my app as the following. From the thread name "com.apple.maps.geogl.renderQueue", I guess that is related with usage of the MapKit framework.
I found the "gpus_ReturnNotPermittedKillClient" in the Technical QA:
"How to fix OpenGL ES application crashes when moving to the background"
https://developer.apple.com/library/archive/qa/qa1766/_index.html
Crashed: com.apple.maps.geogl.renderQueue
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000001
0 libGPUSupportMercury.dylib 0x190a45f08 gpus_ReturnNotPermittedKillClient
1 libGPUSupportMercury.dylib 0x190a46ec4 gpusSubmitDataBuffers
2 VectorKit 0x18c7d1a0c ___ZN3ggl10GLRenderer5frameEPNS_12RenderTargetEPNS_11RenderQueueE_block_invoke + 212
3 libdispatch.dylib 0x181ec94bc _dispatch_call_block_and_release + 24
4 libdispatch.dylib 0x181ec947c _dispatch_client_callout + 16
5 libdispatch.dylib 0x181ed54c0 _dispatch_queue_drain + 864
6 libdispatch.dylib 0x181eccf80 _dispatch_queue_invoke + 464
7 libdispatch.dylib 0x181ed7390 _dispatch_root_queue_drain + 728
8 libdispatch.dylib 0x181ed9934 _dispatch_worker_thread + 124
9 libsystem_pthread.dylib 0x1820e3b28 _pthread_body + 156
10 libsystem_pthread.dylib 0x1820e3a8c _pthread_body + 154
11 libsystem_pthread.dylib 0x1820e1028 thread_start + 4
I use Crashlytics to track crashes and I am seeing some crashes with the stack trace below:
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0xf8560b1c
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x37a20b66 objc_msgSend + 5
1 CoreFoundation 0x2d5f8e8d CFRelease + 560
2 QuartzCore 0x2fad2965 CA::release_objects(X::List<void const*>*) + 16
3 QuartzCore 0x2fad7dcf -[CAAnimation dealloc] + 54
4 libobjc.A.dylib 0x37a30b0b objc_object::sidetable_release(bool) + 174
5 CoreFoundation 0x2d5f8e8d CFRelease + 560
6 QuartzCore 0x2fada419 CA::Layer::run_animation_callbacks(void*) + 240
7 libdispatch.dylib 0x37f0a0af _dispatch_client_callout + 22
8 libdispatch.dylib 0x37f0c9a9 _dispatch_main_queue_callback_4CF + 268
9 CoreFoundation 0x2d6935b1 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
10 CoreFoundation 0x2d691e7d __CFRunLoopRun + 1308
11 CoreFoundation 0x2d5fc471 CFRunLoopRunSpecific + 524
12 CoreFoundation 0x2d5fc253 CFRunLoopRunInMode + 106
13 GraphicsServices 0x323362eb GSEventRunModal + 138
14 UIKit 0x2feb1845 UIApplicationMain + 1136
It looks like CFRelease is being called on some object twice. The problem is I have no idea which animation is causing the crash. The logs aren't very helpful as the crash happens in different places. How do I go about debugging/reproducing this crash or at the very least logging something so that I know what object is being released twice.
I just made some updates to my app, and have been seeing some new crash reports in TestFlight that I can't find much information on online. Can anyone help me interpret what's going on here? It's happening in different places throughout my app, so I don't think it's related to one specific function...
0 MyApp 0x000832b6 testflight_backtrace + 238
1 MyApp 0x00083fa0 TFSignalHandler + 264
2 libsystem_c.dylib 0x35e2be92 _sigtramp + 42
3 libdispatch.dylib 0x3a3c611e _dispatch_call_block_and_release + 10
4 libdispatch.dylib 0x3a3c611e _dispatch_call_block_and_release + 10
5 libdispatch.dylib 0x3a3c54b6 _dispatch_client_callout + 22
6 libdispatch.dylib 0x3a3ca1bc _dispatch_main_queue_callback_4CF$VARIANT$mp + 224
7 CoreFoundation 0x38739f3a __CFRunLoopRun + 1290
8 CoreFoundation 0x386acebc CFRunLoopRunSpecific + 356
9 CoreFoundation 0x386acd48 CFRunLoopRunInMode + 104
10 GraphicsServices 0x36c5d2ea GSEventRunModal + 74
11 UIKit 0x39e7a2f8 UIApplicationMain + 1120
12 MyApp 0x0003078a main (main.m:16)
13 MyApp 0x0003073f start + 39