I usually develop in higher level languages like Javascript and Python , so I am not that experienced when it comes to reading lower level stack traces. I am building an iOS app with React Native and my app sometimes unexpectedly crashes. Reading the crash log this is what I get:
Incident Identifier: B03D5F95-EFD1-4FEB-AE18-C8EFEF273E53
CrashReporter Key: 6049c1cc93a2e0163265631aa6cc2fd30a1af6e7
Hardware Model: iPhone7,2
Process: MyApp [24268]
Path: /private/var/containers/Bundle/Application/99B2B9A1-D266-4222-A083-84C4CFFCE182/MyApp.app/MyApp
Identifier: org.mycompany.MyApp
Version: 1 (1.0)
Code Type: ARM-64 (Native)
Role: Non UI
Parent Process: launchd [1]
Coalition: org.mycompany.MyApp [3119]
Date/Time: 2019-03-04 14:20:18.4924 +0800
Launch Time: 2019-03-04 14:09:15.2536 +0800
OS Version: iPhone OS 11.0.3 (15A432)
Baseband Version: 6.17.00
Report Version: 104
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace <0xF>, Code 0x8badf00d
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000180a60bc4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000180a60a3c mach_msg + 72
2 BackBoardServices 0x00000001835d0de0 _BKSHIDGetCurrentDisplayBrightness + 112
3 BackBoardServices 0x00000001835de9cc BKSDisplayBrightnessGetCurrent + 32
4 FrontBoardServices 0x00000001835fffc0 -[FBSUIApplicationSystemService currentBacklightLevel] + 12
5 UIKit 0x000000018a8a3d44 -[UIDevice _backlightLevel] + 44
6 UIKit 0x000000018a8aced4 -[UIScreen _postBrightnessDidChangeNotificationIfAppropriate] + 168
7 CoreFoundation 0x0000000180efa12c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
8 CoreFoundation 0x0000000180efa090 ___CFXRegistrationPost_block_invoke + 64
9 CoreFoundation 0x0000000180f1016c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
10 CoreFoundation 0x0000000180f0fa3c __CFRunLoopDoBlocks + 288
11 CoreFoundation 0x0000000180f0dca4 __CFRunLoopRun + 2436
12 CoreFoundation 0x0000000180e2e2d8 CFRunLoopRunSpecific + 436
13 GraphicsServices 0x0000000182cbff84 GSEventRunModal + 100
14 UIKit 0x000000018a3db880 UIApplicationMain + 208
15 MyApp 0x00000001005833d4 main + 29652 (main.m:14)
16 libdyld.dylib 0x000000018095256c start + 4
How/where do I begin reading thsi crash log? I believe it has something to do with mach_msg_trap but I haven't been able to find anything about it. For some context, my app is an app which tracks the users Geolocation with background geolocation tracking. I am unable to figure out what causes the crash.
See TN2141: Understanding and Analyzing Application Crash Reports, which says:
The exception code 0x8badf00d indicates that an application has been terminated by iOS because a watchdog timeout occurred. The application took too long to launch, terminate, or respond to system events. ... Whatever operation is on Thread 0 needs to be moved to a background thread, or processed differently, so that it does not block the main thread.
Are you doing anything that could be blocking the main thread for any prolonged period of time?
Have you add Privacy - Location in info.plist?
Something like that.
<key>NSLocationAlwaysUsageDescription</key>
<string>Why you need track location?</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Why you need track location?</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Why you need track location?</string>
And I see you work with background geolocation tracking. Have you turn on Background Modes in Capabilities?
If not just add Privacy turn on Background Modes and try again.
Related
I've tested my apps with all sort of iOs version and result is working fine on those devices. But when I published to App Store, they rejected that app is crashed on launch. I cannot convince why app is crashed on their phone even I've tested with same iOs version.
Please let me know, how to solve that issue and I've attached error logs.
{"app_name":"CakeApp","timestamp":"2017-08-10 06:54:09.29 -0700","app_version":"3","slice_uuid":"ba63de93-382a-3879-933d-e584d00cb7aa","adam_id":1233988265,"build_version":"1.2","bundleID":"com.ppshein.CakeApp","share_with_app_devs":false,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 10.3.3 (14G60)","incident_id":"81B4B45E-ACB0-4305-81BE-B88E4E257238","name":"CakeApp"}
Incident Identifier: 81B4B45E-ACB0-4305-81BE-B88E4E257238
CrashReporter Key: 318083a7319cbe05fd01b4c953a58aebe938f998
Hardware Model: xxx
Process: CakeApp [5822]
Path: /private/var/containers/Bundle/Application/126924F1-2DBF-4F12-8355-1C5787680F75/CakeApp.app/CakeApp
Identifier: com.ppshein.CakeApp
Version: 1.2 (3)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.ppshein.CakeApp [1034]
Date/Time: 2017-08-10 06:54:09.0262 -0700
Launch Time: 2017-08-10 06:54:06.9573 -0700
OS Version: iPhone OS 10.3.3 (14G60)
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001002749c8
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 CakeApp 0x00000001002749c8 0x100098000 + 1952200
1 CakeApp 0x000000010026dca4 0x100098000 + 1924260
2 UIKit 0x00000001930eae48 0x19306a000 + 527944
3 UIKit 0x00000001932f737c 0x19306a000 + 2675580
4 UIKit 0x00000001932fce24 0x19306a000 + 2698788
5 UIKit 0x00000001933118b0 0x19306a000 + 2783408
6 UIKit 0x00000001932fa0b8 0x19306a000 + 2687160
7 FrontBoardServices 0x000000018eaf8884 0x18eabe000 + 239748
8 FrontBoardServices 0x000000018eaf86f0 0x18eabe000 + 239344
9 FrontBoardServices 0x000000018eaf8aa0 0x18eabe000 + 240288
10 CoreFoundation 0x000000018cefd42c 0x18ce22000 + 898092
11 CoreFoundation 0x000000018cefcd9c 0x18ce22000 + 896412
12 CoreFoundation 0x000000018cefa9a8 0x18ce22000 + 887208
13 CoreFoundation 0x000000018ce2ada4 0x18ce22000 + 36260
14 UIKit 0x00000001930e3fc8 0x19306a000 + 499656
15 UIKit 0x00000001930dec9c 0x19306a000 + 478364
16 CakeApp 0x00000001000a5e3c 0x100098000 + 56892
17 libdyld.dylib 0x000000018be3959c 0x18be35000 + 17820
Did you test your app in a clean environment? Uninstall the app and delete all of its data and then install again.
You can try to resolve the crash by symbolicating the stack trace, as described in this technical note from Apple, which can help you identify the part of your code that crashed.
We have a lot of users, but just a couple have this issue. The App crashes right after starting. Both Bitcode and ATS are disabled. What could be causing this issue? Thank you
Hardware Model: iPhone9,3
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Date/Time: 2017-05-16 18:05:01.2852 -0400
Launch Time: 2017-05-16 18:04:57.4399 -0400
OS Version: iPhone OS 10.3.1 (14E304)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000010
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
SecKeyGetBlockSize + 0 (SecKey.c:696)
WLCertManager signData:privateKey:] + 276 (WLCertManager.m:525)
[WLDeviceAuthManager signDeviceAuth:entity:isPEnabled:] + 1168 (WLDeviceAuthManager.m:173)
[BaseProvisioningChallengeHandler onDeviceAuthDataReady:] + 172 (BaseProvisioningChallengeHandler.m:162)
[BaseDeviceAuthChallengeHandler getDeviceAuthDataAsync:] + 1308 (BaseDeviceAuthChallengeHandler.m:58)
[BaseProvisioningChallengeHandler handleChallenge:] + 1040 (BaseProvisioningChallengeHandler.m:138)
[WLRequest startHandleChallenges:httpRequest:]_block_invoke + 484 (WLRequest.m:606)
[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 136 (NSDictionary.m:680)
[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 180 (NSDictionary.m:692)
[WLRequest startHandleChallenges:httpRequest:] + 256 (WLRequest.m:598)
[WLRequest requestFailed:error:] + 604 (WLRequest.m:505)
[WLAFHTTPRequestOperationManagerWrapper requestFailed:error:] + 2020 (WLAFHTTPRequestOperationManagerWrapper.m:396)
[WLAFHTTPRequestOperationManagerWrapper start]_block_invoke229 + 112 (WLAFHTTPRequestOperationManagerWrapper.m:340)
[WLAFHTTPRequestOperation setCompletionBlockWithSuccess:failure:]_block_invoke42 + 112 (WLAFHTTPRequestOperation.m:141)
dispatch_call_block_and_release + 24 (init.c:963)
_dispatch_main_queue_callback_4CF + 444 (inline_internal.h:2417)
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1793)
__CFRunLoopRun + 1572 (CFRunLoop.c:3004)
CFRunLoopRunSpecific + 424 (CFRunLoop.c:3113)
GSEventRunModal + 100 (GSEvent.c:2245)
UIApplicationMain + 208 (UIApplication.m:4089)
main + 200 (main.swift:12)
libdyld.dylib 0x000000018eeb559c start + 4
Full log here https://drive.google.com/open?id=0B1GqBSG2XUgZYmhJVGFRakFtWUU
It looks like it is happening when we are doing
private lazy var client: WLClient = WLClient.sharedInstance()
self.client.wlConnectWithDelegate(SomeDelegate)
MFP version is = 7.1-2016/07/11
EXC_BAD_ACCESS is caused by a null pointer reference. I have seen this before when wlConnectWithDelegate was being called more than once.
I would try to use Swift's dispatch_once_t singleton like this:
var token: dispatch_once_t = 0
dispatch_once(&token) {
//Make sure you register all challenge handlers then connect
WLClient.sharedInstance().wlConnectWithDelegate(SomeDelegate)
}
The exception looks like a keychain access error in MobileFirst SDK. MobileFirst does not support background mode in 7.1. Please make sure your app is not trying run MobileFirst connect APIs from background.Also make sure "KeyChain Sharing" is enabled in Targets->Capabilities.
The issue is fixed and published for MobileFirst 7.1
My Objective-C application is using a 3rd party VoIP SDK. I found the application crashes if left running overnight. The crash only happens if I enable the SDK, so I strongly suspect it causes the crash.
The library is a static library (.a extension). I tried catching the exception using try-catch block, and NSSetUncaughtExceptionHandler, but it didn't work. I suspect those methods only work with Objective-C exceptions, and the SDK is written in native C?
Is it possible to catch a 3rd party native C exception? I'm fine with any kind of hacks, since this will not be going into production code. Just trying to get to the bottom of the issue.
EDIT:
Here's the crash log:
Hardware Model: iPad5,1
Version: 0.14 (6.0)
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Date/Time: 2016-11-22 08:24:59.7336 -0500
Launch Time: 2016-11-21 13:45:09.9956 -0500
OS Version: iPhone OS 10.1.1 (14B100)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Filtered syslog:
None found
Last Exception Backtrace:
(0x18953e1c0 0x187f7855c 0x18953e108 0x18f89359c 0x18f6f4444 0x18f4c653c
0x18f391d48 0x18f391c78 0x18f44bb10 0x18f44aec0 0x18f44a90c 0x18f44a4c0
0x18f44a424 0x18f38f220 0x18c84f188 0x18c843e64 0x18c843d24 0x18c7c07ec
0x18c7e7c58 0x18c7e8678 0x1894eb7dc 0x1894e940c 0x1894e989c 0x189418048
0x18ae9e198 0x18f3fd2fc 0x18f3f8034 0x10002304c 0x1883fc5b8)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x000000018850e014 0x1884ef000 + 126996
1 libsystem_pthread.dylib 0x00000001885d6450 0x1885d1000 + 21584
2 libsystem_c.dylib 0x00000001884823e0 0x18841f000 + 406496
3 libc++abi.dylib 0x0000000187f4d2d4 0x187f4c000 + 4820
4 libc++abi.dylib 0x0000000187f6acc0 0x187f4c000 + 126144
5 libobjc.A.dylib 0x0000000187f78844 0x187f70000 + 34884
6 libc++abi.dylib 0x0000000187f6766c 0x187f4c000 + 112236
7 libc++abi.dylib 0x0000000187f67234 0x187f4c000 + 111156
8 libobjc.A.dylib 0x0000000187f7871c 0x187f70000 + 34588
9 CoreFoundation 0x00000001894180bc 0x18940f000 + 37052
10 GraphicsServices 0x000000018ae9e198 0x18ae92000 + 49560
11 UIKit 0x000000018f3fd2fc 0x18f382000 + 504572
12 UIKit 0x000000018f3f8034 0x18f382000 + 483380
13 Remote 0x000000010002304c 0x100008000 + 110668
14 libdyld.dylib 0x00000001883fc5b8 0x1883f8000 + 17848
That isn't a catchable exception, that is a hard crash. And, specifically, it is a purposeful crash; something on the main thread decided things had gone badly enough that it called abort().
So, no, nothing you can do to catch it and it isn't even clear that the crash is triggered by the 3rd party library, given that crash log.
I am unable to find the reason of the crash. I know that the user was signing on to Game Centre. However, this was followed by the user starting to play 'MyApp'. I still can't find the error. I have read Apple tech doc and the 2010 video. Still unable to find the problem. Please help.
Incident Identifier: D3A80086-855D-400D-8102-7D08D04C2A4D
CrashReporter Key: 6b4377c06adbfe5d64bfb9dd348bd73e93859214
Hardware Model: iPhone5,4
Process: MyApp [280]
Path: /private/var/mobile/Containers/Bundle/Application/D5470DBE-1FF8-4E06-946B-910AD698DD2D/MyApp.app/MyApp
Identifier: MyApp
Version: 4 (4.86)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2015-12-26 01:10:15.15 +0400
Launch Time: 2015-12-26 01:06:30.30 +0400
OS Version: iOS 9.2 (13C75)
Report Version: 105
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000000e7ffdefe
Triggered by Thread: 0
Filtered syslog:
None found
Breadcrumb Trail: (reverse chronological seconds)
6 logging-started
6 GC TBG: lookForEvent
224 GC Framework: startAuthenticationForExistingPrimaryPlayer
Global Trace Buffer (reverse chronological seconds):
6.978571 GameCenterFoundation 0x000000002eb776e1 callAuthHandlerWithError:Setting the Authentication Handler
6.989052 GameCenterFoundation 0x000000002eb886f5 GKMatchMaker: lookForInvite
6.989130 GameCenterFoundation 0x000000002ebb05d9 updateNearbyAdvertising
6.989130 GameCenterFoundation 0x000000002eb88485 finishedAuthenticating: Starting nearby Advertising and looking for invites
6.989724 GameCenterFoundation 0x000000002eb87f49 GKMatchmaker: loadConnectivitySettingsWithCompletionHandler
6.990383 GameCenterFoundation 0x000000002eb77663 Calling AuthenticationHandlerWithError: 0
7.056258 GameCenterUI 0x000000002f8067fd authenticationDidCompleteWithError:Local Player Authenticated, showing Welcome Banner
7.056258 GameCenterUI 0x000000002f8065f7 authenticationDidCompleteWithError being called
214.506726 GameCenterUI 0x000000002f8074e3 authenticationShowSignInUIForLocalPlayer:Showing sign in view controller
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 MyApp 0x000e8160 0xce000 + 106848
1 GameCenterFoundation 0x2ebc92c4 __39-[GKDispatchGroup notifyOnQueue:block:]_block_invoke53 + 12
2 libdispatch.dylib 0x228abdd6 _dispatch_call_block_and_release + 10
3 libdispatch.dylib 0x228abdc2 _dispatch_client_callout + 22
4 libdispatch.dylib 0x228b0670 _dispatch_main_queue_callback_4CF + 1532
5 CoreFoundation 0x22cd0fc4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
6 CoreFoundation 0x22ccf4be __CFRunLoopRun + 1590
7 CoreFoundation 0x22c21bb8 CFRunLoopRunSpecific + 516
8 CoreFoundation 0x22c219ac CFRunLoopRunInMode + 108
9 GraphicsServices 0x23e9baf8 GSEventRunModal + 160
10 UIKit 0x26f0dfb4 UIApplicationMain + 144
11 MyApp 0x000daa08 0xce000 + 51720
12 libdyld.dylib 0x228d4872 start + 2
I have this exactly same problem.
The apple reviewer report to check if my app is IPv6 compatible.
I reply him that my app use only Game Center to communicate, if this is a IPv6 problem, this should be a Game Center problem.
Anyway, in my experience, testing my app, this only happened when I change from Main Menu to Game Mode menu when the "Game Center Authentication Banner" is opened.
My game is developed in SceneKit and the menus are developed using SpriteKit inside the SceneView on Overlay layer.
To switch menus, I just change the SKScene in SceneView.
I have developed an iPad application using Xcode 6.3.2.
I submitted my application to the App Store for review where it was reject due to crash.Following is the crash report from iTunes.
Incident Identifier: 88DD7F94-3382-4241-A0D7-C3E7F6D20737
CrashReporter Key: 9881ae0cc3b3fbfccfd0ce1496d2fa08fec08782
Hardware Model: xxx
Path: /private/var/mobile/Containers/Bundle/Application/FDBBD67F-0EF7-43FB-80CB-8308A10A2D29/Vehicle Visuals.app/Vehicle Visuals
Identifier: com.vehiclevisuals.Vehicle-Visuals
Version: 2.0.0 (1.1.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2015-06-12 12:33:57.988 -0700
Launch Time: 2015-06-12 12:22:14.581 -0700
OS Version: iOS 8.3 (12F69)
Report Version: 105
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x0000000195da7bdc 0x195d8c000 + 113628
1 QuartzCore 0x00000001889fdc2c 0x1889ec000 + 72748
2 Vehicle Visuals 0x0000000100126828 0x1000ec000 + 239656
3 Vehicle Visuals 0x0000000100101e80 0x1000ec000 + 89728
4 UIKit 0x0000000189118778 0x1890a4000 + 477048
5 UIKit 0x0000000189116750 0x1890a4000 + 468816
6 UIKit 0x0000000189112000 0x1890a4000 + 450560
7 UIKit 0x00000001890b175c 0x1890a4000 + 55132
8 QuartzCore 0x00000001889f9e18 0x1889ec000 + 56856
9 QuartzCore 0x00000001889f4880 0x1889ec000 + 34944
10 QuartzCore 0x00000001889f4724 0x1889ec000 + 34596
11 QuartzCore 0x00000001889f3eb8 0x1889ec000 + 32440
12 QuartzCore 0x00000001889f3c38 0x1889ec000 + 31800
13 UIKit 0x0000000189137f8c 0x1890a4000 + 606092
14 UIKit 0x0000000189137ef0 0x1890a4000 + 605936
15 CoreFoundation 0x000000018462c2a0 0x18454c000 + 918176
16 CoreFoundation 0x000000018462922c 0x18454c000 + 905772
17 CoreFoundation 0x000000018462955c 0x18454c000 + 906588
18 CoreFoundation 0x00000001845552d0 0x18454c000 + 37584
19 GraphicsServices 0x000000018dc436f8 0x18dc38000 + 46840
20 UIKit 0x000000018911afa8 0x1890a4000 + 487336
21 Vehicle Visuals 0x000000010013a1cc 0x1000ec000 + 319948
22 libdyld.dylib 0x0000000196412a04 0x196410000 + 10756
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
As per the report it crashes on OS Version : iOS 8.3 (12F69).
I tested my app on the all simulators(iPad Air, iPad 2, iPad Retina) with same config(iOS version 8.3 (12F69)) and also tested it on my device (iPad mini) with iOS version 8.3 (12F69), but didn't crashed on my side.
But it crashes on my friend's iPad Air with same iOS version (it gives the same crash report with different invalid address as below)
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype:
KERN_INVALID_ADDRESS at 0x0000000000000020 Triggered by Thread: 0
I don't have the iPad Air so that I could debug using the device.
I also tried to Symbolicated crash report using following command.
xcrun atos -o VehicleVisuals 0x0000000000000020
But it just gives me following hex code.
0x00000020 (in VehicleVisuals)
I following Link for symbolication.
I'm just not being able to recognise where actually is the crash issue.
Please can anybody help me out?
EXC_BAD_ACCESS usually happens because you are sending an Obj-C message to an invalid memory address, what means that you probably are trying to access some deallocated object.
It may be working on other devices because this object is not being released at the same time.
I recently had a similar crash that happened because there was a timer not being invalidated on dealloc, and when the target method was called, that object did no longer exist.
You could try to enable NSZombie objects and see if you find which object is being deallocated. In xCode 6, you can enable them in Product > Scheme > Edit scheme > Diagnostics > Enable Zombie Objects.
Also, there are lots of these kind of errors that NSZombieEnabled can't detect. Unfortunately there is nothing magical to solve it. The second option would be to run your app with instruments (memory leaks specifically) and see if you can get something. If this doesn't work you will have to review your code and check that there are no possibilities that you are trying to access a deallocated object. Hope it helps.
Good luck!