I am getting frequent EXC_BAD_ACCESS crashes in iOS while executing this line:
while (sqlite3_step(statement) == SQLITE_ROW) {
}
Its used to deliver results in my (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
function.
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.
If you database is being updated in the background and you're accessing it in the foreground thread I'd highly recommend to use some kind of blocking mechanism to prevent race situation. I don't think sqlite is thread safe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With