Currently I have an iOS app which I plan to release for beta testing. My problem is that the app will not run as after 2 seconds or so after the app has shown the GameScene.swift SKScene, it crashes and it keeps on repeating.
I have compiled the app via Xcode 7.3 in both Release and Debug configurations. I have analysed the project, cleaned it, uninstalled it, reinstalled it, restored my device etc. But nothing changes. This unexpected crash only happens when the app is run via TestFlight. I will attach below the log from the crashes. I have tried to symbolicate the crash but it just shows up the original log file.
Incident Identifier: 408B1212-4AE8-42E2-905F-D4567D5030AD
CrashReporter Key: 4c7013cab29b9011557c3005550950488452cc04
Hardware Model: xxx
Process: Number Tap [2226]
Path: /private/var/containers/Bundle/Application/69833BAF-AD19-4FAF-BB95-E766A493D525/Number Tap.app/Number Tap
Identifier: com.flatboxstudio.numbertap
Version: 2 (1.0.1)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2016-03-29 18:44:31.31 -0700
Launch Time: 2016-03-29 18:44:31.31 -0700
OS Version: iOS 9.3 (13E233)
Report Version: 105
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000100046724
Triggered by Thread: 0
Filtered syslog:
None found
Breadcrumb Trail: (reverse chronological seconds)
0 GC Framework: startAuthenticationForExistingPrimaryPlayer
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 Number Tap 0x0000000100046724 0x10000c000 + 239396
1 libdispatch.dylib 0x000000018200d4bc 0x18200c000 + 5308
2 libdispatch.dylib 0x000000018200d47c 0x18200c000 + 5244
3 libdispatch.dylib 0x0000000182012b84 0x18200c000 + 27524
4 CoreFoundation 0x0000000182578dd8 0x182498000 + 921048
5 CoreFoundation 0x0000000182576c40 0x182498000 + 912448
6 CoreFoundation 0x00000001824a0d10 0x182498000 + 36112
7 GraphicsServices 0x0000000183d88088 0x183d7c000 + 49288
8 UIKit 0x000000018776df70 0x1876f0000 + 515952
9 Number Tap 0x0000000100046bdc 0x10000c000 + 240604
10 libdyld.dylib 0x000000018203e8b8 0x18203c000 + 10424
Activity ID: 0x0000000000043e33
Activity Name: starting resolver activity
Activity Image Path: /usr/lib/system/libsystem_network.dylib
Activity Image UUID: A1D92752-ABF1-3834-9EBB-FE35E00EB642
Activity Offset: 0x0003333c
Activity Running Time: 0.468516 sec
Trace Messages (reverse chronological seconds):
0.292098 GameCenterFoundation 0x000000019066a20c authenticateWithCompletionHandler:Username and Password passed in. GKDaemonProxy to authenticate player
0.296164 CFNetwork 0x0000000204da9da8 Format not found
0.300431 CFNetwork 0x0000000204da9da8 Format not found
0.301584 CFNetwork 0x0000000204da9da8 Format not found
0.301623 CFNetwork 0x0000000182c493a8 TCP Conn 0x146553ea0 started
0.305076 CFNetwork 0x0000000182ca3ce8 Creating default cookie storage with default identifier
0.305077 CFNetwork 0x0000000182ca3cb4 Faulting in CFHTTPCookieStorage singleton
0.305077 CFNetwork 0x0000000182cf5e44 Faulting in NSHTTPCookieStorage singleton
I removed some of the log as I felt it may be unimportant. I have read apples guide on resolving this but still not resolved.I will be truly grateful if anybody could help me out. If you need any extra code, logs or information don't hesitate to ask. (The whole log was quite long so I cropped some information out.)
Related
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.
this was apple's message
14.3 Details
Your app enables the display of user-generated content but does not
have the required precautions in place.
Next Steps
It is necessary that you put all of the following precautions in
place:
Require that users agree to terms (EULA) and these terms must make it clear that there is no tolerance for objectionable content
Use moderators to flag and remove inappropriate content and offensive users
Users need a mechanism to flag objectionable content and report users generating this content
Users need a mechanism to block abusive users
Developer must act on objectionable content reports within 24 hours by removing the content and ejecting the user who provided the
offending content
Developer needs a method for ejecting users who violate the terms of the EULA
2.1 Details
During review, your app crashed on iPad running iOS 9.3.1 and iPhone
running iOS 9.3.1 when we:
Tap "..." On a post
This occurred when your app was used:
- Offline
- On Wi-Fi
- On cellular network
my app has a privacy policy & terms of service. also it has a more button which you can report things in it.. its the "..." button that crashes
the thing is it never crashed while trying it on multiple devices iPhones and iPads! i don't get why it keeps being rejected!
first time i sent it without terms of service but now i added it and resent it. but it got rejected again!
the crash log they sent is
Version: 1.1 (1.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2016-04-14 19:54:17.17 -0700
Launch Time: 2016-04-14 19:53:55.55 -0700
OS Version: iOS 9.3.1 (13E238)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
(0x182c06e38 0x18226bf80 0x188695288 0x1880a9ec0 0x1880a7fd8 0x187ffafd8 0x188008990 0x187d3a4a4 0x182bbc7b0 0x182bba554 0x182bba984 0x182ae4d10 0x1843cc088 0x187db1f70 0x10011ccb0 0x1826828b8)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001827a011c 0x182784000 + 114972
1 libsystem_pthread.dylib 0x000000018286cef8 0x182868000 + 20216
2 libsystem_c.dylib 0x0000000182711dac 0x1826b0000 + 400812
3 libc++abi.dylib 0x00000001822453f4 0x182244000 + 5108
4 libc++abi.dylib 0x0000000182261e98 0x182244000 + 122520
5 libobjc.A.dylib 0x000000018226c248 0x182264000 + 33352
6 libc++abi.dylib 0x000000018225ef44 0x182244000 + 110404
7 libc++abi.dylib 0x000000018225eb10 0x182244000 + 109328
8 libobjc.A.dylib 0x000000018226c120 0x182264000 + 33056
9 CoreFoundation 0x0000000182ae4db8 0x182adc000 + 36280
10 GraphicsServices 0x00000001843cc088 0x1843c0000 + 49288
11 UIKit 0x0000000187db1f70 0x187d34000 + 515952
12 iFandoms 0x000000010011ccb0 0x1000c0000 + 380080
13 libdyld.dylib 0x00000001826828b8 0x182680000 + 10424
this is just a part of it.. still it never crashed while i was testing it! please help me! my mind is gonna explode!
Ok so it turns out its a slight problem with the alert controller.. added some code and it worked!
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!
I have already done some research on identifying crash logs but couldn't find solution:
Here are my references:
http://www.raywenderlich.com/23704/demystifying-ios-application-crash-logs
http://developer.apple.com/library/ios/#qa/qa1747/_index.html
How to view crash report on xcode 4.2
I do come to know that it is because of Memory Issue but how to find that particular? In my project there are 200 files also there are 4-5 third party libraries are being used.
Here is crash log:
Incident Identifier: BD0F0F41-C60A-4D9C-8386-1B10796CF835
CrashReporter Key: 43c75986a25cae4226726a78b4bf5b543ab87caa
Hardware Model: iPad3,3
Process: BLSOffline [10824]
Path: /var/mobile/Applications/54AAF195-FD1D-4426-BC20-939662ECC56B/BLSOffline.app/BLSOffline
Identifier: BLSOffline
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-07-12 15:24:05.680 +0530
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000013
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3aadd526 0x3aad8000 + 21798
1 BLSOffline 0x000dbb6a 0xc8000 + 80746
2 CoreFoundation 0x32c3f9c0 0x32b7a000 + 809408
3 CoreFoundation 0x32b96fe6 0x32b7a000 + 118758
4 Foundation 0x335530f0 0x334a2000 + 725232
5 CoreFoundation 0x32c11680 0x32b7a000 + 620160
6 CoreFoundation 0x32c10f7a 0x32b7a000 + 618362
7 CoreFoundation 0x32c0fcb2 0x32b7a000 + 613554
8 CoreFoundation 0x32b82eb8 0x32b7a000 + 36536
9 CoreFoundation 0x32b82d44 0x32b7a000 + 36164
10 GraphicsServices 0x367372e6 0x36732000 + 21222
11 UIKit 0x34a982fc 0x34a41000 + 357116
12 BLSOffline 0x000db5fe 0xc8000 + 79358
13 libdyld.dylib 0x3af17b1c 0x3af16000 + 6940
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x3afce648 0x3afcd000 + 5704
1 libdispatch.dylib 0x3aefe974 0x3aef6000 + 35188
2 libdispatch.dylib 0x3aefe654 0x3aef6000 + 34388
Thread 2 name: WebThread
Thread 3 name: JavaScriptCore::BlockFree
Thread 4 name: JavaScriptCore::Marking
Thread 5 name: com.apple.NSURLConnectionLoader
Thread 6 name: WebCore: CFNetwork Loader
Thread 7 name: WebCore: LocalStorage
Thread 8 name: com.apple.CFSocket.private
Thread 9 name: com.apple.coremedia.player.async
Thread 10 name: com.apple.coremedia.player.remote
Please let me know how to find cause out of this.
If my application is crashing at random point of times, still can it be possible to upload on AppStore? Will Apple allow such application?
Edit: The major problem is application is not crashing over simulator, it does only on devices. Also on device, when we debug the app, it crashes on curl library code, which is working fine since first day. Then how come sudden crash occurs in application?
If your application is crashing randomly then you need to analyze your code. That you can do in XCode only.Open your Project in XCode and in Product menu you will find the Analyze option (cmd+shift+B) .make sure you have selected "iOS Device" before analyzing it.
other than this you can use the this link:
http://www.raywenderlich.com/23037/how-to-use-instruments-in-xcode
apple will not accept your app if it is crashing.
No, Apple will probably get the crash too and reject your app (it's a risk).
About the crash, it's hard to say, you'll have to run the app from XCode and check there where the crash was.
If it's a memory issue, profile the app from XCode and you'll see there which component is crashing.