I've gotten the following error in the log files of my emulator and I don't know what to make of it because a google search turns up nothing.
03-12 12:53:28.782: INFO/Database(688): sqlite returned: error code = 21,
msg = misuse detected by source line 95716
03-12 12:53:28.812: ERROR/Database(688): sqlite_config failed error_code = 21.
THIS SHOULD NEVER occur.
I found
#define SQLITE_MISUSE 21 /* Library used incorrectly */
in the SQLite C/C++ interface documentation.
This error might occur if one or more of the SQLite API routines is used incorrectly. Examples of incorrect usage include calling sqlite_exec after the database has been closed using sqlite_close or calling sqlite_exec with the same database pointer simultaneously from two separate threads.
I'd guess that means your code is calling the interface library incorrectly around line 95716.
Later . . .
The OP confirmed that the actual problem involved two threads accessing the database at the same time, one trying to write to the db, and the other trying to close it. I'd infer from this that the offending line of code, 95716, was in the emulator. (Because the OP's code base had only 1000 lines or less.)
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