title: Thread 1: EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
body: <p>It gives error "Thread 1: EXC_BREAKPOINT (code=EXC_I386_BPT,subcode=0x0)
  My code: </p>
  
  <pre><code>@synthesize s1;
  @synthesize s2;
  @synthesize s3;
  @synthesize s4;
  @synthesize s5;
  @synthesize s6;
  @synthesize s7;
  @synthesize s8;
  @synthesize s9;
  @synthesize oImg,xImg,theImg,whoseTurn,board;
  @synthesize resetButton, myAlertView;
  
  
  - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
      if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
          // Custom initalization
      }
      return self;
  }
  
  - (void)viewDidLoad {
      oImg = [UIImage imageNamed:@"O copy.jpg"];
      xImg = [UIImage imageNamed:@"X copy.jpg"];
  
      playerToken = 1;
  
      whoseTurn.text = @"X can go";
  
      numberOfPlays = 0;
  
  
      [super viewDidLoad];
  }
  
  -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
  
      switch(playerToken){
          case 1:theImg = xImg;
              break;
          case 2:
              theImg = oImg;
              break;
      }
  
      UITouch *touch = [[event allTouches]anyObject];
      cellWasUsed = NO;
  
      if (CGRectContainsPoint([s1 frame], [touch locationInView:self.view])&amp;(s1.image == NULL)) {
          cellWasUsed = YES;
          s1.image = theImg;
      }
      if (CGRectContainsPoint([s2 frame], [touch locationInView:self.view])&amp;(s2.image == NULL)) {
          cellWasUsed = YES;
          s2.image = theImg;
      }
      if (CGRectContainsPoint([s3 frame], [touch locationInView:self.view])&amp;(s3.image == NULL)) {
          cellWasUsed = YES;
          s3.image = theImg;
      }
      if (CGRectContainsPoint([s4 frame], [touch locationInView:self.view])&amp;(s4.image == NULL)) {
          cellWasUsed = YES;
          s4.image = theImg;
      }
      if (CGRectContainsPoint([s5 frame], [touch locationInView:self.view])&amp;(s5.image == NULL)) {
          cellWasUsed = YES;
          s5.image = theImg;
      }
      if (CGRectContainsPoint([s6 frame], [touch locationInView:self.view])&amp;(s6.image == NULL)) {
          cellWasUsed = YES;
          s6.image = theImg;
      }
      if (CGRectContainsPoint([s7 frame], [touch locationInView:self.view])&amp;(s7.image == NULL)) {
          cellWasUsed = YES;
          s7.image = theImg;
      }
      if (CGRectContainsPoint([s8 frame], [touch locationInView:self.view])&amp;(s8.image == NULL)) {
          cellWasUsed = YES;
          s8.image = theImg;
      }
      if (CGRectContainsPoint([s9 frame], [touch locationInView:self.view])&amp;(s9.image == NULL)) {
          cellWasUsed = YES;
          s9.image = theImg;
      }
      [self processLogic];
      if (cellWasUsed) {
          [self updatePlayerInfo];
      }
  }
  
  -(void)processLogic{
  
      if ([self checkForWin]){
          if(playerToken ==1){
              myAlertView = [[UIAlertView alloc] initWithTitle:@"winner" message:@"X won" delegate:self
                                             cancelButtonTitle:@"ok" otherButtonTitles:nil, nil];
              [myAlertView show];
              [self resetBoard];
          }
          else if(playerToken ==2){
              myAlertView = [[UIAlertView alloc] initWithTitle:@"winner" message:@"O won" delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil, nil];
              [myAlertView show];
              [self resetBoard];
          }
          if(numberOfPlays ==9){
              myAlertView = [[ UIAlertView alloc]initWithTitle:@"No Winner" message:@"Tie" delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil, nil];
              [myAlertView show];
  
              [self resetBoard];
          }
  
  
  
      }
  
  }
  
  -(BOOL)checkForWin{
  
      // HORIZONTAL WINS
      if((s1.image == s2.image) &amp; (s2.image == s3.image) &amp; (s1.image != NULL))
      {
          return YES;
      }
      if((s4.image == s5.image) &amp; (s5.image == s6.image) &amp; (s4.image != NULL))
      {
          return YES;
      }
      if((s7.image == s8.image) &amp; (s8.image == s9.image) &amp; (s7.image != NULL))
      {
          return YES;
      }
      // VERTICAL WINS
      if((s1.image == s4.image) &amp; (s4.image == s7.image) &amp; (s1.image != NULL))
      {
          return YES;
      }
      if((s2.image == s5.image) &amp; (s5.image == s8.image) &amp; (s2.image != NULL))
      {
          return YES;
      }
      if((s3.image == s6.image) &amp; (s6.image == s9.image) &amp; (s3.image != NULL))
      {
          return YES;
      }
      // DIAGONAL WINS
      if((s1.image == s5.image) &amp; (s5.image == s9.image) &amp; (s1.image != NULL))
      {
          return YES;
      }
      if((s3.image == s5.image) &amp; (s5.image == s7.image) &amp; (s3.image != NULL))
      {
          return YES;
      }
      //right now return 1 becuase we havn't implemented this yet
      return NO;
  }
  
  -(void)displayWinner{
      if([self checkForWin]==YES){
          if(playerToken ==1){
              whoseTurn.text =@"X is the winner!";
  
          }
          else{whoseTurn.text = @"O is the winner!";
  
          }
      }
  
  }
  
  -(IBAction)buttonReset{
  
      [self resetBoard];
  
  }
  
  -(void)resetBoard{
  
      s1.image =NULL;
      s2.image =NULL;
      s3.image =NULL;
      s4.image =NULL;
      s5.image =NULL;
      s6.image =NULL;
      s7.image =NULL;
      s8.image =NULL;
      s9.image =NULL;
  
      playerToken =1;
      whoseTurn.text = @"X can go";
  
      numberOfPlays = 0;
  
  
  
  
  
  
  }
  
  -(void)updatePlayerInfo{
      numberOfPlays++;
      if(numberOfPlays ==9){
  
          [self resetBoard];
      }
      if (playerToken ==1){
  
          playerToken =2;
          whoseTurn.text = @"O can go";
  
      } else {
          playerToken = 1;
          whoseTurn.text = @"X can go";
      }
  }
  
  - (void)dealloc {
      [s1 release];
      [s2 release];
      [s3 release];
      [s4 release];
      [s5 release];
      [s6 release];
      [s7 release];
      [s8 release];
      [s9 release];
      [theImg release];
      [resetButton release];
      [board release];
      [oImg release];
      [xImg release];
      [whoseTurn release];
      [myAlertView release];
  
  
  
      [super dealloc];
  
  
  }
  
  
  @end `
  </code></pre>
  
  <p>Can someone help me figure out what is wrong?</p>