Stargate Rewritten

Stargate Rewritten

241 Downloads

Edge case portal breaks core.

Pheotis opened this issue ยท 2 comments

commented

Bug Description

Attempting to create a portal with too many flags causes core to... try and pass queries into a name?

Reproduction Steps

Make this portal:
image

Desired Behaviour

This portal should be processed until it becomes viable.

Observed Behaviour

Portal creation is partially successful (i.e. opens iris), then gets borked.
image

org.sgrewritten.stargate.exception.name.NameLengthException: Name 'create portal' is to short or to long, expected length over 0 and under 13
         at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.network.StargateNetwork.loadAsCustomNetwork(StargateNetwork.java:104)
         at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.network.StargateNetwork.setID(StargateNetwork.java:86)
         at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.network.StargateNetwork.load(StargateNetwork.java:77)
         at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.network.StargateNetwork.<init>(StargateNetwork.java:67)
         at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.database.SQLDatabase.createNetwork(SQLDatabase.java:478)
         at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.network.StargateNetworkManager.createNetwork(StargateNetworkManager.java:179)
         at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.network.StargateNetworkManager.selectNetwork(StargateNetworkManager.java:103)
         at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.network.StargateNetworkManager.selectNetwork(StargateNetworkManager.java:93)
         at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.api.network.PortalBuilder.build(PortalBuilder.java:290)
         at Stargate-1.0.0.16-NIGHTLY-3.jar//org.sgrewritten.stargate.listener.BlockEventListener.onSignChange(BlockEventListener.java:194)
         at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor41.execute(Unknown Source)
         at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77)
         at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81)
         at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
         at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54)
         at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131)
         at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:627)
         at net.minecraft.world.level.block.entity.SignBlockEntity.setMessages(SignBlockEntity.java:226)
         at net.minecraft.world.level.block.entity.SignBlockEntity.lambda$updateSignText$4(SignBlockEntity.java:187)
         at net.minecraft.world.level.block.entity.SignBlockEntity.updateText(SignBlockEntity.java:201)
         at net.minecraft.world.level.block.entity.SignBlockEntity.updateSignText(SignBlockEntity.java:186)
         at net.minecraft.server.network.ServerGamePacketListenerImpl.updateSignText(ServerGamePacketListenerImpl.java:3457)
         at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleSignUpdate$20(ServerGamePacketListenerImpl.java:3438)
         at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718)
         at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
         at net.minecraft.server.TickTask.run(TickTask.java:18)
         at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151)
         at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
         at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1511)
         at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:195)
         at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125)
         at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1488)
         at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1411)
         at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135)
         at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1377)
         at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1238)
         at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323)
         at java.base/java.lang.Thread.run(Thread.java:1583)

Trace Logs

Latest versions of all modules, core, and paper, on windows.
The above stack trace is only visible on very fine logging levels.

Other Information

No response

commented

Gate opening while breaking has been confirmed for the GIA combination of flags when bungee is disabled. The N flag also throws an immutable exception for stargate mechanics by some reason

commented

Attempting to create a portal with too many flags causes core to... try and pass queries into a name?

I can not reproduce this, I think you might have clicked the sign, therefore causing that issue, as the portal creation got cancelled (which is either cancelled incorectly or should not be cancelled at all)