Symbolicate crash logs xcode 4.2 - ios

I have crash logs and put it in XCode.
Xcode symbolicate all foundation symbols but not my app:
2 UIKit 0x317fd1a8 -[UITableView selectRowAtIndexPath:animated:scrollPosition:] + 24
3 myApp 0x0001f084 0x1000 + 123012
4 myApp 0x0001d6da 0x1000 + 116442
5 myApp 0x0000643c 0x1000 + 21564
6 myApp 0x00031dfc 0x1000 + 200188
7 CoreFoundation 0x355df42e -[NSObject performSelector:withObject:withObject:] + 46
8 UIKit 0x317659e4 -[UIApplication sendAction:to:from:forEvent:] + 56
9 UIKit 0x3182b3c8 -[UIBarButtonItem(UIInternal) _sendAction:withEvent:]
How can I symbolicate my app symbols?

You can use a symbolicatecrash utile (perl script provided with Xcode). And you need .dsym file, it was generated during building you app. For each build you need to have .dsym file (it usually stored somewhere near your output binary).
Also, you may use option "Strip debug symbols during copy" (set it to NO) in your project options to save symbols in your bundle.
Good luck!

try setting "Deployment Postprocessing" to NO and make sure you're building everything in debug mode

Related

Xcode crashes on launch

I am developing an Application for iOS and I changed nothing in the Application. But at a restart of my Mac, Xcode crashes every time.
Don't know if this is important, but my spotlight can't find any applications and also when I open the finder and using the shortcut cmd + shift + H I see a white window.
Xcode isn't starting anymore and throws this error:
Process: Xcode [1346]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 7.2 (9548)
Build Info: IDEFrameworks-9548000000000000~7
App Item ID: 497799835
App External ID: 814662604
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [1346]
Date/Time: 2015-12-24 11:01:44.753 +0100
OS Version: Mac OS X 10.11.2 (15C50)
Report Version: 11
Time Awake Since Boot: 4000 seconds
System Integrity Protection: enabled
Crashed Thread: 4 Dispatch queue: DVTFilePathEventWatcher - event queue
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
VM Regions Near 0:
-->
__TEXT 0000000108a5a000-0000000108a5e000 [ 16K] r-x/rwx SM=COW /Applications/Xcode.app/Contents/MacOS/Xcode
Application Specific Information:
ProductBuildVersion: 7C68
Thread 0:: Dispatch queue: DVTFilePath cache derivation lock for key DVTFilePathKey_SortedDirectoryContents
0 libobjc.A.dylib 0x00007fff8df27aa0 search_method_list(method_list_t const*, objc_selector*) + 2
1 libobjc.A.dylib 0x00007fff8df28d76 lookUpImpOrForward + 413
2 libobjc.A.dylib 0x00007fff8df22591 objc_msgSend + 209
3 com.apple.dt.DVTFoundation 0x0000000108a741f8 -[DVTFileSystemVNode addCachedEntriesFromDictionary:] + 215
4 com.apple.dt.DVTFoundation 0x0000000108bd2e2d __33-[DVTFilePath cachedValueForKey:]_block_invoke549 + 245
5 libdispatch.dylib 0x00007fff9fcbd33f _dispatch_client_callout + 8
6 libdispatch.dylib 0x00007fff9fcbe926 _dispatch_barrier_sync_f_invoke + 74
7 com.apple.dt.DVTFoundation 0x0000000108cd1005 DVTDispatchBarrierSync + 62
8 com.apple.dt.DVTFoundation 0x0000000108a69627 -[DVTDispatchLock performLockedBlock:] + 116
9 com.apple.dt.DVTFoundation 0x0000000108a715b0 -[DVTFilePath cachedValueForKey:] + 1802
10 com.apple.dt.DVTFoundation 0x0000000108a70afc -[DVTToolchainRegistry scanSearchPathAndRegisterToolchains:] + 563
11 com.apple.dt.IDEFoundation 0x00000001097d1a66 IDEInitialize + 655
12 com.apple.dt.IDEKit 0x0000000109ecdf7c -[IDEApplicationController applicationWillFinishLaunching:] + 708
13 com.apple.CoreFoundation 0x00007fffa18fa70c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
14 com.apple.CoreFoundation 0x00007fffa18fa67f ___CFXRegistrationPost_block_invoke + 63
15 com.apple.CoreFoundation 0x00007fffa18f9d47 _CFXRegistrationPost + 407
16 com.apple.CoreFoundation 0x00007fffa18f9ab2 ___CFXNotificationPost_block_invoke + 50
17 com.apple.CoreFoundation 0x00007fffa18f3d42 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1922
18 com.apple.CoreFoundation 0x00007fffa17e2145 _CFXNotificationPost + 693
19 com.apple.Foundation 0x00007fff9ef36921 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
20 com.apple.dt.DVTFoundation 0x0000000108c6cf55 -[NSNotificationCenter(DVTNSNotificationCenterAdditions) _dvt_postNotificationName:object:userInfo:] + 698
21 com.apple.AppKit 0x00007fff9db412c2 -[NSApplication finishLaunching] + 354
22 com.apple.dt.DVTKit 0x0000000109275f62 -[DVTApplication finishLaunching] + 149
23 com.apple.AppKit 0x00007fff9db40e05 -[NSApplication run] + 231
24 com.apple.AppKit 0x00007fff9dac3520 NSApplicationMain + 1176
25 libdyld.dylib 0x00007fff9a8605ad start + 1
Could this be an issue due to Permissions conflicts?
ANSWER:
After I changed the rights from my OSX-Drive to everyone can write&read. Everything worked. But I knew that this is a temporary solution, so I decided to reinstall my MAC and everything was fine.
Delete ~/Library/Developer/Xcode/DerivedData by running this command in terminal:
rm -r ~/Library/Developer/XCode/DerivedData
If that doesnt work, At this point and with given info, all I could recommend to delete and reinstall Xcode.
If the delete of ~/Library/Developer/Xcode/DerivedData is not working for you, try this steps to remove xcuserdata:
open a Finder window and navigate to your project
right-click on the .xcodeproj OR .xcworkspace file
select Show Package Contents
a new window appears
delete a folder called xcuserdata
I had one where i selected a file that was quite large which crashed xcode when it tried to parse it. Then when i restarted it somehow it got set to load that file on start. Only way i saw was to temporarily rename the file that it was trying to load at start so it would load empty.
I'll recommend deleting xcuserdata: folder from both of your .xcodeproj & .xcworkspace file (open with Show Package Contents) and try again.
I hope this will work.
Ensure there are no issues with your SPM packages/dependencies.
This is simply another suggestion. I just spent some time debugging this on a fairly popular open source project.
My Xcode first crashed when I updated a SPM package, so I was fairly certain it was an issue with one of the future commits in that package or a SPM bug. I subscribe to Occam's Razor, so I started going through the changes in the commits.
After some time, I found a duplicate Swift Playground page delcaration in contents.xcplayground. I removed that single line, pushed the PR, and everything worked fine after that.
To be able to reopen the project:
Open project.pbxproj in your code editor of choice (e.g. vi, nano, emacs, atom, code).
Remove the offending package or packages from the /* Begin XCRemoteSwiftPackageReference section */ and /* Begin XCSwiftPackageProductDependency section */ sections.
Save the file and Xcode should now open.
Again, if your Xcode is immediately crashing when opening a project (and you last updated/auto-updated a SPM package) go through your packages.

