Android SQLite错误代码21
我的模拟器的日志文件中出现以下错误,我不知道该怎么办,因为谷歌搜索没有发现任何结果。
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'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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我
在SQLite C/C++接口文档中找到了。
我猜这意味着您的代码在第 95716 行左右错误地调用了接口库。
稍后。 。 .
OP 确认实际问题涉及两个线程同时访问数据库,一个尝试写入数据库,另一个尝试关闭数据库。我由此推断出有问题的代码行 95716 位于模拟器中。 (因为 OP 的代码库只有 1000 行或更少。)
I found
in the SQLite C/C++ interface documentation.
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.)