On Wed, Apr 20, 2011 at 8:34 AM, sajnank <[email protected]> wrote:
> sqlite3_prepare_v2() is giving SQLITE_MISUSE error(error code 21) after > running the application for several times. Once SQLITE_MISUSE is > returned all sqlite queries are failing and they return the same error > code. In our application, native layer opens the DB for writing(which > include: sqlite3_prepare_v2, sqlite3_step, sqlite3_exec, sqlite3_reset, > sqlite3_finalize ) and the above java layer open the DB for reading. > > The SQLITE_MISUSE error is thrown from the native layer when we do > sqlite3_prepare_v2 after exiting from the application and then > re-entering... Actually, the same scenario was working for more than > 15-20 times, but after that SQLITE_MISUSE comes and thereafter system > crashes with a signal11 > My guess is that you are somehow calling sqlite3_prepare_v2() on a database connection that has already been closed, possibly by a different thread. If you can set a breakpoint on the function sqlite3CorruptError() and provide a backtrace when the breakpoint is hit, that would be a big hint. > > > -- > Regards, > Sajna Nazeer.K > > > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp [email protected] _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

