我在我的模拟器的日志文件中遇到以下错误,我不知道该怎么做,因为谷歌搜索没有任何结果.
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.
解决方法:
我发现
#define SQLITE_MISUSE 21 /* Library used incorrectly */
在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.
我猜这意味着你的代码在第95716行周围错误地调用了接口库.
后来. . .
OP确认实际问题涉及两个线程同时访问数据库,一个尝试写入数据库,另一个尝试关闭它.我从中推断出有问题的代码行95716在模拟器中. (因为OP的代码库只有1000行或更少.)
原文地址:https://codeday.me/bug/20190610/1211412.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。