App With CocoaPods Distribution AdHoc Crash (uses keychain and keychain returns null)

xcode swift project runs with couple cocoapods frameworks like MQTTClient, uses keychain and keychain returns null,works well on xcode but crashes on distribution adhoc, I have done everything re installing cocoapods, adding the .a files of cocoa to build phases, adding library search path, i'm not figuring out why keychain keeps returning nil and why it keeps crashing on Distribution adhoc, here is the crash report
Class MQTTManager start function accesses the cocopods MQTTClient.a
And accesses the keychain
Incident Identifier: 4B4B005E-7BC2-487D-9A8A-FEEAB4967CF4
CrashReporter Key: TODO
Hardware Model: iPhone7,2
Process: testProj [494]
Path: /private/var/mobile/Containers/Bundle/Application /3A3B094D-FACB-49B9-BE84-5EA6F8F40D2A/testProj.app/testProj
Identifier: com.test.testProj
Version: 205
Code Type: ARM-64
Parent Process: launchd [1]
Date/Time: 2015-03-13 14:28:20 +0000
OS Version: iPhone OS 8.2 (12D508)
Report Version: 104
Exception Type: SIGTRAP
Exception Codes: #0 at 0x1002559e4
Crashed Thread: 0
Thread 0 Crashed:
0 testProj 0x00000001002559e4 _TFC9testProj11MQTTManager5startfS0_FT_T_ + 2000
1 testProj 0x000000010014a134 _TFFC9testProj16SignInController9checkUserFS0_FT_T_U_FTCSo12NSURLRequestGSqCSo17NSHTTPURLResponse_GSqPSs9AnyObject__GSqCSo7NSError__T_ + 3848
2 testProj 0x0000000100244b68 _TFFFC9testProj7Request8responseFDS0_FT5queueGSqCSo8NSObject_10serializerFTCSo12NSURLRequestGSqCSo17NSHTTPURLResponse_GSqCSo6NSData__TGSqPSs9AnyObject__GSqCSo7NSError__17completionHandlerFTS2_GSqS3__GSqPS5___GSqS6___T__DS0_U_FT_T_U_FT_T_ + 640
3 libdispatch.dylib 0x0000000198631994 <redacted> + 24
4 libdispatch.dylib 0x0000000198631954 <redacted> + 16
5 libdispatch.dylib 0x000000019863620c _dispatch_main_queue_callback_4CF + 1608
6 CoreFoundation 0x0000000186fc22ec <redacted> + 12
7 CoreFoundation 0x0000000186fc0394 <redacted> + 1492
8 CoreFoundation 0x0000000186eed1f4 CFRunLoopRunSpecific + 396
9 GraphicsServices 0x000000019030f6fc GSEventRunModal + 168
10 UIKit 0x000000018b87e10c UIApplicationMain + 1488
11 testProj 0x00000001001c0c60 main + 116
12 libdyld.dylib 0x000000019865ea08 <redacted> + 4
Found a solution here
http://dasdev.de/2014/12/04/assessing-the-keychain-in-swift/
I found that its not connected to cocoapods libraries of any searchpaths
I had to change the swift compiler optimization flags to [NONE], took me 2 days to found an answer, and thats it, it works fine

