title: iphone application crashes only in device and when profiling with instruments
body: <p>I am not able to find the reason of a crash in my iphone app.it crashes only when it is in device.however when the breakpoints are on ,it doesnt crash.After crashing the following log is printed in the organiser console.</p>
  
  <pre><code>Mar 21 15:43:16 abc-Ss-iPhone com.apple.SpringBoard[15] &lt;Notice&gt;: CoreAnimation: timed out fence 1f4
  
  Mar 21 15:43:18 abc-Ss-iPhone ReportCrash[1771] &lt;Notice&gt;: Formulating crash report for process aaa[1770]
  
  Mar 21 15:43:18 abc-Ss-iPhone com.apple.launchd[1] (UIKitApplication:com.xxx.aaa[0x3989][1770]) &lt;Warning&gt;: (UIKitApplication:com.xxx.aaa[0x3989]) Job appears to have crashed: Segmentation fault: 11
  
  Mar 21 15:43:18 abc-Ss-iPhone SpringBoard[15] &lt;Warning&gt;: Application 'aaa' exited abnormally with signal 11: Segmentation fault: 11
  </code></pre>
  
  <p>I have put <code>NSLog</code> to find where it is crashing.it is pointing to an area where i am reloading the tableview.</p>
  
  <p>I am doing some calculations in the bg thread and reloading the table in the main thread using the following code:</p>
  
  <pre><code>//////////////////////////////in bg thread
  
  if(needToReload){
      NSLog(@"calc end---table refresh called");
      [self performSelectorOnMainThread:@selector(updateTable) withObject:nil waitUntilDone:YES];            
  }
  </code></pre>