tags:

views:

172

answers:

2

Hi all, I'me getting the following after building from he command line using xcodebuild, ay ideas what might be wrong?

** BUILD SUCCEEDED **

2010-06-06 20:20:12.916 xcodebuild[8267:80b] [MT] ASSERTION FAILURE in    
/SourceCache/DevToolsBase/DevToolsBase-1648/pbxcore/Target.subproj/PBXTarget.m:597
Details:  Assertion failed: (nil == _buildContext) || (nil == [_buildContext target])
Object:   <PBXLegacyTarget:0x104b97370>
Method:   -dealloc
Thread:   <NSThread: 0x100b141a0>{name = (null), num = 1}
Backtrace:
  0  0x000000010035feaf -[XCAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in DevToolsCore)
  1  0x000000010035fc1a _XCAssertionFailureHandler (in DevToolsCore)
  2  0x00000001002790d1 -[PBXTarget dealloc] (in DevToolsCore)
  3  0x00000001002911e8 -[PBXLegacyTarget dealloc] (in DevToolsCore)
  4  0x00000001002c5b16 -[PBXTargetBookmark dealloc] (in DevToolsCore)
  5  0x00007fff8224ff71 __CFBasicHashStandardCallback (in CoreFoundation)
  6  0x00007fff82250931 __CFBasicHashDrain (in CoreFoundation)
  7  0x00007fff822396b3 _CFRelease (in CoreFoundation)
  8  0x0000000100254171 -[PBXProject dealloc] (in DevToolsCore)
  9  0x00007fff82262d56 _CFAutoreleasePoolPop (in CoreFoundation)
 10  0x00007fff841b530c -[NSAutoreleasePool drain] (in Foundation)
 11  0x000000010000c60d
 12  0x00000001000014f4
** INTERNAL ERROR: Uncaught Exception **
Exception: ASSERTION FAILURE in /SourceCache/DevToolsBase/DevToolsBase-1648/pbxcore/Target.subproj/PBXTarget.m:597
Details:  Assertion failed: (nil == _buildContext) || (nil == [_buildContext target])
Object:   <PBXLegacyTarget:0x104b97370>
Method:   -dealloc
Thread:   <NSThread: 0x100b141a0>{name = (null), num = 1}
Backtrace:
  0  0x000000010035feaf -[XCAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in DevToolsCore)
  1  0x000000010035fc1a _XCAssertionFailureHandler (in DevToolsCore)
  2  0x00000001002790d1 -[PBXTarget dealloc] (in DevToolsCore)
  3  0x00000001002911e8 -[PBXLegacyTarget dealloc] (in DevToolsCore)
  4  0x00000001002c5b16 -[PBXTargetBookmark dealloc] (in DevToolsCore)
  5  0x00007fff8224ff71 __CFBasicHashStandardCallback (in CoreFoundation)
  6  0x00007fff82250931 __CFBasicHashDrain (in CoreFoundation)
  7  0x00007fff822396b3 _CFRelease (in CoreFoundation)
  8  0x0000000100254171 -[PBXProject dealloc] (in DevToolsCore)
  9  0x00007fff82262d56 _CFAutoreleasePoolPop (in CoreFoundation)
 10  0x00007fff841b530c -[NSAutoreleasePool drain] (in Foundation)
 11  0x000000010000c60d
 12  0x00000001000014f4

Stack:
  0  0x00007fff822ded06 __exceptionPreprocess (in CoreFoundation)
  1  0x00007fff832470f3 objc_exception_throw (in libobjc.A.dylib)
  2  0x00007fff823369b9 -[NSException raise] (in CoreFoundation)
  3  0x000000010035ff6a -[XCAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in DevToolsCore)
  4  0x000000010035fc1a _XCAssertionFailureHandler (in DevToolsCore)
  5  0x00000001002790d1 -[PBXTarget dealloc] (in DevToolsCore)
  6  0x00000001002911e8 -[PBXLegacyTarget dealloc] (in DevToolsCore)
  7  0x00000001002c5b16 -[PBXTargetBookmark dealloc] (in DevToolsCore)
  8  0x00007fff8224ff71 __CFBasicHashStandardCallback (in CoreFoundation)
  9  0x00007fff82250931 __CFBasicHashDrain (in CoreFoundation)
 10  0x00007fff822396b3 _CFRelease (in CoreFoundation)
 11  0x0000000100254171 -[PBXProject dealloc] (in DevToolsCore)
 12  0x00007fff82262d56 _CFAutoreleasePoolPop (in CoreFoundation)
 13  0x00007fff841b530c -[NSAutoreleasePool drain] (in Foundation)
 14  0x000000010000c60d
 15  0x00000001000014f4

Abort trap
+2  A: 

I have the exact same symptoms... and no clue. It use to work fine with my projects. I drastically changed my build settings and now it does this???

Even if build settings are wrong XCode should not crash.

For me it still generate the valid binaries at the end. Sounds like XCode crashing when closing the project and deallocating something.

However it seems that I have found a way of getting rid of the errors by deleting all the .pbxuser and the .perspectivev3 file inside the xcode project package.

If you are like me and you have a ton of Xcode projects you might want to run the following command at the root of your code base:

find . -type f -name "*.pbxuser" -exec rm -f {} \;
find . -type f -name "*.perspectivev3" -exec rm -f {} \;
Steph
Thanks, I'll give that a try. Do you know what those files contain?
Derek Clarkson
I think those files contains user settings.
Steph
Thanks. I renamed the $USER.pbxuser file before the build and the problem went away. After the build I restored it. All is now at peace with the world.
Derek Clarkson
hi what do you mean run the following command at the ROOT of your code base?? where can i find the root of my code base? do you mean run this command in terminal?
Pavan
A: 

I also had this fix my problem where I was unable to open an XCode project when starting the XCode application. I had installed an older version of XCode as well as an older version of the iOS SDK.

djdrzzy