Q:

objc_msgSend EXC_BAD_ACCESS when using a close button

In my project I've added a close button in the top corner right like this:
int closeBtnOffset = 10;
UIImage* closeBtnImg = [UIImage imageNamed:@"popupCloseBtn.png"];
UIButton* closeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[closeBtn setImage:closeBtnImg forState:UIControlStateNormal];
[closeBtn setFrame:CGRectMake( background.frame.origin.x + background.frame.size.width - closeBtnImg.size.width - closeBtnOffset, 
                               background.frame.origin.y ,
                               closeBtnImg.size.width + closeBtnOffset, 
                               closeBtnImg.size.height + closeBtnOffset)];
[closeBtn addTarget:self action:@selector(closePopupWindow) forControlEvents:UIControlEventTouchUpInside];
[bigPanelView addSubview: closeBtn];

The closePopupWindw method looks like this:
-(void)closePopupWindow
{
    //remove the shade
    [[bigPanelView viewWithTag: kShadeViewTag] removeFromSuperview];
    [self performSelector:@selector(closePopupWindowAnimate) withObject:nil afterDelay:0.1];

}

The build succeeds but when I click the closeBtn button, the program shuts down with this message: http://i45.tinypic.com/ddndsl.png
I think that there is nothing wrong with the code since I copied it from another project and it works well there, but in the other project they didn't use ARC, and I'm not sure if that is the problem. 
EDIT:
-(void)closePopupWindowAnimate
{

    //faux view
    __block UIView* fauxView = [[UIView alloc] initWithFrame: CGRectMake(10, 10, 200, 200)];
    [bgView addSubview: fauxView];

    //run the animation
    UIViewAnimationOptions options = UIViewAnimationOptionTransitionFlipFromLeft |
    UIViewAnimationOptionAllowUserInteraction    |
    UIViewAnimationOptionBeginFromCurrentState;

    //hold to the bigPanelView, because it'll be removed during the animation

    [UIView transitionFromView:bigPanelView toView:fauxView duration:0.5 options:options completion:^(BOOL finished) {

        //when popup is closed, remove all the views
        for (UIView* child in bigPanelView.subviews) {
            [child removeFromSuperview];
        }
        for (UIView* child in bgView.subviews) {
            [child removeFromSuperview];
        }

        [bgView removeFromSuperview];

    }];
}

A:

You are accessing object which have been released already, it is always good idea to use properties, and set the properties type strong(using ARC) so they can retain place in memory as long as your view is active. 
Declare your UIButton as the class Property it will solve your problem.  You should see also that your button is added on bigPanelView and you are removing this view before you call the method closePopupWindowAnimate

