Xcode can’t launch project for debugging

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?

xcode
macos
lldb
asked on Stack Overflow Jul 17, 2013 by bdesham

3 Answers

7

Restarting my Mac seems to have fixed this.

answered on Stack Overflow Jul 17, 2013 by bdesham
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.

answered on Stack Overflow Jun 18, 2014 by Markus
0

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

answered on Stack Overflow May 25, 2014 by Gank

User contributions licensed under CC BY-SA 3.0