title: Iphone app wont run after upgrading to iOS 4.2
body: <p>After installing Xcode 3.2.5 iOS 4.2 an app that was perfectly working stopped working.  I have seen that this has happened to others but cant understand how to solve it. </p>
  
  <p>My questions are:
  1. How can I know where it is crashing?
  2. What can I do to better debug and pinpoint the problem.</p>
  
  <p>Here is the call stack.</p>
  
  <p><img src="https://i.stack.imgur.com/IzlKV.png" alt="Call Stack"></p>
  
  <p>Tommy thanks for the answer. I have build and run and suggested but when it crashes it does not shows where it crashed. Also I added a breakpoint inside the method but it does not stops there. Any further ideas? Here is the code snippet.</p>
  
  <pre><code>- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  ApplicationData *appdata = [ApplicationData sharedInstance];
  if(appdata.currentCategoryIndex &gt;= 0) {
      Category *category = [appdata.categoryList objectAtIndex:appdata.currentCategoryIndex];
      if(category.records) {
          [lab_norecords setHidden:YES];
      } else {
          [lab_norecords setHidden:NO];
          return 0;
      }
      return [category.records count];
  }
  return 0;
  </code></pre>
  
  <p>}</p>
  
  <p><img src="https://i.stack.imgur.com/1lQIi.png" alt="enter image description here"></p>
  
  <p>Now I am getting this error:</p>
  
  <p><img src="https://i.stack.imgur.com/IIzo0.png" alt="enter image description here"></p>
  
  <p>I believe the source of the problem is here in the same subCategoryView:</p>
  
  <pre><code>- (id)init {
  if([[NSBundle mainBundle] loadNibNamed:@"SubCategoryView" owner:self options:nil]) {
      //if(self = [super initWit])
      cellowner = [[TableCellOwner alloc] init];
      [listTableView setBackgroundColor:[UIColor clearColor]];
      [listTableView setSeparatorColor:[UIColor whiteColor]];
      [listTableView initialize];
  }
  return self;
  </code></pre>
  
  <p>}</p>