title: Inconsistent, but frequent EXC_BAD_ACCESS access with sqlite3_step(statement)
body: <p>I am getting frequent EXC_BAD_ACCESS crashes in iOS while executing this line:</p>
  
  <pre><code>while (sqlite3_step(statement) == SQLITE_ROW) {
  
  }
  </code></pre>
  
  <p>Its used to deliver results in my <code>(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath</code>  function.</p>
  
  <p>Any ideas? The SQL etc looks fine, and the database is being updated in a background thread, after which I call the foreground thread to update UI.</p>