Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

机器人运行几秒钟后频繁产生数据库错误 #911

Closed
IXBOB opened this issue Jun 23, 2024 · 5 comments
Closed

机器人运行几秒钟后频繁产生数据库错误 #911

IXBOB opened this issue Jun 23, 2024 · 5 comments
Labels
🐞 Bug 抓虫子

Comments

@IXBOB
Copy link

IXBOB commented Jun 23, 2024

问题描述

机器人运行几秒钟后频繁产生数据库错误:

[16:31:29 ERROR]: [Slimefun] Exception thrown while executing write task:
[16:31:29 WARN]: java.lang.IllegalStateException: An exception thrown while executing sql: INSERT OR IGNORE INTO block_data (data_val, loc, data_key) VALUES ('MC4w', 'world;1671:64:303', 'fuel');
[16:31:29 WARN]: at Slimefun-226af9b-Beta_build180.jar//com.xzavier0722.mc.plugin.slimefun4.storage.adapter.sqlcommon.SqlCommonAdapter.executeSql(SqlCommonAdapter.java:30)
[16:31:29 WARN]: at Slimefun-226af9b-Beta_build180.jar//com.xzavier0722.mc.plugin.slimefun4.storage.adapter.sqlite.SqliteAdapter.executeSql(SqliteAdapter.java:317)
[16:31:29 WARN]: at Slimefun-226af9b-Beta_build180.jar//com.xzavier0722.mc.plugin.slimefun4.storage.adapter.sqlite.SqliteAdapter.setData(SqliteAdapter.java:88)
[16:31:29 WARN]: at Slimefun-226af9b-Beta_build180.jar//com.xzavier0722.mc.plugin.slimefun4.storage.controller.ADataController.lambda$scheduleWriteTask$1(ADataController.java:87)
[16:31:29 WARN]: at Slimefun-226af9b-Beta_build180.jar//com.xzavier0722.mc.plugin.slimefun4.storage.task.QueuedWriteTask.run(QueuedWriteTask.java:24)
[16:31:29 WARN]: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
[16:31:29 WARN]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[16:31:29 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[16:31:29 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[16:31:29 WARN]: at java.base/java.lang.Thread.run(Thread.java:1583)
[16:31:29 WARN]: Caused by: org.sqlite.SQLiteException: [SQLITE_CONSTRAINT_FOREIGNKEY] A foreign key constraint failed (FOREIGN KEY constraint failed)
[16:31:29 WARN]: at org.sqlite.core.DB.newSQLException(DB.java:1179)
[16:31:29 WARN]: at org.sqlite.core.DB.newSQLException(DB.java:1190)
[16:31:29 WARN]: at org.sqlite.core.DB.execute(DB.java:985)
[16:31:29 WARN]: at org.sqlite.core.CoreStatement.exec(CoreStatement.java:79)
[16:31:29 WARN]: at org.sqlite.jdbc3.JDBC3Statement.lambda$execute$0(JDBC3Statement.java:52)
[16:31:29 WARN]: at org.sqlite.jdbc3.JDBC3Statement.withConnectionTimeout(JDBC3Statement.java:454)
[16:31:29 WARN]: at org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:40)
[16:31:29 WARN]: at Slimefun-226af9b-Beta_build180.jar//com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:94)
[16:31:29 WARN]: at Slimefun-226af9b-Beta_build180.jar//com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
[16:31:29 WARN]: at Slimefun-226af9b-Beta_build180.jar//com.xzavier0722.mc.plugin.slimefun4.storage.adapter.sqlcommon.SqlUtils.execSql(SqlUtils.java:148)
[16:31:29 WARN]: at Slimefun-226af9b-Beta_build180.jar//com.xzavier0722.mc.plugin.slimefun4.storage.adapter.sqlcommon.SqlCommonAdapter.executeSql(SqlCommonAdapter.java:28)
[16:31:29 WARN]: ... 9 more

问题复现率

必现

复现步骤

  1. 放置一个可编程式机器人
  2. 配置其运动操作,至少有一个向任意方向移动的步骤
  3. 将燃料给予机器人并使其开始工作
  4. 几秒后可看到控制台出现错误

服务端类型

Paper

Minecraft 版本

1.20.x

Slimefun 版本

2024.3 和 build 180

其他插件信息

No response

补充信息

No response

@IXBOB IXBOB added the 🐞 Bug 抓虫子 label Jun 23, 2024
@IXBOB
Copy link
Author

IXBOB commented Jun 23, 2024

1.18.1和1.20.4均有此问题

@zzj2039
Copy link

zzj2039 commented Jun 24, 2024

+1 我是1.20.1

@zzj2039
Copy link

zzj2039 commented Jun 24, 2024

最新180构建问题依旧存在

@IXBOB
Copy link
Author

IXBOB commented Jun 24, 2024

一开始提交问题的时候版本写错成了170,应为180,已修正

@StarWishsama
Copy link
Member

#807

@StarWishsama StarWishsama closed this as not planned Won't fix, can't repro, duplicate, stale Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug 抓虫子
Projects
None yet
Development

No branches or pull requests

3 participants