My app is rejected with Exception EXC_BREAKPOINT (SIGTRAP) - ios

I tested my app on iPhone and iPad devices and it works fine, also I tested it on iOS 10.1.1 and on IPV6 network and it also works fine but after uploading my app to the app store, it is rejected because it crashes when login if the device is offline or on Wifi. They gave me a crash report and after I symplocited it, I get thhis Info :
Date/Time: 2016-11-01 10:07:03.2150 -0700
Launch Time: 2016-11-01 10:05:21.7124 -0700
OS Version: iPhone OS 10.1 (14B72)
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000f18c0
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [0]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 MyApp -[FIRMessagingSecureSocket closeStream:] (in MyApp) + 56
1 MyApp -[FIRMessagingRmq2PersistentStore openDatabase:] (in MyApp) + 228
2 MyApp -[FIRMessagingReceiver didSendDataMessageWithID:] (in MyApp) + 128
3 Foundation 0x00000001835e08f8
4 CoreFoundation 0x0000000182aa48f4
5 CoreFoundation 0x0000000182aa4608
6 CoreFoundation 0x0000000182aa3ec4
7 CoreFoundation 0x0000000182aa1ac0
8 CoreFoundation 0x00000001829d0048
9 GraphicsServices 0x0000000184456198
10 UIKit 0x00000001889b42fc
11 UIKit 0x00000001889af034
12 MyApp -[FIRMessagingClient tryToConnect] (in MyApp) + 212
13 libdyld.dylib 0x00000001819b45b8
update :
I published new version put also get this crash log
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000a1658
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 MyApp [FIRAMeasurement setUserAttributeOnWorkerQueue:] (in MyApp) + 580
1 MyApp [FIRAMeasurement uploadData] (MyApp) + 180 0x100054000 + 303808
2 MyApp [FIRAMeasurement reportOSUpdateOnWorkerQueue] (in PetCasa Vet) + 124
3 Foundation 0x0000000187acc8f8 0x1879c1000 + 1095928
4 CoreFoundation 0x0000000186f908f4 0x186eb3000 + 907508
5 CoreFoundation 0x0000000186f90608 0x186eb3000 + 906760
6 CoreFoundation 0x0000000186f8fec4 0x186eb3000 + 904900
7 CoreFoundation 0x0000000186f8dac0 0x186eb3000 + 895680
8 CoreFoundation 0x0000000186ebc048 0x186eb3000 + 36936
9 GraphicsServices 0x0000000188942198 0x188936000 + 49560
10 UIKit 0x000000018cea02fc 0x18ce25000 + 504572
11 UIKit 0x000000018ce9b034 0x18ce25000 + 483380
12 MyApp 0x00000001000907d8 (in MyApp) + 448
13 libdyld.dylib 0x0000000185ea05b8 0x185e9c000 + 17848
and this log crash :
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000e5658
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 MyApp 0x00000001000e5658 (in MyApp) + 1060
1 MyApp [FIRMessagingConnection loginRequestWithToken:authID:] (in MyApp) + 300
2 MyApp [FIRMessagingConnection initWithAuthID:token:host:port:runLoop:rmq2Manager:gcmManager:] (in MyApp) + 32
3 Foundation 0x0000000187acc8f8 0x1879c1000 + 1095928
4 CoreFoundation 0x0000000186f908f4 0x186eb3000 + 907508
5 CoreFoundation 0x0000000186f90608 0x186eb3000 + 906760
6 CoreFoundation 0x0000000186f8fec4 0x186eb3000 + 904900
7 CoreFoundation 0x0000000186f8dac0 0x186eb3000 + 895680
8 CoreFoundation 0x0000000186ebc048 0x186eb3000 + 36936
9 GraphicsServices 0x0000000188942198 0x188936000 + 49560
10 UIKit 0x000000018cea02fc 0x18ce25000 + 504572
11 UIKit 0x000000018ce9b034 0x18ce25000 + 483380
12 MyApp [FIRInstanceIDRegistrationClient parseToken:authToken:withRequestID:handler:] (in MyApp) + 564
13 libdyld.dylib 0x0000000185ea05b8 0x185e9c000 + 17848

