Approaching Generating structures Stops Server.
adamwbb opened this issue ยท 14 comments
Approaching any generating structure on gallifrey/skaro/siluria will cause the server to Stop. There are no Error Logs in console the console literally has the output as if the /stop command was ran.
Doesn't say anything relevant about TARDIS in the logs/reports ...
Can you try with colour_skies: false
set in planets.yml
Sorry, not a lot I can do from my end without more info / being able to reproduce.
I would suggest setting up a local test server, starting with just TARDIS & TARDISChunkGenerator, and then adding plugins back in a few at a time to see whether there are any conflicts.
[17:56:13] [Server thread/INFO]: adamwbb issued server command: /tardis version
[17:57:02] [Server thread/INFO]: [TARDIS] Server version: git-Paper-241 (MC: 1.18.2)
[17:57:02] [Server thread/INFO]: [TARDIS] TARDIS version: 4.9.0-b2419
[17:57:02] [Server thread/INFO]: [TARDIS] TARDISChunkGenerator version: 4.9.0
[17:57:02] [Server thread/INFO]: [TARDIS] PlaceholderAPI version: 2.11.1
[17:57:02] [Server thread/INFO]: [TARDIS] floodgate version: 2.1.0-SNAPSHOT
[17:57:02] [Server thread/INFO]: [TARDIS] dynmap version: 3.4-beta-2-761
[17:57:02] [Server thread/INFO]: [TARDIS] Essentials version: 2.20.0-dev+2-e12f1b5
[17:57:02] [Server thread/INFO]: [TARDIS] CoreProtect version: 20.4
[17:57:02] [Server thread/INFO]: [TARDIS] WorldGuard version: 7.0.7-SNAPSHOT+2175-dca0515
[17:57:02] [Server thread/INFO]: [TARDIS] Multiverse-Core version: 4.3.2-SNAPSHOT-b867
[17:57:02] [Server thread/INFO]: [TARDIS] Factions version: 1.6.9.5-U0.6.8-b280
[17:57:02] [Server thread/INFO]: [TARDIS] Multiverse-Inventories version: 4.2.3-SNAPSHOT-b519
[17:57:02] [Server thread/INFO]: [TARDIS] Checking for new TARDIS builds...
[17:57:03] [Craft Scheduler Thread - 36 - TARDIS/INFO]: [TARDIS] You are running the latest version!
Are your worlds newly generated, or converted from the old datapack worlds?
I tweaked a couple settings in the server logs and got a crash report
[18:16:56 ERROR]: Encountered an unexpected exception
java.lang.IndexOutOfBoundsException: writerIndex(16972) + minWritableBytes(1) exceeds maxCapacity(16972): UnpooledHeapByteBuf(ridx: 0, widx: 16972, cap: 16972/16972)
at io.netty.buffer.AbstractByteBuf.ensureWritable0(AbstractByteBuf.java:294) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
at io.netty.buffer.AbstractByteBuf.writeByte(AbstractByteBuf.java:984) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
at net.minecraft.network.FriendlyByteBuf.writeByte(FriendlyByteBuf.java:1116) ~[?:?]
at net.minecraft.network.FriendlyByteBuf.writeVarInt(FriendlyByteBuf.java:429) ~[?:?]
at net.minecraft.world.level.chunk.LinearPalette.write(LinearPalette.java:90) ~[?:?]
at net.minecraft.world.level.chunk.PalettedContainer$Data.write(PalettedContainer.java:387) ~[?:?]
at net.minecraft.world.level.chunk.PalettedContainer.write(PalettedContainer.java:225) ~[?:?]
at net.minecraft.world.level.chunk.LevelChunkSection.write(LevelChunkSection.java:287) ~[?:?]
at net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData.extractChunkData(ClientboundLevelChunkPacketData.java:119) ~[paper-1.18.2.jar:git-Paper-241]
at net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData.<init>(ClientboundLevelChunkPacketData.java:54) ~[paper-1.18.2.jar:git-Paper-241]
at net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket.<init>(ClientboundLevelChunkWithLightPacket.java:36) ~[paper-1.18.2.jar:git-Paper-241]
at net.minecraft.server.level.ChunkMap.lambda$playerLoadedChunk$66(ChunkMap.java:2151) ~[paper-1.18.2.jar:git-Paper-241]
at java.util.HashMap.computeIfAbsent(HashMap.java:1220) ~[?:?]
at net.minecraft.server.level.ChunkMap.playerLoadedChunk(ChunkMap.java:2150) ~[paper-1.18.2.jar:git-Paper-241]
at net.minecraft.server.level.ChunkMap.updateChunkTracking(ChunkMap.java:1631) ~[paper-1.18.2.jar:git-Paper-241]
at io.papermc.paper.chunk.PlayerChunkLoader$PlayerLoaderData.sendChunk(PlayerChunkLoader.java:855) ~[paper-1.18.2.jar:git-Paper-241]
at io.papermc.paper.chunk.PlayerChunkLoader.trySendChunks(PlayerChunkLoader.java:578) ~[paper-1.18.2.jar:git-Paper-241]
at io.papermc.paper.chunk.PlayerChunkLoader.tickMidTick(PlayerChunkLoader.java:728) ~[paper-1.18.2.jar:git-Paper-241]
at net.minecraft.server.level.ServerChunkCache$MainThreadExecutor.pollTask(ServerChunkCache.java:1259) ~[?:?]
at net.minecraft.server.level.ServerChunkCache.pollTask(ServerChunkCache.java:828) ~[?:?]
at net.minecraft.server.MinecraftServer.tickMidTickTasks(MinecraftServer.java:2729) ~[paper-1.18.2.jar:git-Paper-241]
at net.minecraft.server.MinecraftServer.executeMidTickTasks(MinecraftServer.java:2752) ~[paper-1.18.2.jar:git-Paper-241]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1379) ~[paper-1.18.2.jar:git-Paper-241]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1371) ~[paper-1.18.2.jar:git-Paper-241]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1349) ~[paper-1.18.2.jar:git-Paper-241]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1231) ~[paper-1.18.2.jar:git-Paper-241]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.18.2.jar:git-Paper-241]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
[18:16:56 ERROR]: This crash report has been saved to: /var/games/minecraft/servers/WebbServerMC/./crash-reports/crash-2022-03-21_18.16.56-server.txt
[18:16:56 INFO]: Stopping server
here is the crash log: https://pastebin.com/xpWYc2ux
I've noticed on our server that the structure generation does cause a decent chunk (heh) of lag, and doesn't resume if you unload the chunks again before it's finished (though that might've been because someone killed the server because of the performance warnings, I'd have to re-test to make sure). I hadn't gotten around to raising a ticket for it though because we mostly don't use those worlds anyway and I was considering just disabling them or restricting them to a very small and easily manually pre-generatable size.
I saw these updates in the build notes and was therefore mighty curious about what the impact would be! I'll be sure to test the new slower structure generation later today after work.
Could you imagine it working if we decided to use a plugin that pre-generated a whole bunch of the chunks in that world and then set a border on it?
Or would there be potential issues doing it that way, ie:
- It requires an actual player to be nearby to trigger the generation, and/or
- It requires the chunk(s) to be loaded for a certain amount of time to generate the structure, that the chunk-generating plugin couldn't anticipate and so we'd potentially wind up with a bunch of partially generated structures that would either never finish generating, or would resume as soon as someone came around and potentially cause more performance drops anyway?
Is there any way to have the structures generate as part of the worldgen itself perhaps?
I noticed today that my test server hung while the Siluria world was building structures, partly due to their being more water in the world, which is where the structures are spawned - there ended up being about 30 structures building at once...
The building is triggered in the Chunk Load Event, so doesn't require a player to be present.
I think pre-generating the world with a border is a good idea, but I haven't tested at this stage.
Ideally I would like to use the underlying Minecraft structure mechanics and have the building done in the world generation - I've been doing a bit of experimenting with world generators lately, but need to have a play with structure and jigsaw blocks, ideally without the need to use a datapack to get the structures in the world.
On the whole world generation seems to me to be a lot slower in 1.18.2, the world height changes maybe affecting things, who knows...
I've noticed that disabling the TARDIS worlds causes my server's time between stop and start (during scheduled restarts) to go from 4 minutes to 2 minutes...
Not sure if it's related to how the worlds generate but might help?
That does seem slow, but I think 2 minutes is slow...
[13:25:47] [Server thread/INFO]: [TARDIS] Attempting to load world: 'TARDIS_TimeVortex'
[13:25:47] [Server thread/INFO]: Preparing start region for dimension minecraft:tardis_timevortex
[13:25:47] [Server thread/INFO]: Time elapsed: 414 ms
[13:25:47] [Server thread/INFO]: [TARDIS] Attempting to load world: 'dev'
[13:25:48] [Server thread/INFO]: Preparing start region for dimension minecraft:dev
[13:25:48] [Server thread/INFO]: Preparing spawn area: 0%
[13:25:49] [Server thread/INFO]: Time elapsed: 270 ms
[13:25:49] [Server thread/INFO]: [TARDIS] Attempting to load world: 'skaro'
[13:25:49] [Server thread/INFO]: Preparing start region for dimension minecraft:skaro
[13:25:49] [Server thread/INFO]: Preparing spawn area: 0%
[13:25:49] [Server thread/INFO]: Time elapsed: 223 ms
[13:25:49] [Server thread/INFO]: [TARDIS] Attempting to load world: 'siluria'
[13:25:49] [Server thread/INFO]: Preparing start region for dimension minecraft:siluria
[13:25:50] [Server thread/INFO]: Time elapsed: 508 ms
[13:25:50] [Server thread/INFO]: [TARDIS] Attempting to load world: 'gallifrey'
[13:26:01] [Server thread/INFO]: Preparing start region for dimension minecraft:gallifrey
[13:26:01] [Server thread/INFO]: Preparing spawn area: 0%
[13:26:01] [Server thread/INFO]: Time elapsed: 226 ms
[13:26:01] [Server thread/INFO]: [TARDIS] Attempting to load world: 'water'
[13:26:02] [Server thread/INFO]: Preparing start region for dimension minecraft:water
[13:26:02] [Server thread/INFO]: Preparing spawn area: 0%
[13:26:02] [Server thread/INFO]: Time elapsed: 315 ms
[13:26:02] [Server thread/INFO]: [TARDIS] Debug: Skaro enabled, registering planet event listeners
[13:26:02] [Server thread/INFO]: [TARDIS] Debug: Siluria enabled, registering planet event listeners
[13:26:02] [Server thread/INFO]: [TARDIS] Debug: Gallifrey enabled, registering planet event listeners
[13:26:02] [Server thread/INFO]: [TARDIS] Loaded 1 portals.
[13:26:02] [Server thread/INFO]: [TARDIS] Debug: Starting force fields with a range of 8 blocks.
[13:26:02] [Server thread/INFO]: [TARDISVortexManipulator] Enabling TARDISVortexManipulator v1.7
[13:26:03] [Craft Scheduler Thread - 4 - TARDIS/INFO]: [TARDIS] Server is running a custom or dev version!
[13:26:03] [Server thread/INFO]: Loaded 7 recipes
[13:26:04] [Server thread/INFO]: Done (22.341s)! For help, type "help"