Xcode is at version 3.2.6, the problem is when i try to add the module “juce_audio_plugin_client” (without it everything is ok), Xcode fails to open the project and says… i attached a screenshot it will be faster:
[attachment=0]cap.jpg[/attachment]
I tried doing a xcodebuild from the cli but it fails too:
[atom@anus:~/devel/ctrlrv4/Builds/MacOSX]$ xcodebuild -project Ctrlr_Plugin_AU.xcodeproj -configuration Release_Nightly
2011-09-08 22:45:31.504 xcodebuild[3219:80b] -[PBXFileReference _setBuildPhase:]: unrecognized selector sent to instance 0x1050e9de0
2011-09-08 22:45:31.534 xcodebuild[3219:80b] [MT] ASSERTION FAILURE in /SourceCache/DevToolsBase/DevToolsBase-1809/pbxcore/PBXProject.m:1433
Details: Assertion failed: _pFlags.projectClosed
Object: <PBXProject:0x1050a0ce0>
Method: -dealloc
Thread: <NSThread: 0x100a13e90>{name = (null), num = 1}
Backtrace:
0 0x0000000100325b86 -[XCAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in DevToolsCore)
1 0x000000010032590a _XCAssertionFailureHandler (in DevToolsCore)
2 0x00000001002319da -[PBXProject dealloc] (in DevToolsCore)
3 0x00007fff879ad361 __CFBasicHashStandardCallback (in CoreFoundation)
4 0x00007fff879afd7c CFBasicHashRemoveValue (in CoreFoundation)
5 0x00007fff879c5854 CFDictionaryRemoveValue (in CoreFoundation)
6 0x000000010011f288 -[PBXPListUnarchiver _unarchiveObjectWithGlobalIDHexString:] (in DevToolsCore)
7 0x000000010011c66c -[PBXPListUnarchiver decodeRootObject] (in DevToolsCore)
8 0x000000010011a556 +[PBXProject projectWithFile:errorHandler:readOnly:] (in DevToolsCore)
9 0x000000010000bcfc
10 0x0000000100001c04
11 0x0000000000000005
2011-09-08 22:45:31.535 xcodebuild[3219:80b] ASSERTION FAILURE in /SourceCache/DevToolsBase/DevToolsBase-1809/pbxcore/PBXProject.m:1433
Details: Assertion failed: _pFlags.projectClosed
Object: <PBXProject:0x1050a0ce0>
Method: -dealloc
Thread: <NSThread: 0x100a13e90>{name = (null), num = 1}
Backtrace:
0 0x0000000100325b86 -[XCAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in DevToolsCore)
1 0x000000010032590a _XCAssertionFailureHandler (in DevToolsCore)
2 0x00000001002319da -[PBXProject dealloc] (in DevToolsCore)
3 0x00007fff879ad361 __CFBasicHashStandardCallback (in CoreFoundation)
4 0x00007fff879afd7c CFBasicHashRemoveValue (in CoreFoundation)
5 0x00007fff879c5854 CFDictionaryRemoveValue (in CoreFoundation)
6 0x000000010011f288 -[PBXPListUnarchiver _unarchiveObjectWithGlobalIDHexString:] (in DevToolsCore)
7 0x000000010011c66c -[PBXPListUnarchiver decodeRootObject] (in DevToolsCore)
8 0x000000010011a556 +[PBXProject projectWithFile:errorHandler:readOnly:] (in DevToolsCore)
9 0x000000010000bcfc
10 0x0000000100001c04
11 0x0000000000000005
xcodebuild: Error: couldn't load project /Users/atom/devel/ctrlrv4/Builds/MacOSX/Ctrlr_Plugin_AU.xcodeproj
I sometimes see this myself, but quitting and restarting Xcode usually sorts it out. Failing that, clear out your Xcode intermediates folder. I think it’s some kind of xcode internal state getting messed up.
Well i delete everything i could, i re-created the projects in the Introjucer i deleted the ~/Library/Preferences/com.apple.Xcode (or whatever the file is called) and it’s still happening and only with that one modules included. What else can i delete ?
Don’t know… Whenever I’ve seen it, it only ever seemed to happen once, and then sort itself out. If it’s an introjucer-created project, you could try re-generating it?
I emailed you the projects. Also i updated my XCode to v4.0 and the error still exists.
I created a pure Introjucer AudioPlugin project from scratch didn’t touch anything, just a new project, clicked save and open in Xcode and the same error happens, then i de-selected the juce_audio_plugin_client and still a crash.
But then i tried the two additional options “Addo source to project” and “Create local copy” and with the first one unchecked and the second one checked, the project opens (any other combination fails).
This is actually a hash collision - the items in the Xcode project are all given 64-bit identifiers, which I create by hashing the filename, and when two of them are identical, Xcode can’t handle it and crashes.
But the chances of this happening should have been mind-bogglingly small! To be extra certain that there would never be a hash collision, I add a salt to the string, then I combine two different hashes (one 32-bit and one 64-bit), then I permute that with the hash of an upper-case version of the string, and even throw in the string length for good measure… Now, I’m certainly no cryptography expert, but I’d have bet serious money that the a collision would be practically impossible! But these two strings:
"../../../../../../Volumes/CODE/code/juce/modules/juce_opengl/native/juce_android_OpenGLComponent.cpp"
"../../../../../../Volumes/CODE/code/juce/modules/juce_gui_basics/positioning/juce_MarkerList.h"
…have the same goddamn hash code, and they both occur in the default project! I mean, FFS… !!
I just pulled juce from the git repo, and i cleaned up everything, created a new GUI project in Introjucer and the Modules tab is empty.
I did nothing extra then that.
This is on Windows 7
Also on the sourceforge page there was an option in the GIT browser to download the latest snapshot of the repository as a .tar.gz file
that’s gone, did sf.net change this or did you disable it for some reason ? It was useful on Windows if you didn’t want to install the whole
GIT client package (witch is awful)
So yes, the Introjucer is writing two different files with the same key. I solved it by locating the two files and renaming them. Looking at my notes, this is the second day I’ve lost to this issue, with a similar resolution.
I can’t believe we’re getting collisions from MD5 so the program must be using the same string before hashing.
Here are the relevant parts from project.pbxproj:
DC557F7E3B65D752ADC0B174 = { isa = PBXBuildFile; fileRef = 5D8721E5B8F23744B274AF6D; };
DC557F7E3B65D752ADC0B174 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MessageRegistry.h; path = ../../../../src/rec/data/MessageRegistry.h; sourceTree = "SOURCE_ROOT"; };
5D8721E5B8F23744B274AF6D = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CleanName.cpp; path = ../../../../src/rec/music/CleanName.cpp; sourceTree = "SOURCE_ROOT"; };
Are you still on the non-modules branch? I fixed the original problem a while ago - it actually turned out not to be a hashing problem, but was to do with the way I was generating the strings…
Well, this is the second time I ran into it this year…
And this time I was able to systematically experiment somewhat. The picture was crowded because I actually have code that writes .jucer files but this time I was able to bypass that and make tiny changes to the .jucer file that made the issue disappear or reappear, simply by slightly changing the name of either of the files that collided.
I have all of this checked in in a branch somewhere including the .jucer file.