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

Server crashes when sending chunks to player on a boat(IndexOutOfBoundsException) #228

Open
ClayCoffee opened this issue May 29, 2024 · 3 comments

Comments

@ClayCoffee
Copy link

ClayCoffee commented May 29, 2024

Stack trace

[21:04:13] [Region Scheduler Thread #3/ERROR]: [io.papermc.paper.threadedregions.TickRegionScheduler] Region #2528 centered at chunk [8434, -2210] in world 'world' failed to tick:
net.minecraft.ReportedException: Exception ticking world
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1830) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1657) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:404) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:525) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	at java.lang.Thread.run(Thread.java:1570) ~[?:?]
Caused by: java.lang.IndexOutOfBoundsException: writerIndex(27124) + minWritableBytes(8) exceeds maxCapacity(27127): UnpooledHeapByteBuf(ridx: 0, widx: 27124, cap: 27127/27127)
	at io.netty.buffer.AbstractByteBuf.ensureWritable0(AbstractByteBuf.java:294) ~[netty-buffer-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.buffer.AbstractByteBuf.writeLong(AbstractByteBuf.java:1039) ~[netty-buffer-4.1.97.Final.jar:4.1.97.Final]
	at net.minecraft.network.FriendlyByteBuf.writeLong(FriendlyByteBuf.java:1420) ~[?:?]
	at net.minecraft.network.FriendlyByteBuf.writeLongArray(FriendlyByteBuf.java:425) ~[?:?]
	at net.minecraft.world.level.chunk.PalettedContainer$Data.write(PalettedContainer.java:427) ~[?:?]
	at net.minecraft.world.level.chunk.PalettedContainer.write(PalettedContainer.java:246) ~[?:?]
	at net.minecraft.world.level.chunk.LevelChunkSection.write(LevelChunkSection.java:205) ~[?:?]
	at net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData.extractChunkData(ClientboundLevelChunkPacketData.java:122) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	at net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData.<init>(ClientboundLevelChunkPacketData.java:55) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	at net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket.<init>(ClientboundLevelChunkWithLightPacket.java:36) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	at net.minecraft.server.network.PlayerChunkSender.sendChunk(PlayerChunkSender.java:93) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	at io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader$PlayerChunkLoaderData.sendChunk(RegionizedPlayerChunkLoader.java:484) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	at io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader$PlayerChunkLoaderData.updateQueues(RegionizedPlayerChunkLoader.java:879) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	at io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.tick(RegionizedPlayerChunkLoader.java:244) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	at net.minecraft.server.level.ServerChunkCache.tick(ServerChunkCache.java:441) ~[?:?]
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:946) ~[?:?]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1818) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
	... 6 more

Plugin and Datapack List

AutoTreeChop, AxGraves, Chunky, ChunkyBorder, CMI, CMILib, CoreProtect,
FlagWar, floodgate, InventoryRollbackPlus, LuckPerms, MapTowny, Matrix, NBTAPI, PlaceholderAPI
PlugManX, ProtocolLib, Scoreboard, SkinsRestorer, squaremap, StackMob, TheNewEconomy, Towny, TownyChat
UltimateShop, UseTranslatedNames, Vault, ViaBackwards, ViaVersion, voicechat

Actions to reproduce (if known)

sending chunks to a player who is on a boat and moving fast

Folia version

This server is running Folia version git-Folia-"25ee657" (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 25ee657)
*Even using the latest version, it can still be reproduced

Other

No response

@ClayCoffee ClayCoffee changed the title Server crashes when sending chunks to player (IndexOutOfBoundsException) Server crashes when sending chunks to player on a boat(IndexOutOfBoundsException) Jun 1, 2024
@PedroMPagani
Copy link

Try to replicate without any plugins.

@ClayCoffee
Copy link
Author

ClayCoffee commented Jul 6, 2024

Try to replicate without any plugins.

still with no plugins

also in latest 1.20.6

@ClayCoffee
Copy link
Author

the exception is gone after setting anti-xray to false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants