Stargate Rewritten

Stargate Rewritten

241 Downloads

[TMS TMP010] Fatal crash upon sg reload.

Pheotis opened this issue ยท 3 comments

commented

On the 1.15 test instance (spigot, bungee, mariadb local w/ UseSSL = false):

  1. Changed defaultGateNetwork from central to a string that conflicted with the name of an existing default gate network.
  2. Changed signFormatting.color from BLACK to EFA1FF.
  3. Used sg reload
[17:26:42] [Server thread/INFO]: Pheotis issued server command: /sg reload
[17:26:42] [Server thread/INFO]: [Stargate] Default stargate coloring is not supported on your current server implementation
[17:26:42] [Server thread/WARN]: [Stargate] Invalid colors for sign text. Using default colors instead...
[17:26:42] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'sg' in plugin Stargate v1.0.0.13-ALPHA
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[spigot.jar:git-Spigot-3b314f5-e2790ae]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot.jar:git-Spigot-3b314f5-e2790ae]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:711) ~[spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1657) ~[spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1497) ~[spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) ~[spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(SourceFile:144) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.MinecraftServer.aZ(MinecraftServer.java:917) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:910) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(SourceFile:127) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:894) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:827) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.lang.NullPointerException
        at org.sgrewritten.stargate.gate.Gate.hasGateFrameConflict(Gate.java:411) ~[?:?]
        at org.sgrewritten.stargate.gate.Gate.isValid(Gate.java:321) ~[?:?]
        at org.sgrewritten.stargate.database.SQLDatabase.loadAllPortals(SQLDatabase.java:242) ~[?:?]
        at org.sgrewritten.stargate.database.SQLDatabase.loadFromStorage(SQLDatabase.java:106) ~[?:?]
        at org.sgrewritten.stargate.network.StargateRegistry.loadPortals(StargateRegistry.java:57) ~[?:?]
        at org.sgrewritten.stargate.network.StargateRegistry.load(StargateRegistry.java:249) ~[?:?]
        at org.sgrewritten.stargate.Stargate.reload(Stargate.java:503) ~[?:?]
        at org.sgrewritten.stargate.command.CommandReload.onCommand(CommandReload.java:39) ~[?:?]
        at org.sgrewritten.stargate.command.CommandStargate.onCommand(CommandStargate.java:35) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot.jar:git-Spigot-3b314f5-e2790ae]
        ... 17 more
commented

Due to the above steps, the instance's installation is now permanently bricked.

