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/
Related
I'd like to be able to include diagnostic information in an iOS crash report. Part of the motivation is to include more information about the cause of the error and earlier stack traces.
In my scenario I have control over an NSException object that is thrown. That is, the crashes aren't due to segfaults, for instance. However, the default crash report (e.g. from TestFlight) hides NSException fields like name, reason, and userInfo:
NSException *exception = [NSException exceptionWithName:name
reason:reason
userInfo:userInfo];
#throw exception;
produces:
Incident Identifier: 00000000-0000-0000-0000-000000000000
Hardware Model: iPhone13,3
Process: Example [12345]
...
Date/Time: 2022-08-11 12:21:45.7780 +0000
Launch Time: 2022-08-11 12:20:45.7780 +0000
OS Version: iPhone OS 15.6 (19G71)
...
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 5
Last Exception Backtrace:
0 CoreFoundation 0x1951a5288 __exceptionPreprocess + 220 (NSException.m:200)
1 libobjc.A.dylib 0x1aded4744 objc_exception_throw + 60 (objc-exception.mm:565)
2 Example 0x102bc379c -[Example throwException:] + 24 (Example.m:422)
3 Example 0x102bd7964 -[Example _crash] + 984 (Example.m:222)
...
8 libdispatch.dylib 0x194e14c80 _dispatch_lane_invoke + 392 (queue.c:3944)
9 libdispatch.dylib 0x194e1f500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
10 libsystem_pthread.dylib 0x206b050bc _pthread_wqthread + 288 (pthread.c:2599)
11 libsystem_pthread.dylib 0x206b04e5c start_wqthread + 8
Is there any way to add more diagnostics information to these crash reports?
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.
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.
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
My app crashes in certain moments in release build. I don't know if it is important but I use mainly c++ with cocos2d-x framework. I tried setting optimization level to none but it won't work too. I get this output in console :
libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: map::at: key not found
This is part of the crash log:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3870d1f0 0x386fa000 + 78320
1 libsystem_pthread.dylib 0x38777792 0x38774000 + 14226
2 libsystem_c.dylib 0x386bdfd8 0x38675000 + 298968
3 libc++abi.dylib 0x379eccd2 0x379ec000 + 3282
4 libc++abi.dylib 0x37a056aa 0x379ec000 + 104106
5 libobjc.A.dylib 0x3814af86 0x38147000 + 16262
6 libc++abi.dylib 0x37a031c4 0x379ec000 + 94660
7 libc++abi.dylib 0x37a02d28 0x379ec000 + 93480
8 libobjc.A.dylib 0x3814ae12 0x38147000 + 15890
9 CoreFoundation 0x2d3d2f80 0x2d3cb000 + 32640
10 CoreFoundation 0x2d3d2cee 0x2d3cb000 + 31982
11 GraphicsServices 0x3230565e 0x322fc000 + 38494
12 UIKit 0x2fd1e168 0x2fcb0000 + 450920
13 BumpRace iOS 0x00044b1e 0x4000 + 264990
14 libdyld.dylib 0x38657ab4 0x38656000 + 6836
Any help would be apprieciated.
You must use iOS instruments tool. To debug you memory leaks. As possible to conclude from youre ERROR message.
Small useful link.