GenerateDSYMFile: dsymutil fails with exit code 11 - objective-c

I upgraded from MacOS X 10.6 (Snow Leopard) to 10.7 (Lion) this morning, and also from Xcode 4.2 to Xcode 4.3.2. Perhaps more importantly, that means that I'm now building my project against the iOS 5.1 SDK instead of 5.0. That's a lot of changes, and one of them caused my project to break: the project will no longer build due to the following error:
Command /Applications/Xcode.app/Contents/Developer/usr/bin/dsymutil
failed with exit code 11
The full command given in the build results is as follows (full disclosure: I've changed the project name to 'MyProject' to protect the innocent):
GenerateDSYMFile /Users/caleb/xcode-build/MyProject-fmkmldxfmhvmoicxrcsqsptzuvjs/Build/Products/Debug-iphoneos/MyProject.app.dSYM /Users/caleb/xcode-build/MyProject-fmkmldxfmhvmoicxrcsqsptzuvjs/Build/Products/Debug-iphoneos/MyProject.app/MyProject
cd /Users/caleb/MyProject/iphone
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/usr/bin/dsymutil /Users/caleb/xcode-build/MyProject-fmkmldxfmhvmoicxrcsqsptzuvjs/Build/Products/Debug-iphoneos/MyProject.app/MyProject -o /Users/caleb/xcode-build/MyProject-fmkmldxfmhvmoicxrcsqsptzuvjs/Build/Products/Debug-iphoneos/MyProject.app.dSYM
This only happens when I try to build for an iOS device; building for the simulator works fine.
I've done quite a bit of searching to find an explanation of this error, but haven't found anything yet that explains the error. I did find one SO question about the same error, caused in that case by a bad tag in an Info.plist file, but my Info.plist looks fine. Another question suggests creating a new target and copying everything over. I haven't tried that yet as my project is quite large, but it's looking like the best next step.
Can anyone tell me what "exit code 11" from dsymutil means and how to fix it?
Update: Running the dsymutil command at the command line shows that exit code 11 is a segmentation fault. Still don't know what causes it, though.

A workaround that's working for me so far is to change the Debug Information Format setting in the project from "DWARF with dsym" to plain old "DWARF".
This at least lets me build the project for iOS devices and debug, so that's a very good start. I'm not sure what we lose by leaving out dsym, so I'm going to keep looking.
Update: Apple DTS suggests reinstalling Xcode. I haven't been able to try that yet, but will update this answer if it's helpful.

For future users who come here via Google :
It happened to me because my working directory was full.
EDIT:
Clear Some Space in your disk.
P.S. You can always go ahead and delete everything residing in this directory if you have developed so many apps till date on the same machine. /Users/<username>/Library/Developer/Xcode/DerivedData
P.P.S: Don't forget to check the size of the directory to get surprised. It may take upto 4 hours deleting the entire path, so do it in free time, just delete 2-3 sub directories and resume your work.

Changing "iOS Deployment Target" from 6.1 to 4.0 helped me !

have you made sure that your project build settings, compiler version is set to system default?

Related

XCode hangs every time when i write few lines of code in playground

I have just started working with Swish after buying my new imac and i am working on play ground. for last 2 days i am banging my head with wall but i could not fix this problem.
When ever i am writing few lines of code, Xcode hangs and mouse turns into small colored circle when you hoverover on the xcode window. I have to quit by force every time when xcode hangs.
I tried all possible option which i could find on stackoverflow;
I draged xcode from application to trash bin, cleaned trash bin, restarted the imac, downloaded xcode from app store installed it.
when i opened xcode after installation, it opened all my files automatically and problem was still there.
Then i followed this solution How to uninstall Xcode 5.0.2 from MAC 10.9 and removed all xcode related files by using appCleaner. It cleaned all files and folder. I restarted my system and installed xcode again :( and problem is still there.
I tried to uninstall xcode with sudo /Developer/Library/uninstall-devtools --mode=all but it does not work, terminal says
sudo: /Developer/Library/uninstall-devtools: command not found
I could see that there is something wrong with this run time compiler.
and yes i downloaded and installed the xcode 6.4 beta version and problem still there.
Can any one turn my face from :( -> :)
Here is a solution which #user3344236 provids. If someone has same problem use this trick. Create an empty project and then add playgrounds file in it. It would not crash or Xcode would not hang.
Playground is in early stages and there is something fishy with "standalone" playground, If you create swift file with File->New->PlayGround, there is high chances that Xcode will hang and you can have same problem what i had for 2 days.
A little late, but I have run into similar problems with the latest XCode (7.2) on Yoesmite. This is espcially annoying when you are, for example, writing up a long tutorial in the editor and risk losing content because of a Force Quit situation.
The simplest workaround I have found, especially when I am initially entering all the text and code (and hence really don't want it continuously trying to execute) is to insert the following at the top of each new file - removing it when I am ready to autorun the code.
don't execute
It can be any text, as long as it doesn't parse. The playground environment won't try to run while there is a syntax error in the file. But you still get all the context-sensitive help and auto-completion magic to aid in your writing.

Strange application behavior when building a project with the latest xcode/OSX version

I have an OSX application written in Objective-C/Cocoa using xcode. The application is quite finished, tested and sold on the App Store.
I haven't worked on this application for some time and recently, I rebuilt it using xcode 4.3.3 on my OSX 10.7.4 and I noticed that while it builds just fine, there are some very strange visual glitches when running the application that were never seen before and occasionally, I get EXC_BAD_ACCESS when closing the application. All these seem to be related to the PDFKit framework I am using. I am unable to debug these problems since the glitches are just visual (nothing I can check in code) and EXC_BAD_ACCESS exception comes from internally allocated objects not related to my code.
The code itself haven't changed, I tried previous revisions of the code and they all exhibit the same strange behavior now. I tried running an old binary I have of the application (compiled couple of months ago) and it works just fine. Then I tried building it with previous versions of xcode, down to 4.2.1 (which I know was ok when I submitted the app to the app store) and the problems still occur.
Then I suspected this may be something specific to my environment so I built the project on different machine also with xcode 4.3.2 and OSX 10.7.4. Same results, the problems are still there.
So now I suspect that it has something to do with the OSX 10.7.4 update since this is the last thing that was changed between now and when I was able to produce a good build of the application. I am pretty puzzled to what to do next and how to identify the cause of this problem. I have an old binary that is working fine and I have a newly compiled binary of the same code revision that has problems.
Is there any useful information I can get from the difference of these binaries? What can I do to determine the cause of these problems? What can I try next?
Thanks!
NOTE (update): I stated it above but I want to make sure it is clear. This is a Mac OSX Cocoa application, not iOS.
just reset your simulator then try.
I hope you check the ARC information
go to your project Target set build settings --> Search Paths-->Always Search User Paths Set Yes.
And check your all class variables different from one another.
Xcode--> preferences-->Documentation check installed core Libraries (or) install it
like that
Xcode--> preferences-->Components check required component installed or not
check these things in your project.
Are you sure your customers are not having the same problem? Since you have tested the application on a different machine you probably do not have corrupt libraries installed (unless you did not install from scratch but used some migration tool?), so that is probably not the problem.
Most logical explanation to me would be that your customers also have this problem but they haven't reported it yet. In that case, you probably have a memory problem and there are techniques to attack that.
In any case, eliminate all the parameters that you can eliminate to simplify the problem. Deconstruct the application until the problem does not occur anymore or reconstruct the application in a different project until the problem occurs again.
It sounds like a nasty one, but you'll get there in the end, with patience and perseverance :)
First of all, you need check and verify the build log for suspicious compiler warnings.
For EXC_BAD_ACCESS, XCode analysis will give useful information.
You could try 10.6 or 10.5 (need manual installation) SDK. Or restrict the deployment target to 10.5 or 10.6.
I will answer my own question (since none of the above answers really answer it) so anyone with a similar problem might have a hint. I was not able to understand why exactly this happens but I'm pretty sure this is not a problem with my code but rather some glitch on Apple's side. And there is a workaround.
First, I compiled Apple's sample "PDF Annotation Editor" project on my Lion 10.7.4 and while the functionality is obviously different from my project, it also exhibited similar glitches with the PDFView display that my project does when compiled with 10.7.4
Then I proceeded to building a fresh clean system on new hard disk. Intalled Snow Leopard and upgraded to 10.6.8 and ONLY installed xcode. Compiled my project (the source code always stays exactly the same) and everything works fine. No problems seen in the compiled project.
Updated my OSX to Lion 10.7.4 and xcode 4.3.3, same source code. The problem is there after I compile it. I am pretty sure that if I tried 10.7.3 first, I would not see the problem as I remember it only starts with 10.7.4 but Apple doesn't provide any reasonable way to update to 10.7.3 first or downgrade to it after 10.7.4 is installed (shame on them, not very developer friendly!).
So, the problem appears in 10.7.4.
Then I installed the pre-release version of 10.7.5. This was the only thing that was changed, same source, same xcode. To my surprise, the compiled code works flawlessly now and the problems seen with 10.7.4 are now gone!
So my workaround - wait for 10.7.5 release before working on the project further. Hopefully Apple won't screw it in the future with Mountain Lion. I don't think I am going to try and debug it further or submit a ticket to Apple, going to be a tough case to explain.
Thanks for the responses.

XCode 4 Archive/IPA Error: "The operation couldn’t be completed. No such file or directory"

I've found various proposed solutions to this problem on this internet, but none of them work for me. Does anyone know why this might be happening?
http://answers.unity3d.com/questions/15294/xcode-build-and-archive-error-no-such-file-or-directory
http://blog.joshschumacher.com/2011/04/06/xcode4-the-operation-couldn%E2%80%99t-be-completed-no-such-file-or-directory/
I've tried archiving with every combination of coding signing vs not using code signing, and I've tried using every combination of provisioning profiles, but I still get the same error every time.
I'm very confused as to why I'd even be getting an error like this when trying to save a file. I'm using XCode 4, my application builds for archive fine. In fact, I can even upload my application to itunesconnect (and it was accepted!). I just can't create an IPA for sharing and beta testing before submission.
Any ideas?
The error message
Right before I get the error
After much frustration, I filed a developer support request with Apple. The technician I spoke with was able to save my archive as an .ipa on her computer -- the exact same archive that I was not able to save on mine, which pointed to a possible bug in my system (and from the sounds of it, many other people's).
She recommended that I uninstall and reinstall XCode and the developer tools, and that worked!
Here were her uninstall instructions:
Make sure that your machine is running the latest Mac OS X (10.6.7) and iTunes.
Run the following command in the Terminal application to uninstall your SKD:
sudo <Xcode>/Library/uninstall-devtools --mode=all (where <Xcode> is the path to the directory that contains your SDK.)
Drag your <Xcode> to the trash and restart your machine
Re-download and install Xcode (4.0.2) from the iOS Dev Center. Make sure that the System Tools, UNIX Development, Essentials packages in the Custom Install pane are selected before installing it.
I have the same issue after my distribution certificate was expired. I add new ones (private key and certificate) and xCode "Share" command starts to produce such error.
The problem resolves as soon as I remove old private key & certificate from Keychain Access.
Hope it helps
Selecting "Don't Re-sign" at Identity solved the same issue for me.
I actually had the same problem, but a different solution (and reason). I had Xcode 3 and Xcode 4 both running at one point. I recently deleted Xcode 3 and moved my Xcode 4 from /Xcode4 to /Developer directory. This caused me to have the same issue you describe.
I moved the directory back to /Xcode4 and now my archives save out correctly.
I also had the same problem but I could resolve the problem in the below way.
My project was on the portable disk (formatted as FAT-32) and the project referred some folders on the same disk as "add folder reference for any added folder". I could build it any configurations however I couldn't just make .ipa file with above alert.
So, I copied the referenced folders on the portable disk to the desktop of the disk installed XCode (MacOS). And adding again the folders into the project. I could make .ipa file.
I installed Xcode 4.0.2 in one directory and then manually moved it to another.
When I moved Xcode back to the first directory everything worked.

clang Can't find any frameworks

I've been tearing my hair out over this, and Google hasn't yielded much so my problem must be caused by my own specific brand of stupidity.
Basically, having installed Xcode 4 I removed the /Developer-old folder (properly, can't remember the command but I used the uninstall script rather than sticking it in the trash).
Xcode builds projects fine, and the latest version of all the Objective-C frameworks seem to live in /System/Library/Frameworks, but when I compile something (which built fine in the Xcode 3 days) clang complains that it can't find any headers, e.g:
fatal error: 'Cocoa/Cocoa.h' file not found
I've tried forcing the framework search path with -F to no avail- is there a common underlying issue or have I just screwed my machine?
Reinstall the developer tools. It will take a lot less time than tracking down whatever you broke.

Xcode 4.01 - Sqlite error when trying to copy database

I am experiencing an error when running my project in xcode4.
A couple of times it stopped when it was trying to copy the database to the build directory, telling me the sqlite-file isn't there. After restarting my Mac it now stops in the build process. The text above the info-progress bar tells me "attaching to [project]".
This doesnt happen when running my project with Xcode 3.2.6.
Does anybody know a workaround for this?
Thank you very much in advance.
best regards
Tom
Apparently Xcode is a bit more serious about what's really within the xcode-project, not just laying in the directory. The error means I forgot to add the file in the directory to the project again after I mucked around with it.
Now that the file was added to the project everything is working again.
I hope it saves a bit of time in case somebody else comes accross the same problem.