Why does this code crash in 64 bit? - It works fine 32 bit.
It's loading a nib for a UIView
- (id) awakeAfterUsingCoder:(NSCoder*)aDecoder {
BOOL theThingThatGotLoadedWasJustAPlaceholder = ([[self subviews] count] == 0);
if (theThingThatGotLoadedWasJustAPlaceholder) {
ALTimelineView* theRealThing = [[self class] loadFromNib];
// pass properties through
theRealThing.frame = self.frame;
theRealThing.autoresizingMask = self.autoresizingMask;
theRealThing.alpha = self.alpha;
theRealThing.hidden = self.hidden;
[theRealThing internalInit];
// convince ARC that we're legit
CFRelease((__bridge const void*)self);
CFRetain((__bridge const void*)theRealThing);
return theRealThing;
}
return self;
}
loadFromNib
+ (id) loadFromNib {
NSString* nibName = NSStringFromClass([self class]);
NSArray* elements = [[NSBundle mainBundle] loadNibNamed:nibName owner:nil options:nil];
for (NSObject* anObject in elements) {
if ([anObject isKindOfClass:[self class]]) {
return anObject;
}
}
return nil;
}
The error I'm getting is EXC_BAD_ACCESS (code=EXC_I386_GPFLT)