Stargate Rewritten

Stargate Rewritten

241 Downloads

Conflicts in default network names lock sqlite database.

Pheotis opened this issue ยท 0 comments

commented

Bug Description

Renaming the default network to a name that conflicts with a custom network causes the sqlite database to apepar locked.

Reproduction Steps

  1. Start a new stargate instance.
  2. Make a bunch of portals on the default [central] network
  3. Make a bunch of portals on a custom network, for example (test).
  4. In the configuration, change defaultGateNetwork to the custom network name (for example, test)
  5. Restart.

Desired Behaviour

The default network should be renamed to test.
The test custom network should be renamed to test1.

Observed Behaviour

  • The database appears to lock up.
  • The central network is renamed
  • The custom network remains
  • The default network continues to function
  • All portals on the custom network are apparently destroyed, although the formatted signs remain.
    image
    image

Trace Logs

[12:29:40 INFO]: [Stargate] Enabling Stargate v1.0.0.14-ALPHA
[12:29:40 WARN]: [Stargate] Coloring for sign material BAMBOO_WALL_SIGN is not implemented, please contact development
[12:29:40 WARN]: [Stargate] Coloring for sign material CHERRY_WALL_SIGN is not implemented, please contact development
[12:29:43 WARN]: [Stargate] org.sgrewritten.stargate.exception.database.StorageWriteException : org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.updateNetworkName(SQLDatabase.java:563)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.network.StargateNetworkManager.rename(StargateNetworkManager.java:175)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.getNetwork(SQLDatabase.java:315)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.loadPortal(SQLDatabase.java:217)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.loadAllPortals(SQLDatabase.java:197)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.loadFromStorage(SQLDatabase.java:103)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.network.StargateNetworkManager.loadPortals(StargateNetworkManager.java:184)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.Stargate.onEnable(Stargate.java:181)
[12:29:43 WARN]: [Stargate]      at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281)
[12:29:43 WARN]: [Stargate]      at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:190)
[12:29:43 WARN]: [Stargate]      at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104)
[12:29:43 WARN]: [Stargate]      at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507)
[12:29:43 WARN]: [Stargate]      at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:637)
[12:29:43 WARN]: [Stargate]      at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:548)
[12:29:43 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:673)
[12:29:43 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:433)
[12:29:43 WARN]: [Stargate]      at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:308)
[12:29:43 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1132)
[12:29:43 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321)
[12:29:43 WARN]: [Stargate]      at java.base/java.lang.Thread.run(Thread.java:840)
[12:29:43 WARN]: [Stargate] Caused by: org.sqlite.SQLiteException : [SQLITE_BUSY] The database file is locked (database is locked)
[12:29:43 WARN]: [Stargate]      at org.sqlite.core.DB.newSQLException(DB.java:1179)
[12:29:43 WARN]: [Stargate]      at org.sqlite.core.DB.newSQLException(DB.java:1190)
[12:29:43 WARN]: [Stargate]      at org.sqlite.core.DB.execute(DB.java:985)
[12:29:43 WARN]: [Stargate]      at org.sqlite.jdbc3.JDBC3PreparedStatement.lambda$execute$0(JDBC3PreparedStatement.java:58)
[12:29:43 WARN]: [Stargate]      at org.sqlite.jdbc3.JDBC3Statement.withConnectionTimeout(JDBC3Statement.java:454)
[12:29:43 WARN]: [Stargate]      at org.sqlite.jdbc3.JDBC3PreparedStatement.execute(JDBC3PreparedStatement.java:53)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.util.database.DatabaseHelper.runStatement(DatabaseHelper.java:33)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.updateNetworkName(SQLDatabase.java:561)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.network.StargateNetworkManager.rename(StargateNetworkManager.java:175)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.getNetwork(SQLDatabase.java:315)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.loadPortal(SQLDatabase.java:217)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.loadAllPortals(SQLDatabase.java:197)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.loadFromStorage(SQLDatabase.java:103)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.network.StargateNetworkManager.loadPortals(StargateNetworkManager.java:184)
[12:29:43 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.Stargate.onEnable(Stargate.java:181)
[12:29:43 WARN]: [Stargate]      at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281)
[12:29:43 WARN]: [Stargate]      at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:190)
[12:29:43 WARN]: [Stargate]      at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104)
[12:29:43 WARN]: [Stargate]      at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507)
[12:29:43 WARN]: [Stargate]      at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:637)
[12:29:43 WARN]: [Stargate]      at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:548)
[12:29:43 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:673)
[12:29:43 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:433)
[12:29:43 WARN]: [Stargate]      at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:308)
[12:29:43 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1132)
[12:29:43 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321)
[12:29:43 WARN]: [Stargate]      at java.base/java.lang.Thread.run(Thread.java:840)
[12:29:43 WARN]: [Stargate] Unable to get network test1
[12:29:46 WARN]: [Stargate] org.sgrewritten.stargate.exception.database.StorageWriteException : org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.updateNetworkName(SQLDatabase.java:563)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.network.StargateNetworkManager.rename(StargateNetworkManager.java:175)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.getNetwork(SQLDatabase.java:315)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.loadPortal(SQLDatabase.java:217)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.loadAllPortals(SQLDatabase.java:197)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.loadFromStorage(SQLDatabase.java:103)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.network.StargateNetworkManager.loadPortals(StargateNetworkManager.java:184)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.Stargate.onEnable(Stargate.java:181)
[12:29:46 WARN]: [Stargate]      at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281)
[12:29:46 WARN]: [Stargate]      at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:190)
[12:29:46 WARN]: [Stargate]      at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104)
[12:29:46 WARN]: [Stargate]      at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507)
[12:29:46 WARN]: [Stargate]      at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:637)
[12:29:46 WARN]: [Stargate]      at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:548)
[12:29:46 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:673)
[12:29:46 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:433)
[12:29:46 WARN]: [Stargate]      at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:308)
[12:29:46 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1132)
[12:29:46 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321)
[12:29:46 WARN]: [Stargate]      at java.base/java.lang.Thread.run(Thread.java:840)
[12:29:46 WARN]: [Stargate] Caused by: org.sqlite.SQLiteException : [SQLITE_BUSY] The database file is locked (database is locked)
[12:29:46 WARN]: [Stargate]      at org.sqlite.core.DB.newSQLException(DB.java:1179)
[12:29:46 WARN]: [Stargate]      at org.sqlite.core.DB.newSQLException(DB.java:1190)
[12:29:46 WARN]: [Stargate]      at org.sqlite.core.DB.execute(DB.java:985)
[12:29:46 WARN]: [Stargate]      at org.sqlite.jdbc3.JDBC3PreparedStatement.lambda$execute$0(JDBC3PreparedStatement.java:58)
[12:29:46 WARN]: [Stargate]      at org.sqlite.jdbc3.JDBC3Statement.withConnectionTimeout(JDBC3Statement.java:454)
[12:29:46 WARN]: [Stargate]      at org.sqlite.jdbc3.JDBC3PreparedStatement.execute(JDBC3PreparedStatement.java:53)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.util.database.DatabaseHelper.runStatement(DatabaseHelper.java:33)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.updateNetworkName(SQLDatabase.java:561)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.network.StargateNetworkManager.rename(StargateNetworkManager.java:175)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.getNetwork(SQLDatabase.java:315)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.loadPortal(SQLDatabase.java:217)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.loadAllPortals(SQLDatabase.java:197)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.database.SQLDatabase.loadFromStorage(SQLDatabase.java:103)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.network.StargateNetworkManager.loadPortals(StargateNetworkManager.java:184)
[12:29:46 WARN]: [Stargate]      at Stargate-1.0.0.14-ALPHA.jar//org.sgrewritten.stargate.Stargate.onEnable(Stargate.java:181)
[12:29:46 WARN]: [Stargate]      at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281)
[12:29:46 WARN]: [Stargate]      at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:190)
[12:29:46 WARN]: [Stargate]      at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104)
[12:29:46 WARN]: [Stargate]      at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507)
[12:29:46 WARN]: [Stargate]      at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:637)
[12:29:46 WARN]: [Stargate]      at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:548)
[12:29:46 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:673)
[12:29:46 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:433)
[12:29:46 WARN]: [Stargate]      at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:308)
[12:29:46 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1132)
[12:29:46 WARN]: [Stargate]      at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321)
[12:29:46 WARN]: [Stargate]      at java.base/java.lang.Thread.run(Thread.java:840)
[12:29:46 WARN]: [Stargate] Unable to get network test1

Other Information

This problem appears to persist across restarts, even though the conflicting network appears to have been destroyed?

Attachments

Borked database .
stargate.zip