[17:33:22] [Server thread/INFO]: [Stargate] Enabling Stargate v1.0.0.13-ALPHA
[17:33:22] [Server thread/INFO]: [Stargate] Default stargate coloring is not supported on your current server implementation
[17:33:22] [Server thread/WARN]: [Stargate] Invalid colors for sign text. Using default colors instead...
[17:33:22] [Server thread/WARN]: SLF4J: No SLF4J providers were found.
[17:33:22] [Server thread/WARN]: SLF4J: Defaulting to no-operation (NOP) logger implementation
[17:33:22] [Server thread/WARN]: SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
[17:33:22] [Server thread/INFO]: [Stargate] CREATE TABLE IF NOT EXISTS SG_a41435001bf6430497e4581a26949a83Portal (name NVARCHAR(180) NOT NULL, network NVARCHAR(180) NOT NULL, destination NVARCHAR(180), world NVARCHAR(255) NOT NULL, x INTEGER, y INTEGER, z INTEGER, ownerUUID VARCHAR(36), gateFileName NVARCHAR(255), facing INTEGER, flipZ BOOLEAN, PRIMARY KEY (name, network));
[17:33:22] [Server thread/INFO]: [Stargate] CREATE TABLE IF NOT EXISTS SG_Flag (id INTEGER PRIMARY KEY AUTO_INCREMENT, `character` CHAR(1) UNIQUE NOT NULL);
[17:33:22] [Server thread/INFO]: [Stargate] SELECT id, `character` FROM SG_Flag;
[17:33:22] [Server thread/INFO]: [Stargate] INSERT INTO SG_Flag (`character`) VALUES (?);
[17:33:22] [Server thread/INFO]: [Stargate] CREATE TABLE IF NOT EXISTS SG_PortalPositionType (id INTEGER PRIMARY KEY AUTO_INCREMENT, positionName NVARCHAR(16));
[17:33:22] [Server thread/INFO]: [Stargate] SELECT id, positionName FROM SG_PortalPositionType;
[17:33:22] [Server thread/INFO]: [Stargate] INSERT INTO SG_PortalPositionType (positionName) VALUES (?);
[17:33:22] [Server thread/INFO]: [Stargate] CREATE TABLE IF NOT EXISTS SG_a41435001bf6430497e4581a26949a83PortalPosition (portalName NVARCHAR(180) NOT NULL, networkName NVARCHAR(180) NOT NULL, xCoordinate INTEGER NOT NULL, yCoordinate INTEGER NOT NULL, zCoordinate INTEGER NOT NULL, positionType INTEGER NOT NULL, PRIMARY KEY (portalName, networkName, xCoordinate, yCoordinate, zCoordinate), FOREIGN KEY (portalName, networkName) REFERENCES SG_a41435001bf6430497e4581a26949a83Portal(name, network) ON UPDATE CASCADE, FOREIGN KEY (positionType) REFERENCES SG_PortalPositionType (id));
[17:33:22] [Server thread/INFO]: [Stargate] SHOW INDEX FROM SG_a41435001bf6430497e4581a26949a83PortalPosition WHERE Key_name = 'SG_a41435001bf6430497e4581a26949a83portalPositionIndex';
[17:33:22] [Server thread/INFO]: [Stargate] CREATE TABLE IF NOT EXISTS SG_LastKnownName (uuid VARCHAR(36) NOT NULL, lastKnownName VARCHAR(16), PRIMARY KEY (uuid));
[17:33:22] [Server thread/INFO]: [Stargate] CREATE TABLE IF NOT EXISTS SG_a41435001bf6430497e4581a26949a83PortalFlagRelation (name NVARCHAR(180) NOT NULL, network NVARCHAR(180) NOT NULL, flag INTEGER NOT NULL, PRIMARY KEY (name, network, flag), FOREIGN KEY (name, network) REFERENCES SG_a41435001bf6430497e4581a26949a83Portal (name, network) ON UPDATE CASCADE, FOREIGN KEY (flag) REFERENCES SG_Flag (id));
[17:33:22] [Server thread/INFO]: [Stargate] CREATE OR REPLACE VIEW SG_a41435001bf6430497e4581a26949a83PortalView AS SELECT SG_a41435001bf6430497e4581a26949a83Portal.*, COALESCE(GROUP_CONCAT(SG_Flag.`character`, ''), '') AS flags, SG_LastKnownName.lastKnownName FROM SG_a41435001bf6430497e4581a26949a83Portal LEFT OUTER JOIN SG_a41435001bf6430497e4581a26949a83PortalFlagRelation ON SG_a41435001bf6430497e4581a26949a83Portal.name = SG_a41435001bf6430497e4581a26949a83PortalFlagRelation.name AND SG_a41435001bf6430497e4581a26949a83Portal.network = SG_a41435001bf6430497e4581a26949a83PortalFlagRelation.network LEFT OUTER JOIN SG_Flag ON SG_a41435001bf6430497e4581a26949a83PortalFlagRelation.flag = SG_Flag.id LEFT OUTER JOIN SG_LastKnownName ON SG_a41435001bf6430497e4581a26949a83Portal.network = SG_LastKnownName.uuid GROUP BY SG_a41435001bf6430497e4581a26949a83Portal.name, SG_a41435001bf6430497e4581a26949a83Portal.network;
[17:33:22] [Server thread/INFO]: [Stargate] ALTER TABLE SG_a41435001bf6430497e4581a26949a83Portal ADD metaData TEXT;
[17:33:22] [Server thread/INFO]: [Stargate] CREATE TABLE IF NOT EXISTS SG_ServerInfo (serverId VARCHAR(36) NOT NULL, serverName NVARCHAR(255), PRIMARY KEY (serverId));
[17:33:22] [Server thread/INFO]: [Stargate] CREATE TABLE IF NOT EXISTS SG_InterPortal (name NVARCHAR(180) NOT NULL, network NVARCHAR(180) NOT NULL, destination NVARCHAR(180), world NVARCHAR(255) NOT NULL, x INTEGER, y INTEGER, z INTEGER, ownerUUID VARCHAR(36), gateFileName NVARCHAR(255), facing INTEGER, flipZ BOOLEAN, homeServerId VARCHAR(36), PRIMARY KEY (name, network));
[17:33:22] [Server thread/INFO]: [Stargate] CREATE TABLE IF NOT EXISTS SG_InterPortalFlagRelation (name NVARCHAR(180) NOT NULL, network NVARCHAR(180) NOT NULL, flag INTEGER NOT NULL, PRIMARY KEY (name, network, flag), FOREIGN KEY (name, network) REFERENCES SG_InterPortal (name, network) ON UPDATE CASCADE, FOREIGN KEY (flag) REFERENCES SG_Flag (id));
[17:33:22] [Server thread/INFO]: [Stargate] CREATE OR REPLACE VIEW SG_InterPortalView AS SELECT SG_InterPortal.*, COALESCE(GROUP_CONCAT(SG_Flag.`character`, ''), '') AS flags, SG_LastKnownName.lastKnownName, SG_ServerInfo.serverName FROM SG_InterPortal LEFT OUTER JOIN SG_InterPortalFlagRelation ON SG_InterPortal.name = SG_InterPortalFlagRelation.name AND SG_InterPortal.network = SG_InterPortalFlagRelation.network LEFT OUTER JOIN SG_Flag ON SG_InterPortalFlagRelation.flag = SG_Flag.id LEFT OUTER JOIN SG_LastKnownName ON SG_InterPortal.network = SG_LastKnownName.uuid LEFT OUTER JOIN SG_ServerInfo ON SG_ServerInfo.serverId = SG_InterPortal.homeServerId GROUP BY SG_InterPortal.name, SG_InterPortal.network;
[17:33:22] [Server thread/INFO]: [Stargate] CREATE TABLE IF NOT EXISTS SG_InterPortalPosition (portalName NVARCHAR(180) NOT NULL, networkName NVARCHAR(180) NOT NULL, xCoordinate INTEGER NOT NULL, yCoordinate INTEGER NOT NULL, zCoordinate INTEGER NOT NULL, positionType INTEGER NOT NULL, PRIMARY KEY (portalName, networkName, xCoordinate, yCoordinate, zCoordinate), FOREIGN KEY (portalName, networkName) REFERENCES SG_InterPortal(name, network) ON UPDATE CASCADE, FOREIGN KEY (positionType) REFERENCES SG_PortalPositionType (id));
[17:33:22] [Server thread/INFO]: [Stargate] SHOW INDEX FROM SG_InterPortalPosition WHERE Key_name = 'SG_interPortalPositionIndex';
[17:33:22] [Server thread/INFO]: [Stargate] Loading portals from base database
[17:33:22] [Server thread/INFO]: [Stargate] SELECT * FROM SG_a41435001bf6430497e4581a26949a83PortalView;
[17:33:22] [Server thread/INFO]: [Stargate] Trying to add portal Test3, on network <@default@>,isInterServer = false
[17:33:22] [Server thread/INFO]: [Stargate] Adding networkid <@default@> to interServer = false
[17:33:22] [Server thread/INFO]: [Stargate] SELECT *, (SELECT SG_PortalPositionType.positionName FROM SG_PortalPositionType WHERE SG_PortalPositionType.id = positionType) as positionName FROM SG_a41435001bf6430497e4581a26949a83PortalPosition WHERE networkName = ? AND portalName = ?;
[17:33:22] [Server thread/INFO]: [Stargate] Chose a format rotation of 1.5707963267948966 radians
[17:33:22] [Server thread/INFO]: [Stargate] ---Validating CONTROL_BLOCK
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-8,6,-17) relative pos[0,-2,1]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-5,6,-17) relative pos[3,-2,1]
[17:33:22] [Server thread/INFO]: [Stargate] ---Validating FRAME
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-7,8,-18) relative pos[1,0,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-8,7,-18) relative pos[0,-1,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-8,6,-18) relative pos[0,-2,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-8,5,-18) relative pos[0,-3,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-7,4,-18) relative pos[1,-4,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-6,8,-18) relative pos[2,0,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-6,4,-18) relative pos[2,-4,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-5,7,-18) relative pos[3,-1,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-5,6,-18) relative pos[3,-2,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-5,5,-18) relative pos[3,-3,0]
[17:33:22] [Server thread/INFO]: [Stargate] ---Validating IRIS
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-7,7,-18) relative pos[1,-1,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-6,7,-18) relative pos[2,-1,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-7,6,-18) relative pos[1,-2,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-6,6,-18) relative pos[2,-2,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-7,5,-18) relative pos[1,-3,0]
[17:33:22] [Server thread/INFO]: [Stargate] Checking location (-6,5,-18) relative pos[2,-3,0]
[17:33:22] [Server thread/ERROR]: Error occurred while enabling Stargate v1.0.0.13-ALPHA (Is it up to date?)
java.lang.NullPointerException: null
        at org.sgrewritten.stargate.gate.Gate.hasGateFrameConflict(Gate.java:411) ~[?:?]
        at org.sgrewritten.stargate.gate.Gate.isValid(Gate.java:321) ~[?:?]
        at org.sgrewritten.stargate.database.SQLDatabase.loadAllPortals(SQLDatabase.java:242) ~[?:?]
        at org.sgrewritten.stargate.database.SQLDatabase.loadFromStorage(SQLDatabase.java:106) ~[?:?]
        at org.sgrewritten.stargate.network.StargateRegistry.loadPortals(StargateRegistry.java:57) ~[?:?]
        at org.sgrewritten.stargate.Stargate.onEnable(Stargate.java:172) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[spigot.jar:git-Spigot-3b314f5-e2790ae]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:417) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:462) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:376) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:456) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:266) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:783) [spigot.jar:git-Spigot-3b314f5-e2790ae]
        at java.lang.Thread.run(Thread.java:829) [?:?]
commented

Although the plugin technically remains enabled following the crash above, it is impossible to interact with in any way and fails to function.... even through commands.

image

commented

Could it be that you have the setting checkPortalValidity enabled? I think the issue comes from this option (I forgot to set the registry in a specific constructor for gates, so it was null). From my test instance it's disabled, so it makes sense I did not catch it. Gonna try to catch it with a unit test though.