views:

41

answers:

1

In a project I'm using Three20 for some of the code (not using the TTNavigator or some advanced features, only a few things).

When I try to create an UIActionSheet, I get an EXC_BAD_ACCESS error. The code that triggers it is as follows (on a UIViewController)

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];

    UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Is Anyone Injured?"
                                                             delegate:self
                                                    cancelButtonTitle:nil
                                               destructiveButtonTitle:nil
                                                    otherButtonTitles:nil];
    [actionSheet addButtonWithTitle:@"Cancel"];
    [actionSheet showInView:self.view];
}

As soon as I run this code, I get an EXC_BAD_ACCESS error, and the stack points to the method called - (CGRect)frameWithKeyboardSubtracted:(CGFloat)plusHeight

inside Three20's UIViewAdditions.m.

I commented out the method, and then got an EXC_BAD_INSTRUCTION instead, but this time in the method called - (NSDictionary *)userInfoForKeyboardNotification. Again, commented that out, and now failed in another method of UIViewAdditions.m.

Did anyone run into this issue? I've tried debugging with NSZombieEnabled, but it was not the cause (no messages were sent to zombie objects).

A: 

I solved by checking on each of the Three20 projects the "Build Active Architectures Only" checkbox. It seems to be a magical setting for several Three20 related errors... alt text

pgb