Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode 4.3 organizer crash

I've installed the XCode 4.3. I've seen that in preferences general tab, there is the "iOS device discovery" tab. Maybe it was there before too, but I just noticed now. So I've checked it, after this I can do anything, but the XCode crashes constantly when I try to access the organizer's devices tab.

Any clues for solution?


Update: I've deleted it and reinstalled it from the Mac App Store, but it didn't help


Update: I've submitted the bug to Apple, they marked it as duplicate and after this they closed both of them. So, I hope we will have a solution from Apple.

like image 665
Infinite Possibilities Avatar asked Feb 17 '12 09:02

Infinite Possibilities


3 Answers

I can't take full credit for this. I found it here and added a little bit to the end that I needed in my case.

Create readcert.m with these contents:

#import <Security/Security.h>
#import <Foundation/Foundation.h>

void checkCerts () {
    OSStatus status;

    const void *keys[] = {
        kSecClass,
        kSecReturnRef,
        kSecMatchLimit
    };
    const void *values[] = {
        kSecClassCertificate,
        kCFBooleanTrue,
        kSecMatchLimitAll
    };
    CFDictionaryRef query = CFDictionaryCreate(NULL, keys, values, 3, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);

    CFArrayRef results;
    if ((status = SecItemCopyMatching((CFDictionaryRef) query, (CFTypeRef *)&results)) != noErr) {
        NSLog(@"Failed to copy certificates: %d", status);
        return;
    }

    CFIndex count = CFArrayGetCount(results);
    CFIndex i;
    for (i = 0; i < count; i++) {
        SecCertificateRef cert = (SecCertificateRef) CFArrayGetValueAtIndex(results, i);
        CFErrorRef error;
        CFDictionaryRef vals = SecCertificateCopyValues(cert, NULL, &error);
         if (vals == NULL) {
            CFStringRef subjectSummary = SecCertificateCopySubjectSummary(cert);
              NSLog(@"Found a triggering certificate: %@", subjectSummary);
         }
    }

    CFRelease(results);
}

int main (int argc, char *argv[]) {
    NSAutoreleasePool *p = [[NSAutoreleasePool alloc] init];
    checkCerts();
    [p release];

    return 0;
}

Then, compile it with:

clang -o readcert readcert.m -framework Security -framework Foundation

Then run it:

./readcert

It should output the name of the bad certificate. In my case, it was a certificate from a Linksys router. I deleted the certificate from my keychain, but Xcode was still crashing and readcert was still saying it was there, so I ended up executing this command.

sudo security delete-certificate -c Linksys_WRVS4400Nv2

I'm not sure where the certificate was coming from, I didn't see it in the login or system keychains, but after deleting it from the command line, everything was peachy again in Xcode.

like image 88
Fls'Zen Avatar answered Dec 19 '22 15:12

Fls'Zen


Same Problem here. I just created a new user on my system. With it I have no problem open the Devices in the Organizer Window.... strange...

Edit: I've deleted one certificate in my keychain that solve the problem for me. It was a certificate which was not trustful. Maybe this will help you.

Note that the "harmful" certificate might not be a development certificate or related to development/provisioning at all. Make sure to check for "Certificates", not just "My certificates" in Keychain. The culprit could be any certificate, like a company-signed SSL certificate etc.

like image 32
Ozone Avatar answered Dec 19 '22 15:12

Ozone


Same Problem. Not happy. I have a hard time believing apple released this in such a state. XCode has crashed at least 25x today on me.

like image 29
DoctorG Avatar answered Dec 19 '22 14:12

DoctorG