Reading production crash log in iOS application

I have a crash report from a production iOS app, which was automatically logged into our own server. The crash log is a string combination of [NSException description] and [NSException callStackSymbols], looks as follow:
Terminating app due to uncaught exception: *** setObjectForKey: object cannot be nil (key: dict_key).
0 CoreFoundation 0x2f00dee3 <redacted> + 154
1 libobjc.A.dylib 0x397a4ce7 objc_exception_throw + 38
2 CoreFoundation 0x2ef4917f <redacted> + 818
3 MyAppName 0x0010ef3f MyAppName + 229183
4 MyAppName 0x000e5401 MyAppName + 58369
5 MyAppName 0x000e4ac1 MyAppName + 56001
6 UIKit 0x31843a33 <redacted> + 518
... (Removed for brevity)
Having this information, how can I produce a .crash file that can be read by symbolicatecrash command? Can I simply store this crash log in a text file and name it with .crash extension?
Thanks!
You'll need the dSYM file generated when you compile the app.
To get this you should go to your .app file on Xcode and right click on it and show in finder, then you should create a folder with the dSYM file inside as well as your app and then run the atos command inside the folder: atos -arch armv7 -o YOURAPP.app'/'yourapp' 0xe4ac1 - 56001 = 0xD7000
Wish it helps!

Xcode 5.0 Doesn't Symbolicate Crash Log

