We testing my app with iPhone 6s/iPhone 6/iPhone 5, no bugs and crash report, but when we submit to iTunesConnect, the App Review team has rejected my app, they said this app crashed on launch.
We can not reproduce this crash, I have no idea what the crash log below means. I would be really happy if anybody could explain me what this crash log could relate to and how I could solve it. Many many thanks to all those who are willing to help others.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Filtered syslog:
2015-02-05 06:00:28.268 chuanBang[993]: <Error> assertion failed: 12B411: libxpc.dylib + 51955 [04694BEB-256F-3132-A00F-0C82B79BC689]: 0x7d
2015-02-05 06:00:29.105 chuanBang[993]: <Error> SecTrustEvaluate [leaf AnchorTrusted]
2015-02-05 06:00:29.517 chuanBang[993]: <Error> CoreLocation: Could not get ideal gyro update interval, assuming 0.005000 s
2015-02-05 06:00:30.615 chuanBang[993]: <Warning> Attempting to badge the application icon but haven't received permission from the user to badge the application
2015-02-05 06:00:30.619 chuanBang[993]: <Warning> 请求失败了
2015-02-05 06:00:30.623 chuanBang[993]: <Warning> 请求失败了
Last Exception Backtrace:
(0x26988d62 0x342bfc72 0x26988ca8 0x2c3084 0x3499b096 0x349a0d0e 0x348c0934 0x33acdbb8 0x33ae4e30 0x33ae48b4 0x342bfdba 0x2689aa18 0x2689a78e 0x2dd4c04c 0x29e8c97c 0x1b2a1a 0x3485baaa)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x34920dfc 0x3490c000 + 85500
1 libsystem_pthread.dylib 0x349a0d0e 0x3499d000 + 15630
2 libsystem_c.dylib 0x348c0934 0x34877000 + 301364
3 libc++abi.dylib 0x33acdbb8 0x33acd000 + 3000
4 libc++abi.dylib 0x33ae4e30 0x33acd000 + 97840
5 libc++abi.dylib 0x33ae4ee6 0x33acd000 + 98022
6 libc++abi.dylib 0x33ae4b9c 0x33acd000 + 97180
7 libc++abi.dylib 0x33ae4e44 0x33acd000 + 97860
8 libc++abi.dylib 0x33ae48b4 0x33acd000 + 96436
9 libobjc.A.dylib 0x342bfdba 0x342b9000 + 28090
10 CoreFoundation 0x2689aa18 0x26881000 + 104984
11 CoreFoundation 0x2689a78e 0x26881000 + 104334
12 GraphicsServices 0x2dd4c04c 0x2dd43000 + 36940
13 UIKit 0x29e8c97c 0x29e1e000 + 452988
14 chuanBang 0x001b2a1a 0xad000 + 1071642
15 libdyld.dylib 0x3485baac 0x3485a000 + 6828
The crash log itself is not useful. I suggest integrating a crash reporting SDK into your app and when a crash does happen, it will give you a lot more info than you're currently getting.
Some crash reporters to look over:
Crashlytics
HockeyApp
Once you have one of these integrated into your app, submit the app again to Apple (If you cannot reproduce the error) and if it crashes their side, you'll have a much better idea where the issue is.
I think whenever you are testing your app at that time you always allow for Notification permission Popup & Location service permission popup.
Please try by click "Don't allow" when these popup are show.
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.
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.
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 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've received crash report on my submitted iOS app from apple, which is:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 APPNAME 0x00071fc8 0x6d000 + 20424
1 APPNAME 0x000733ce 0x6d000 + 25550
2 APPNAME 0x00072cc0 0x6d000 + 23744
3 Foundation 0x354cd2ee 0x354bb000 + 74478
.....
14 CoreFoundation 0x3707bebc 0x37073000 + 36540
15 CoreFoundation 0x3707bdc4 0x37073000 + 36292
GraphicsServices 0x36835418 0x36831000 + 17432
17 GraphicsServices 0x368354c4 0x36831000 + 17604
18 UIKit 0x35f25d62 0x35ef7000 + 191842
19 UIKit 0x35f23800 0x35ef7000 + 182272
20 APPNAME 0x0006ed46 0x6d000 + 7494
21 APPNAME 0x0006ed10 0x6d000 + 7440
I've also been looking at atos command and dwarfdump. I have both .dsym and the .app that was submitted to apple. However, I couldn't find a thing using the memory address given by apple (ex. 0x0006ed46, 0x00071fc8, etc. ). I tried randomizing address and found that my application address is actually between 0x0002xxx to 0x0007xxx
What happened? How can I know which part of my application causes the bug?
Best Regards,
You need to symbolicate your crash report using the dsym file. You can see the answer here:
Symbolicating iPhone App Crash Reports