landonf / XcodePostFacto

Xcode 6.3 for Mac OS X 10.9
Other
68 stars 9 forks source link

Robust shared frameworks loading #3

Closed 0xced closed 9 years ago

0xced commented 9 years ago

When loaded from the ibtoold process, the shared frameworks were not found at the shared frameworks path since the main bundle of ibtoold is not the same as the one from Xcode.

Using the Xcode bundle by its identifier instead of the main bundle ensures that the shared frameworks are always found at the right place.

For some unknown reason, it would even crash while logging the error with the following stack trace:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib                 0x00007fff932c2097 objc_msgSend + 23
1   com.apple.Foundation            0x00007fff8b45e7a4 _NSDescriptionWithLocaleFunc + 41
2   com.apple.CoreFoundation        0x00007fff8b8b1ce4 __CFStringAppendFormatCore + 7332
3   com.apple.CoreFoundation        0x00007fff8b8e0263 _CFStringCreateWithFormatAndArgumentsAux + 115
4   com.apple.Foundation            0x00007fff8b45e74f -[NSPlaceholderString initWithFormat:locale:arguments:] + 132
5   com.apple.Foundation            0x00007fff8b461fac +[NSString stringWithFormat:] + 170
6   org.landonf.XcodePostFacto      0x00000001072ba15f +[XcodePostFacto ide_initializeWithOptions:error:] + 319 (XcodePostFacto.m:83)
7   com.apple.dt.IDEFoundation      0x00000001055f99b9 _IDEInitializeOnePlugInAndPrerequisites + 893
8   com.apple.dt.IDEFoundation      0x00000001055f9247 _IDEInitializePlugIns + 1004
9   com.apple.dt.IDEFoundation      0x00000001055f895a IDEInitialize + 4826
10  ibtoold                         0x0000000104c77723 0x104c65000 + 75555
11  ibtoold                         0x0000000104c76696 0x104c65000 + 71318
12  libdyld.dylib                   0x00007fff8afeb5fd start + 1
landonf commented 9 years ago

Merged; Thanks!