From apple documentation
Trace Trap [EXC_BREAKPOINT // SIGTRAP]
......
......
Swift code will terminate with this exception type if an unexpected
condition is encountered at runtime such as:
1- a non-optional type with a nil
2- value a failed forced type conversion
In my app I use location and I send it to backend, and it works fine, but when opening app at first time, system show alert to say that my app want to use your location allow or not allow, if user didn't allow so location methods will not work and location will be nil and unfortunately I didn't check if location is nil so when unwrap it app crashed, it's my mistake.

Please send message to the Apple review team about same and ask to them
"We tested application on iPhone 6, 6s, 7 and 7+ with iOS 10.x and application works perfect in IPV6 network, We follow following process for IPV6 network: http://www.brianjcoleman.com/tutorial-how-to-test-your-app-for-ipv6-compatibility/" and request to them your event will be held on the coming week so, please release application to store asap and let me know the flow of the application, where you find issue or crashes.
It works, I had done same thing with 4 application and they approved.

Related

Flutter - Phone Auth Verification ID is getting null sometimes for iOS

My App got rejected 4th time in review from Apple team, they are saying App is crashing on tap of verify OTP button. They have shared a crash log, After checking the log I got to know that app is crashing due to null verification ID.
However everything is working perfectly locally and Android version is live, I have tested in real device & in emulator. Now I am not able to understand why verification ID is getting null sometime. I have already added try catch to handle exception, But that is not working in iOS, But working in Android.
Can someone please help me on this.
Below is the crash log...
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 9
Last Exception Backtrace:
(0x1ae904a48 0x1ae62bfa4 0x1ae8085a8 0x1ae908af4 0x1ae90aa7c 0x10264cc88 0x102648d58 0x1026489ec 0x1ae5d0610 0x1ae5d1184 0x1ae57d404 0x1ae57ddf8 0x1ae587314 0x1ae620b88 0x1ae623760)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x00000001ae6da634 0x1ae6d7000 + 13876
1 libsystem_kernel.dylib 0x00000001ae6d9aa0 0x1ae6d7000 + 10912
2 CoreFoundation 0x00000001ae882288 0x1ae7d9000 + 692872
3 CoreFoundation 0x00000001ae87d3a8 0x1ae7d9000 + 672680
4 CoreFoundation 0x00000001ae87cadc 0x1ae7d9000 + 670428
5 GraphicsServices 0x00000001b8802328 0x1b87ff000 + 13096
6 UIKitCore 0x00000001b2977ae0 0x1b1f74000 + 10500832
7 Runner 0x000000010263edf4 0x102638000 + 28148
8 libdyld.dylib 0x00000001ae706360 0x1ae705000 + 4960
Thread 1 name: com.apple.uikit.eventfetch-thread
Thread 1:
0 libsystem_kernel.dylib 0x00000001ae6da634 0x1ae6d7000 + 13876
1 libsystem_kernel.dylib 0x00000001ae6d9aa0 0x1ae6d7000 + 10912
2 CoreFoundation 0x00000001ae882288 0x1ae7d9000 + 692872
3 CoreFoundation 0x00000001ae87d3a8 0x1ae7d9000 + 672680
4 CoreFoundation 0x00000001ae87cadc 0x1ae7d9000 + 670428
5 Foundation 0x00000001aebbc7f4 0x1aebb5000 + 30708
6 Foundation 0x00000001aebbc6d4 0x1aebb5000 + 30420
7 UIKitCore 0x00000001b2a10204 0x1b1f74000 + 11125252
8 Foundation 0x00000001aeced0a4 0x1aebb5000 + 1278116
9 libsystem_pthread.dylib 0x00000001ae61fd8c 0x1ae615000 + 44428
10 libsystem_pthread.dylib 0x00000001ae62376c 0x1ae615000 + 59244

App is crashed on launch by app store reviewed

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.

NSLogger in iOS freeze my app

I am integrate NSLogger into my iOS app, I found that after integrate NSLogger, My app become easy to freeze, especially when there is no internet.
I added code below to main.m, anyone know why?
Logger *logger = LoggerGetDefaultLogger();
LoggerSetOptions(logger,
kLoggerOption_BufferLogsUntilConnection |
kLoggerOption_CaptureSystemConsole |
kLoggerOption_BrowseBonjour |
kLoggerOption_BrowseOnlyLocalDomain);
LoggerSetupBonjour(logger, NULL, NULL));
this is crash log:
Incident Identifier: 5278EF6A-1128-49D6-B31A-B6AA03AC856C
CrashReporter Key: 848d8e4999dd36db808023480dc660a86c173fee
Hardware Model: iPad6,7
Process: My App [386]
Path: /private/var/containers/Bundle/Application/579502B0-20F3-4C83-82F0-ED50BC79C831/My App.app/My App
Identifier: com.xiang.My App
Version: 1140 (1.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.xiang.My App [490]
Date/Time: 2016-11-18 13:41:18.1326 +0900
Launch Time: 2016-11-18 13:33:07.3810 +0900
OS Version: iPhone OS 10.1.1 (14B100)
Report Version: 104
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, 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 0x000000018e8d9948 writev + 8
1 CoreFoundation 0x000000018f909cc0 _CFLogvEx2Predicate + 452
2 CoreFoundation 0x000000018f909eec _CFLogvEx3 + 408
3 Foundation 0x00000001903f0454 _NSLogv + 132
4 Foundation 0x000000019031735c NSLog + 32
5 My App 0x00000001000511a4 0x100030000 + 135588
6 My App 0x0000000100050f2c 0x100030000 + 134956
7 My App 0x000000010008b18c 0x100030000 + 373132
8 My App 0x0000000100089530 0x100030000 + 365872
9 UIKit 0x00000001958a7dc0 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 728
10 UIKit 0x0000000195958b34 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 268
11 UIKit 0x0000000195a0bd5c _runAfterCACommitDeferredBlocks + 292
12 UIKit 0x00000001959fdb10 _cleanUpAfterCAFlushAndRunDeferredBlocks + 560
13 UIKit 0x000000019576c854 _afterCACommitHandler + 168
14 CoreFoundation 0x000000018f8d37dc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
15 CoreFoundation 0x000000018f8d140c __CFRunLoopDoObservers + 372
16 CoreFoundation 0x000000018f8d189c __CFRunLoopRun + 1024
17 CoreFoundation 0x000000018f800048 CFRunLoopRunSpecific + 444
18 GraphicsServices 0x0000000191286198 GSEventRunModal + 180
19 UIKit 0x00000001957e52fc -[UIApplication _run] + 684
20 UIKit 0x00000001957e0034 UIApplicationMain + 208
21 GroundStation Pro 0x00000001000f27b0 0x100030000 + 796592
22 libdyld.dylib 0x000000018e7e45b8 start + 4
Firstly you should not be adding code to main.m. Look into placing code like this in your application delegate.
Secondly, the 0x8badf00d crash is a known error caused by your application taking too long to start. This may be because you have the log start code in the wrong location as I've said above. Or it may be something else.
As a general rule, anything you have in the startup of your application take may take time, should be either delayed or placed on a back ground thread. Application startup should get the user to the home screen of your app as soon as possible.

Swift - “EXC_BREAKPOINT (SIGTRAP)” Crash

I have released my app few months ago and I have more than 2000 users registered. I have had no crashes expect for one user that is saying that the app is crashing all the time on his device (iPhone 6). He was so kind to send me the crash report but I cannot find the solution to his bug or reproduce the bug at all. I told him to try to reset his iPhone but this did not solve the issue the app still crashing.
How could I debug this crash log and see where the error is happening? (EXC_BREAKPOINT (SIGTRAP))
the crash report says:
Date/Time: 2016-03-27 16:02:15.15 +0200
Launch Time: 2016-03-27 16:02:13.13 +0200
OS Version: iOS 9.2.1 (13D15)
Report Version: 105
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000000e7ffdefe
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 My App 0x0011d140 0x1f000 + 1040704
1 My App 0x0013e0d8 0x1f000 + 1175768
2 My App 0x0013c208 0x1f000 + 1167880
3 UIKit 0x2a6aa64e 0x2a622000 + 558670
4 UIKit 0x2a8d3032 0x2a622000 + 2822194
5 UIKit 0x2a8d6f0e 0x2a622000 + 2838286
6 UIKit 0x2a8eac14 0x2a622000 + 2919444
7 UIKit 0x2a8d43f6 0x2a622000 + 2827254
8 FrontBoardServices 0x277afc74 0x2778b000 + 150644
9 FrontBoardServices 0x277aff60 0x2778b000 + 151392
10 CoreFoundation 0x26461256 0x263a9000 + 754262
11 CoreFoundation 0x26460e46 0x263a9000 + 753222
12 CoreFoundation 0x2645f1ae 0x263a9000 + 745902
13 CoreFoundation 0x263b1bb8 0x263a9000 + 35768
14 CoreFoundation 0x263b19ac 0x263a9000 + 35244
15 UIKit 0x2a6a3a16 0x2a622000 + 530966
16 UIKit 0x2a69dfb4 0x2a622000 + 507828
17 My App 0x0013d8ec 0x1f000 + 1173740
18 libdyld.dylib 0x26064872 0x26062000 + 10354

List of iOS exception codes

I'm trying to debug a crash my app is seeing (very rare) in SBJson and I don't know how to decipher the exception code:
Date/Time: 2012-12-16 12:21:31.311 -0500
OS Version: iOS 6.0.1 (10A523)
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000000000defe
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 CoreFoundation 0x3a0a92be CFRelease + 18
1 libcache.dylib 0x369217d2 _entry_remove + 154
2 libcache.dylib 0x369221d8 _cache_enforce_limits + 168
3 libcache.dylib 0x3692115e _cache_update_limits + 170
4 libcache.dylib 0x3692156c cache_set_and_retain + 1028
5 CoreFoundation 0x3a0fc480 -[NSCache setObject:forKey:cost:] + 52
6 CoreFoundation 0x3a0fc442 -[NSCache setObject:forKey:] + 38
7 MyApp 0x000c4226 -[SBJsonStreamWriter writeString:] (SBJsonStreamWriter.m:315)
8 MyApp 0x000c3460 -[SBJsonStreamWriter writeObject:] (SBJsonStreamWriter.m:104)
9 MyApp 0x000c613c -[SBJsonWriter dataWithObject:] (SBJsonWriter.m:93)
10 MyApp 0x000c5efc -[SBJsonWriter stringWithObject:] (SBJsonWriter.m:61)
11 MyApp 0x000c14d0 -[NSObject(NSObject_SBJsonWriting) JSONRepresentation] (NSObject+SBJson.m:38)
Apple provides some documentation here:
http://developer.apple.com/library/ios/#technotes/tn2151/_index.html
but the 0x0000000000000001, 0x000000000000defe exception code isn't listed. Anyone know where I can get a more complete list?
Are you sure the json you are passing is correct? Try validating it at some third party. I use this: http://paulisageek.com/json_validator/

Resources