I have an XCode project that compiles and runs fine but when I add an element to the UI of a particular XIB it crashes XCode when I try to save or when XCode loses focus. Looking at the error data of the crash it seems to be an Assertion Failure relating to an NSTableHeader but I don't understand where to go from there? I am not using auto-layout and this is an OSX app.
Process: Xcode [2505]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 7.3.1 (10188.1)
Build Info: IDEFrameworks-10188001000000000~3
App Item ID: 497799835
App External ID: 817226719
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [2505]
User ID: 501
Date/Time: 2016-06-14 11:30:04.824 -0700
OS Version: Mac OS X 10.11.5 (15F34)
Report Version: 11
Anonymous UUID: 20048F22-546D-D351-6F8C-D73FF28F4650
Time Awake Since Boot: 67000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
ProductBuildVersion: 7D1014
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEInterfaceBuilder/IDEInterfaceBuilder-10117/InterfaceBuilderKit/Document/ObjectContainer/IBObjectContainer.m:513
Details: Can't get the OID of an object not in the document: <NSTableHeaderView: 0x7fc5daeefd90>
Object: <IBObjectContainer: 0x7fc5dae4eeb0>
Method: -objectIDForObject:
Thread: <NSThread: 0x7fc5d3e17e80>{number = 1, name = main}
Hints: None
Backtrace:
0 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 -[IBObjectContainer objectIDForObject:] (in IDEInterfaceBuilderKit)
4 -[IBDocument objectIDForObject:] (in IDEInterfaceBuilderKit)
5 -[IBDocument documentArchiver:referenceIDForObject:referenceType:] (in IDEInterfaceBuilderKit)
6 -[IBDocumentArchiver referenceIDForObject:withReferenceType:] (in IDEInterfaceBuilderKit)
7 -[IBDocumentArchiver archiveObjectReference:referenceType:forKey:] (in IDEInterfaceBuilderKit)
8 -[IBDocumentArchiver archiveObjectReference:referenceType:forKey:defaultValue:] (in IDEInterfaceBuilderKit)
9 -[NSTableView(IBDocumentArchivingGenerator) archiveWithDocumentArchiver:] (in IDEInterfaceBuilderCocoaIntegration)
10 __51-[IBDocumentArchiver archiveObject:forOptionalKey:]_block_invoke (in IDEInterfaceBuilderKit)
11 -[IBDocumentArchiver recurseWithElementNamed:forObject:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
12 -[IBDocumentArchiver archiveObject:forOptionalKey:] (in IDEInterfaceBuilderKit)
13 __59-[IBDocumentArchiver archiveArray:withName:forOptionalKey:]_block_invoke (in IDEInterfaceBuilderKit)
14 -[IBDocumentArchiver recurseWithElementNamed:forObject:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
15 -[IBDocumentArchiver archiveArray:withName:forOptionalKey:] (in IDEInterfaceBuilderKit)
16 -[IBDocumentArchiver archiveArray:withName:forOptionalKey:defaultValue:] (in IDEInterfaceBuilderKit)
17 -[NSView(IBViewIntegration) ibArchiveSubviews:] (in IDEInterfaceBuilderKit)
18 -[NSView(IBDocumentArchivingGenerator) archiveWithDocumentArchiver:] (in IDEInterfaceBuilderKit)
19 -[IBNSCustomView(IBDocumentArchivingGenerator) archiveWithDocumentArchiver:] (in IDEInterfaceBuilderCocoaIntegration)
20 __51-[IBDocumentArchiver archiveObject:forOptionalKey:]_block_invoke (in IDEInterfaceBuilderKit)
21 -[IBDocumentArchiver recurseWithElementNamed:forObject:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
22 -[IBDocumentArchiver archiveObject:forOptionalKey:] (in IDEInterfaceBuilderKit)
23 __59-[IBDocumentArchiver archiveArray:withName:forOptionalKey:]_block_invoke (in IDEInterfaceBuilderKit)
24 -[IBDocumentArchiver recurseWithElementNamed:forObject:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
25 -[IBDocumentArchiver archiveArray:withName:forOptionalKey:] (in IDEInterfaceBuilderKit)
26 -[IBDocument archiveTopLevelObjects:] (in IDEInterfaceBuilderKit)
27 -[IBDocument archiveAndVerifyArchivingOfTopLevelObjects:] (in IDEInterfaceBuilderKit)
28 -[IBDocument archivePlatformIndependentDataWithDocumentArchiver:] (in IDEInterfaceBuilderKit)
29 -[IBDocument archiveDocument:] (in IDEInterfaceBuilderKit)
30 -[IBDocumentArchiver recurseWithElementNamed:forObject:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
31 -[IBDocumentArchiver archiveDocument:withType:compatibilityVersion:] (in IDEInterfaceBuilderKit)
32 -[IBDocumentArchiver dataFromArchiveDocument:withType:compatibilityVersion:] (in IDEInterfaceBuilderKit)
33 __46-[IBDocument fileWrapperOfType:options:error:]_block_invoke (in IDEInterfaceBuilderKit)
34 -[IBDocument fileWrapperOfType:options:error:] (in IDEInterfaceBuilderKit)
35 -[IBDocument fileWrapperOfType:error:] (in IDEInterfaceBuilderKit)
36 -[NSDocument writeToURL:ofType:error:] (in AppKit)
37 -[IBDocument writeToURL:ofType:error:] (in IDEInterfaceBuilderKit)
38 -[NSDocument writeToURL:ofType:forSaveOperation:originalContentsURL:error:] (in AppKit)
39 -[IBDocument writeToURL:ofType:forSaveOperation:originalContentsURL:error:] (in IDEInterfaceBuilderKit)
40 -[NSDocument _writeSafelyToURL:ofType:forSaveOperation:forceTemporaryDirectory:error:] (in AppKit)
41 -[NSDocument _writeSafelyToURL:ofType:forSaveOperation:error:] (in AppKit)
42 -[NSDocument writeSafelyToURL:ofType:forSaveOperation:error:] (in AppKit)
43 -[IDEEditorDocument writeSafelyToURL:ofType:forSaveOperation:error:] (in IDEKit)
44 __66-[NSDocument saveToURL:ofType:forSaveOperation:completionHandler:]_block_invoke_22463 (in AppKit)
45 __66-[NSDocument saveToURL:ofType:forSaveOperation:completionHandler:]_block_invoke2460 (in AppKit)
46 __66-[NSDocument saveToURL:ofType:forSaveOperation:completionHandler:]_block_invoke_22313 (in AppKit)
47 __50-[IDEEditorDocument continueFileAccessUsingBlock:]_block_invoke.74 (in IDEKit)
48 -[NSDocument continueFileAccessUsingBlock:] (in AppKit)
49 -[IDEEditorDocument continueFileAccessUsingBlock:] (in IDEKit)
50 __101-[NSDocument _fileCoordinator:asynchronouslyCoordinateReadingContentsAndWritingItemAtURL:byAccessor:]_block_invoke_2 (in AppKit)
51 __68-[IDEEditorDocument continueAsynchronousWorkOnMainThreadUsingBlock:]_block_invoke (in IDEKit)
52 __62-[NSDocumentController(NSInternal) _onMainThreadInvokeWorker:]_block_invoke2079 (in AppKit)
53 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ (in CoreFoundation)
54 __CFRunLoopDoBlocks (in CoreFoundation)
55 __CFRunLoopRun (in CoreFoundation)
56 CFRunLoopRunSpecific (in CoreFoundation)
57 RunCurrentEventLoopInMode (in HIToolbox)
58 ReceiveNextEventCommon (in HIToolbox)
59 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
60 _DPSNextEvent (in AppKit)
61 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
62 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
63 -[NSApplication run] (in AppKit)
64 NSApplicationMain (in AppKit)
65 0x000000010c51a39b (in Xcode)
66 start (in libdyld.dylib)
abort() called
I am having a similar problem, and I think it is because my XIB files are quite old (from XCode 4.6 or older). There was a major change in the xml-schema since then. (See this article.) I was able to make the change to my XIB I needed to make by fishing XCode 6 out of Time Machine and copying alongside XCode 7 in Applications. I have not attempted to open any projects with XCode 6, but I opened the XIB directly and made the change I needed to make outside the project.
What's weird is that I was able to modify one of these XIB files only a couple of weeks ago. XCode (7) then completely rewrote the XML with the new schema, and it now has no problem editing that XIB. Also, even XCode 6 crashes now if I try to upgrade an XIB to a newer schema. (I guess I can only edit my XIB because XCode 6, unlike XCode 7, can still edit the old schema without upgrading it.)
I think Apple may have introduced a software update in the last couple of weeks that is external to XCode but nevertheless broke the xml upgrade. Or else something else I've done did it, but I can't think what it could be.
FWIW: I'm on 10.11.5, so at least the Interface Builder part of XCode 6 still works on the latest OS.
EDIT: I was able to upgrade the XML and thus be able to edit XIB in XCode 7.3.1 using a slightly more involved solution:
Use Fusion or Parallels to create a 10.8 virtual.
Install XCode 5.1.1 in the virtual. (You can find download links here.)
Open the XIB in XCode 5.1.1 and upgrade it. You will now be able to open it and save it in XCode 7.
Related
My Xcode crashes, After crash occur, I updated it to the latest version, i.e 8.0
But it doesn't stop crashing.
Process: Xcode [528]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 8.0 (11246)
Build Info: IDEFrameworks-11246000000000000~3
App Item ID: 497799835
App External ID: 818744938
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [528]
User ID: 501
Date/Time: 2016-10-08 14:08:34.396 +0500
OS Version: Mac OS X 10.11.6 (15G1004)
Report Version: 11
Anonymous UUID: 844112AA-C988-B86A-8002-19E0765599D4
Time Awake Since Boot: 180 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:ProductBuildVersion: 8A218a
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks- 11246/IDEKit/Application/IDEWindowMenuController.m:101
Details: itemName should be a non-empty string, but it's an empty string
Object: <IDEWindowMenuController>
Method: +titleForItemWithURL:name:image:parentLocations:presentedParentLocationCount:includeIconInTitles:
Thread: <NSThread: 0x7fc74ad179f0>{number = 1, name = main}
Hints: None
Following is the Back Trace Report:
Backtrace:
0 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 +[IDEWindowMenuController titleForItemWithURL:name:image:parentLocations:presentedParentLocationCount:includeIconInTitles:] (in IDEKit)
4 __90+[IDEWindowMenuController _createAttributedTitlesForItemDictionaries:includeIconInTitles:]_block_invoke (in IDEKit)
5 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke (in CoreFoundation)
6 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] (in CoreFoundation)
7 +[IDEWindowMenuController _createAttributedTitlesForItemDictionaries:includeIconInTitles:] (in IDEKit)
8 -[IDEWindowMenuController _windowMenuItemsWithIconInTitles:] (in IDEKit)
9 -[IDEApplicationController applicationDockMenu:] (in IDEKit)
10 -[NSApplication _createDockMenu:] (in AppKit)
11 __44-[NSApplication _copyPublicPersistentUIInfo]_block_invoke (in AppKit)
12 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ (in CoreFoundation)
13 __CFRunLoopDoBlocks (in CoreFoundation)
14 __CFRunLoopRun (in CoreFoundation)
15 CFRunLoopRunSpecific (in CoreFoundation)
16 RunCurrentEventLoopInMode (in HIToolbox)
17 ReceiveNextEventCommon (in HIToolbox)
18 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
19 _DPSNextEvent (in AppKit)
20 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
21 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
22 -[NSApplication run] (in AppKit)
23 NSApplicationMain (in AppKit)
24 start (in libdyld.dylib)
abort() called
Application Specific Signatures:
![(itemName) isEqualToString:#""]
Try with these please :
Open Xcode
Preferences
Locations
The Derived Data option will tell you where your directory is
Delete that directory
Try to open your project
And check this thread also:
https://forums.developer.apple.com/thread/39603
This crash occurred due to problem in my project, so i was beginner, and I assumed that problem is in my X-Code.
The Project loaded automatically and causes crash to occur.
After opening some one previous project, and tried to stop this crashed project, Crashing stopped.. :P
Running a test bot that's returning this warning and not creating an installable product. Anyone know what that status means?
This is the build error:
`xcodebuild[98753:3595809] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-9548.1/IDEFoundation/Distribution/IDEDistributionMethodStep.m:123
Details: Assertion failed: contentPath
Object: <IDEDistributionMethodStep>
Method: +distributionMethodForSameAsArchive:contentPath:task:logAspect:
Thread: <NSThread: 0x7fa7a9d157f0>{number = 1, name = main}
Hints: None
Backtrace:
0 0x000000010a6dcacd -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
1 0x000000010a6dc601 _DVTAssertionHandler (in DVTFoundation)
2 0x000000010a6dc818 _DVTAssertionFailureHandler (in DVTFoundation)
3 0x000000010a6dc77a _DVTAssertionFailureHandler (in DVTFoundation)
4 0x000000010ac49f04 +[IDEDistributionMethodStep distributionMethodForSameAsArchive:contentPath:task:logAspect:] (in IDEFoundation)
5 0x000000010ac49320 -[IDEDistributionMethodStep loadFromPropertyList:error:] (in IDEFoundation)
6 0x000000010adb7f2f -[IDEDistributionDriver runWithDestinationPath:error:] (in IDEFoundation)
7 0x000000010b3e417b -[Xcode3CommandLineBuildTool _distributeArchiveAndExit] (in Xcode3Core)
8 0x000000010b3e7a78 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
9 0x000000010a4a5931 (in xcodebuild)
10 0x00007fff946d95ad start (in libdyld.dylib)`
I had this same problem. My app links to a .framework, and my framework had the SKIP_INSTALL build setting set to YES. Changing it to NO fixed it.
OK, SO I've received a crash report for one of my apps, but I swear I'm 100% confused.
This is what the "core" part of it looks like :
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Regions Near 0:
-->
__TEXT 0000000100000000-0000000100015000 [ 84K] r-x/rwx SM=COW /Applications/MY_APP/Contents/MacOS/MY_APP
Application Specific Information:
objc[337]: garbage collection is ON
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_c.dylib 0x00007fff90128650 strlen + 16
1 MY_BUNDLE_ID 0x0000000100008f12 0x100000000 + 36626
2 MY_BUNDLE_ID 0x000000010000b435 0x100000000 + 46133
3 MY_BUNDLE_ID 0x0000000100003c90 0x100000000 + 15504
4 com.apple.CoreFoundation 0x00007fff9065147a _CFXNotificationPost + 2554
5 com.apple.Foundation 0x00007fff8e5fe846 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
6 com.apple.AppKit 0x00007fff9a7894a7 -[NSTableView textDidChange:] + 377
7 com.apple.CoreFoundation 0x00007fff9065147a _CFXNotificationPost + 2554
8 com.apple.Foundation 0x00007fff8e5fe846 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
9 com.apple.AppKit 0x00007fff9a15c260 -[NSTextView(NSSharing) didChangeText] + 339
10 com.apple.AppKit 0x00007fff9a7f8381 _NSDoUserReplaceForCharRange + 390
11 com.apple.AppKit 0x00007fff9a7f85b1 _NSDoUserDeleteForCharRange + 38
12 com.apple.AppKit 0x00007fff9a7e1e72 -[NSTextView(NSKeyBindingCommands) deleteBackward:] + 440
13 com.apple.AppKit 0x00007fff9a18a1cc -[NSResponder doCommandBySelector:] + 75
14 com.apple.AppKit 0x00007fff9a18a02e -[NSTextView doCommandBySelector:] + 197
15 com.apple.AppKit 0x00007fff9a20cf4e -[NSKeyBindingManager(NSKeyBindingManager_MultiClients) interpretEventAsCommand:forClient:] + 2200
16 com.apple.AppKit 0x00007fff9a20c3bb -[NSTextInputContext handleEvent:] + 939
17 com.apple.AppKit 0x00007fff9a20bf87 -[NSView interpretKeyEvents:] + 183
18 com.apple.AppKit 0x00007fff9a158f67 -[NSTextView keyDown:] + 723
19 com.apple.AppKit 0x00007fff9a374120 -[NSWindow sendEvent:] + 9687
20 com.apple.AppKit 0x00007fff9a36f744 -[NSApplication sendEvent:] + 5761
21 com.apple.AppKit 0x00007fff9a2852fa -[NSApplication run] + 636
22 com.apple.AppKit 0x00007fff9a229cb6 NSApplicationMain + 869
23 MY_BUNDLE_ID 0x0000000100002014 0x100000000 + 8212
Do you have any idea what might be going wrong?
Or could you just point me to the right direction?
As an aside :
Could anyone guide me how to make e.g. 0x00007fff90128650 more... meaningful and make it (in some future crash report) also show the name of the function?
Your crash log give you lot of informations:
first you crashed because you tried to access to address 0 into ur program and kernel is not happy.
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
See, you get a segmentation, by the way it's starting to the 0x00 address, so it's like you're directly accessing a 0 / nil pointer.
Like this
char* adress = 0;
printf("get %p", adress); // will output 0x0
printf("get %p", adress[0]); // will make a EXC_BAD_ACCESS
You should really focus on this.
From the crash stack there is three interesting things:
6 com.apple.AppKit 0x00007fff9a7894a7 -[NSTableView textDidChange:] + 377
5 com.apple.Foundation 0x00007fff8e5fe846 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
0 libsystem_c.dylib 0x00007fff90128650 strlen + 16
[textDidChange] is one of the last call who caused the crash, by the way you're sending a notification when the [textDidChange] is fired. And last line who actually make the crash: strlen + 16 is because there's something who think it can get a char length from a valid pointer address and it's actually not the case.
According to me, you should check what you're sending into your notification.
_NSDoUserReplaceForCharRange
_NSDoUserDeleteForCharRange
When you look deeply into the stack crash, it really seems that's it's appearing when you make cell - insertion / deletion into ur tableViewController. You should check that sometime someone push invalid data, or not using the edit cell the way it's supposed to be.
So here's the resume:
1 Someone edit a tableViewCell, he doesn't insert or code doesn't insert what it's supposed to be.
2 You're sending a notification with a non-valid data inside it.
3 When the strlen(invalid_dataStructure) is fired, it make ur app crash
By the way i'm just "guessing", since i don't know actually your code implementation. But i hope it can give you lots of clues for your debugging session.
Usually the problem is that you need a "retain" property.
You need to enable Zombies for debug mode.
in xCode 4 click "edit scheme"->"Diagnostics"->"Enable Zombie Objects"
It will show you in console what "removed" object you try to access when crashing.
this should help.
you will see somthing like this:
2010-01-25 14:35:24.840 MyApplication[1393:20b] *** -[CFString retain]: message sent to deallocated instance 0x42a5060
You can also enable "Malloc logging" and after crash enter such command in debug console:
shell malloc_history 1393 0x42a5060
there you can find all alloc/release stack. just look at release and alloc commands.
I got a very similar crash report trying to open graphic-heavy applications (pymol and coot) (See below)
I found out that if I disconnected my mac from my external monitor, the programs worked again. I was using a USB-HDMI connector - apparently this is a bad idea. I just purchased a microUSB-HDMI connector and I expect this will work better. The programs run if I just use my mac book's own monitor display.
Time Awake Since Boot: 19000 seconds
Time Since Wake: 110 seconds
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Regions Near 0:
-->
__TEXT 0000000100000000-0000000100cff000 [ 13.0M] r-x/rwx SM=COW /Applications/MacPyMOL.app/Contents/MacOS/MacPyMOL
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.opengl 0x00007fff8333857c CGLDescribeRenderer + 79
1 com.schrodinger.macpymol 0x000000010083c5b4 CheckOpenGLCaps + 484
2 com.schrodinger.macpymol 0x000000010084cd8c -[PyMOLOpenGLView awakeFromNib] + 1420
3 com.apple.CoreFoundation 0x00007fff8a10785f -[NSSet makeObjectsPerformSelector:] + 223
4 com.apple.AppKit 0x00007fff88b935cd -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 1216
5 com.apple.AppKit 0x00007fff886a3605 loadNib + 384
6 com.apple.AppKit 0x00007fff88c14749 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 727
7 com.apple.AppKit 0x00007fff88c14ca8 +[NSBundle(NSNibLoadingInternal) _loadNibFile:externalNameTable:options:withZone:] + 150
8 com.apple.AppKit 0x00007fff886a2bc0 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 631
9 com.schrodinger.macpymol 0x000000010084d77b main + 1499
10 com.schrodinger.macpymol 0x0000000100007494 start + 52
I have an existing App which works fine for others with Xcode 4.0. I have Xcode 4.02 and xcode crashes as soon as I open this app. At times, it just hangs up and I have to 'Force Quit' Xcode. Other times, it gives me a 'Internal logic error' window and shows the following error.
**ASSERTION FAILURE** in /SourceCache/IDEFoundation/IDEFoundation-287/Framework/Classes/Model/SourceControl/IDESourceControlTree.m:2548
Details: (addedItem) should not be nil.
Object: <IDESourceControlWorkingTree: 0x202020900>
Method: -mergeStatusOperationResults:forLocalStatusOnly:
Thread: <NSThread: 0x2025f3900>{name = (null), num = 16}
Hints: None
Backtrace:
0 0x0000000100949773 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
1 0x000000010006d394 _DVTAssertionFailureHandler (in DVTFoundation)
2 0x000000010055e1c1 __78-[IDESourceControlWorkingTree mergeStatusOperationResults:forLocalStatusOnly:]_block_invoke_0 (in IDEFoundation)
3 0x0000000100005fdc __38-[DVTDispatchLock performLockedBlock:]_block_invoke_0 (in DVTFoundation)
4 0x00007fff822cd51b dispatch_barrier_sync_f (in libSystem.B.dylib)
5 0x0000000100005f83 -[DVTDispatchLock performLockedBlock:] (in DVTFoundation)
6 0x000000010055ccd3 -[IDESourceControlWorkingTree mergeStatusOperationResults:forLocalStatusOnly:] (in IDEFoundation)
7 0x00000001005db64c __77-[IDESourceControlWorkingTree updateLocalStatusForDirectory:completionBlock:]_block_invoke_01137 (in IDEFoundation)
8 0x00007fff822d42c4 _dispatch_call_block_and_release (in libSystem.B.dylib)
9 0x00007fff822b2e32 _dispatch_queue_drain (in libSystem.B.dylib)
10 0x00007fff822b2c94 _dispatch_queue_invoke (in libSystem.B.dylib)
11 0x00007fff822b283e _dispatch_worker_thread2 (in libSystem.B.dylib)
12 0x00007fff822b2168 _pthread_wqthread (in libSystem.B.dylib)
13 0x00007fff822b2005 start_wqthread (in libSystem.B.dylib)
I have recently upgraded Xcode from version 3 to 4.02. I have tested a couple of other projects and they seem to run fine on 4.02. So, I know that Xcode is installed properly. Please help me figure out what am I doing wrong.
I've seen several references to the same problem that all pointed back to the answer to this question that suggests deleting the repository from Organizer.
Why do I get this assertion failure? I am using Xcode 3.1.2.
Checking Dependencies
Internal error occurred while creating dependency graph: ASSERTION FAILURE in /SourceCache/DevToolsBase/DevToolsBase-1204/pbxcore/NativeBuildSystem/XCDependencyNode.m:396
Details: command should be an instance inheriting from XCDependencyCommand, but it is nil
Object: <XCDependencyNode:0x03379d50>
Method: -addDependedNode:
Thread: <NSThread: 0x2c1e760>{name = (null), num = 4}
Backtrace:
0 0x00725da2 -[PBXTargetBuildContext(DependencyGraphEvents) handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in DevToolsCore)
1 0x0078a360 _XCAssertionFailureHandler (in DevToolsCore)
2 0x005e1f66 -[XCDependencyNode addDependedNode:] (in DevToolsCore)
3 0x005e5c4c -[XCResourcesBuildPhaseDGSnapshot copyResourceFile:ofType:toDirectory:inTargetBuildContext:] (in DevToolsCore)
4 0x005e55d6 -[XCResourcesBuildPhaseDGSnapshot computeDependenciesForBuildFileReference:inTargetBuildContext:] (in DevToolsCore)
5 0x005e34b4 -[XCBuildPhaseDGSnapshot computeDependenciesForAllBuildFileReferencesInTargetBuildContext:] (in DevToolsCore)
6 0x005e2b13 -[XCBuildPhaseDGSnapshot computeDependenciesInTargetBuildContext:] (in DevToolsCore)
7 0x005e4ebb -[XCResourcesBuildPhaseDGSnapshot computeDependenciesInTargetBuildContext:] (in DevToolsCore)
8 0x005d8ebe -[XCProductTypeSpecification computeDependenciesInTargetBuildContext:] (in DevToolsCore)
9 0x005d4866 -[XCNativeTargetDGSnapshot computeDependenciesInTargetBuildContext:] (in DevToolsCore)
10 0x005d1efd -[PBXTargetBuildContext createDependencyGraphWithTargetDGSnapshot:] (in DevToolsCore)
11 0x005d10c5 -[PBXTargetBuildContext(DependencyGraphEvents) dg_setTargetSnapshot:] (in DevToolsCore)
12 0x936199dd __invoking___ (in CoreFoundation)
13 0x936193c8 -[NSInvocation invoke] (in CoreFoundation)
14 0x005d0aeb -[PBXTargetBuildContext(DependencyGraphEvents) processDependencyGraphEvents] (in DevToolsCore)
15 0x936199dd __invoking___ (in CoreFoundation)
16 0x936193c8 -[NSInvocation invoke] (in CoreFoundation)
17 0x005d0458 -[XCInvocationQueue _processNextInvocationInThreadSlotNumber:] (in DevToolsCore)
18 0x005d0107 -[XCInvocationQueue _processInvocationsInThreadSlotNumber:] (in DevToolsCore)
19 0x91a11e0d -[NSThread main] (in Foundation)
20 0x91a119b4 __NSThread__main__ (in Foundation)
21 0x9757d155 _pthread_start (in libSystem.B.dylib)
22 0x9757d012 thread_start (in libSystem.B.dylib)
I ran into this problem too and found that my issue related to the following configuration settings:
CONFIGURATION_BUILD_DIR = $(BUILD_DIR)/release/bin
CONFIGURATION_TEMP_DIR = build/$(CONFIGURATION_BUILD_DIR)
I removed the settings, just as a test, and the error that Xcode was producing went away.
This looks like XCode is crashing trying to build your application.
Judging by the method names in the traceback, it's looking at dependencies trying to figure out what to build. You might be able to work around the problem by doing a "clean all targets" and trying again.
You might also want to file a bug report at http://developer.apple.com/bugreporter/