On 19 Jul 2012, at 5:46pm, Rick Maddy <rma...@gmail.com> wrote: > With regard to memory issues, I don't see how this could be the case. One of > the places the app crashes (on rare occasions) is: > > sqlite3_stmt *load = nil; > sqlite3_prepare_v2(dbRef, "SELECT some_column FROM some_table WHERE > some_id = ? ORDER BY display_order", -1, &load, nil); > > How can memory issues creep into such a simple bit of code? Or could it be > that the dbRef somehow became corrupted?
It is indeed the dbRef that I'm suspicious of. > And come to think of it, how is checking the return value of the prepare > statement going to help if the prepare statement crashes before returning? You need to do the checking on /every/ use of the API which returns a result code. Including the one that opens the database in the first place. I think it's one of the statements you execute /before/ the sqlite3_prepare_v2() that's going wrong. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users