6

I’m using Xcode 4.6.3 to build a library for OS X. My project includes a target called LibraryTest, which is a command-line app to test the functionality of the library. Both the library and the test app build fine, but when I try to run the app it quits immediately and the debug console shows:

error: failed to launch '/Users/bdesham/Library/Developer/Xcode/DerivedData/Wavelength_and_Spectrum_Library-byosniusyaoidgdcpzwzuzkitzgv/Build/Products/Debug/LibraryTest'
-- error: Host::LaunchProcess (launch_info) => pid=0,
path='/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver'
err = error: ::posix_spawnp (
    pid => 98649,
    path = '/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver',
    file_actions = 0x10b09e268,
    attr = 0x10b09e2a0,
    argv = 0x7fe2701377e0,
    envp = 0x0 )
err = Bad file descriptor (0x00000009) (0x00000009)
error: failed to launch '/Users/bdesham/Library/Developer/Xcode/DerivedData/Wavelength_and_Spectrum_Library-byosniusyaoidgdcpzwzuzkitzgv/Build/Products/Debug/LibraryTest'
-- error: Host::LaunchProcess (launch_info) => pid=0,
path='/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver'
err = error: ::posix_spawnp (
    pid => 98649,
    path = '/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver',
    file_actions = 0x10b09e268,
    attr = 0x10b09e2a0,
    argv = 0x7fe2701377e0,
    envp = 0x0 )
err = Bad file descriptor (0x00000009) (0x00000009)

(Line breaks added for readability.) I have the Xcode 5 DP installed, so I tried removing Xcode 4 and reinstalling it from the Mac App Store, but no dice. Deleting DerivedData didn’t help either. Any ideas?

2
  • Too many zombie processes? Next time this happens open the Terminal and run ps aux | grep 'Z'. Commented Jul 18, 2013 at 6:19
  • There were problems with iOS Simulator debug sessions leaving behind zombies earlier in the Mac OS X 10.8.x / Xcode 4.6.x versions but those should all be fixed with 10.8.4 and 4.6.3 AFAIK (I can't remember exactly when it was fixed off-hand.) Commented Jul 18, 2013 at 19:08

3 Answers 3

9

Restarting my Mac seems to have fixed this.

Sign up to request clarification or add additional context in comments.

1 Comment

This worked for me, too, very weird. What's weirder -- after restarting the old builds still failed but new builds made after restart worked. Huh?
4

Check "Build Settings" -> "Provisioning Profile". It should be "none" or some provisioning for Max OSX (if you're building for the app-store) . In my case it erroneously had "iOS Ad Hoc Provisioning Profile". This resolved this problem for me.


Note: I found this out by checking the syslog ("cat -f /var/log/system.log" in terminal, then start app). It wrote a crash report which had "...embedded provisioning profile not valid:..." among other lines. Checking the app container itself indeed showed an "embedded.provisionprofile" file, which triggered me to check the build settings for it.

1 Comment

Just a small note, you can replace cat with tail, for tail -f /var/log/system.log, so you can get live updates to any new entries in that file.
0

I solved it by updating iOS. I was using JailBreak iOS version.

1 Comment

The question refers to Mac OS X.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.