I have a submitted iOS app and I have the build archive with me. So, I took the crashes from iTunesConnect but when I tried to symbolicate them (dragged the .crash files to Xcode Organizer they didn't get symbolicated. I also pressed the Symbolicate button.
I am using Xcode 5.0, and I am pretty sure that the crashes that I am symbolicating came from the correct version of the build archive that I have.
Any ideas of why it doesn't work?
Thanks!
EDIT
Incident Identifier: E2A64AF6-C8A3-465D-81C3-09674CD18771
Hardware Model: iPhone4,1
Process: MyApp [9551]
Path: /var/mobile/Applications/0B0523C1-0EF9-41D8-AE91-D0C43B8DC00E/MyApp.app/MyApp
Identifier: MyApp
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-09-17 16:42:10.390 -0500
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xc2269d62
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x3975f5b0 objc_msgSend + 16
1 MyApp 0x00215812 0x100000 + 1136658
2 MyApp 0x00216ca0 0x100000 + 1141920
3 MyApp 0x001494e2 0x100000 + 300258
4 UIKit 0x33898fb0 -[UIApplication _deactivateForReason:notify:] + 396
5 UIKit 0x338cef26 -[UIApplication _handleApplicationSuspend:eventInfo:] + 310
6 UIKit 0x338451e2 -[UIApplication handleEvent:withNewEvent:] + 2454
7 UIKit 0x338446c8 -[UIApplication sendEvent:] + 68
8 UIKit 0x33844116 _UIApplicationHandleEvent + 6150
9 GraphicsServices 0x3555c5a0 _PurpleEventCallback + 588
10 GraphicsServices 0x3555c1ce PurpleEventCallback + 30
11 CoreFoundation 0x31a11170 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
12 CoreFoundation 0x31a11112 __CFRunLoopDoSource1 + 134
13 CoreFoundation 0x31a0ff94 __CFRunLoopRun + 1380
14 CoreFoundation 0x31982eb8 CFRunLoopRunSpecific + 352
15 CoreFoundation 0x31982d44 CFRunLoopRunInMode + 100
16 GraphicsServices 0x3555b2e6 GSEventRunModal + 70
17 UIKit 0x338982fc UIApplicationMain + 1116
18 MyApp 0x00148b9a 0x100000 + 297882
19 MyApp 0x001028f4 0x100000 + 10484
Here's one of the crashes.
I had the same problem and for me it was due to the name I had given the Xcode application.
I was still working on production code in 4.6 when the GM version of 5 came out. Prior releases had DPn appended but the GM was called "Xcode" so I renamed it to "Xcode 5". That space was my problem.
Looking in the console log and expanding [symbolicatecrash] stderr: I found the following line after it started looking for my app's symbols:
sh: /Applications/Xcode: No such file or directory
Renaming the application to "Xcode5" and hitting re-symbolicate immediately symbolicated the crash log.
That may not be your exact problem but it's certainly worth expanding that stderr: section in the console log and looking for any errors related to fetching the symbol file for your app.
In my case checking the consol log for [symbolicatecrash] stderr showed nothing specific. I restarted Xcode and checked the consol for error entries generated by Xcode. There were several entries mentioning problems with the keychain. One of my certificates was missing.
I requested new certificates from Xcode by going to:
Preferences>Accounts>View Details
Xcode detected there was a missing certificate and provided the option to submit a request. After going through that process, Xcode was able to re-symbolicate from the Organizer Window as expected.
Make sure that your Xcode application name doesn't contain any spaces. This was the reason it didn't work for me. So /Applications/Xcode.app works, while /Applications/Xcode 6.1.1.app doesn't work.

Unable to Symbolicate iOS App Crash Report

My app is occasionally crashing for some users and I have been unable to replicate the problem.
I have managed to get a few crash reports from one of the users which I have imported to Xcode, but I am unable to symbolicate the reports fully with some of the myApp lines not showing the actual class/code being called. Two sample stack traces extracts:
Last Exception Backtrace:
0 CoreFoundation 0x39e5c3e2 __exceptionPreprocess + 158
1 libobjc.A.dylib 0x38eb595e objc_exception_throw + 26
2 CoreFoundation 0x39da66d0 -[__NSPlaceholderArray initWithObjects:count:] + 160
3 CoreFoundation 0x39da6e04 +[NSArray arrayWithObject:] + 40
4 myApp 0x0012117c 0x63000 + 778620
5 myApp 0x0012c700 0x63000 + 825088
6 myApp 0x00148784 0x63000 + 939908
7 myApp 0x0013caf0 0x63000 + 891632
8 myApp 0x0013b9da 0x63000 + 887258
9 myApp 0x0006bda2 -[myAppAppDelegate init] (myAppAppDelegate.m:45)
10 UIKit 0x3380d8aa -[UIClassSwapper initWithCoder:] + 186
Last Exception Backtrace:
0 CoreFoundation 0x39e5c3e2 __exceptionPreprocess + 158
1 libobjc.A.dylib 0x38eb595e objc_exception_throw + 26
2 CoreFoundation 0x39da66d0 -[__NSPlaceholderArray initWithObjects:count:] + 160
3 CoreFoundation 0x39da6e04 +[NSArray arrayWithObject:] + 40
4 myApp 0x000c217c 0x4000 + 778620
5 myApp 0x000cd700 0x4000 + 825088
6 myApp 0x000e9784 0x4000 + 939908
7 myApp 0x000ddaf0 0x4000 + 891632
8 myApp 0x000dc9da 0x4000 + 887258
9 myApp 0x0000cda2 -[myAppAppDelegate init] (myAppAppDelegate.m:45)
10 UIKit 0x3380d8aa -[UIClassSwapper initWithCoder:] + 186
This is an app submitted to the store from an archived build which still exists in Xcode. I have also tried the atos command, and running several of the symbolicate scripts available with no success. (I am 100% sure I have the correct .app and .dSYM files).
Anyone have any idea how I may be able to find out more info about these stack traces and determine where this crash is happening?
(Note: I am aware that line 9 references the app delegate's init command, which is very useful. My question is specifically regarding the subsequent calls that are not symbolicated)
Thanks!

Resources