TwelveIterationMods / Waystones

Minecraft Mod. Adds waystones you can teleport to after they've been activated.
https://mods.twelveiterations.com/mc/waystones/
Other
277 stars 111 forks source link

OutofBounds Exception when using waystone #757

Closed gruniversal closed 9 months ago

gruniversal commented 9 months ago

Minecraft Version

1.20.2

Mod Loader

Fabric

Mod Loader Version

fabric-loader-0.14.25 + fabric-api-0.91.1+1.20.2.jar

Mod Version

waystones-fabric-1.20.2-15.0.1.jar

Balm Version

balm-fabric-1.20.2-8.0.1.jar

Describe the Issue

I have used the mod in singleplayer for some time without problems. Now we use it on a multiplayer server (from g-portal.com) and it worked perfectly for a couple of days.

In a three-player game today we wanted to enter a waystone to travel to another one but this time the game crashed and some players were kicked from the server.

The game reports the following java error:

[Netty Epoll Client IO #0/ERROR]: Encountered exception while handling in channel with name "waystones:teleport_effect"
java.lang.IndexOutOfBoundsException: readerIndex(0) + length(8) exceeds writerIndex(0): UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 0, cap: 256)

(see also the attached log)

After immediately rejoining we encountered the same problem multiple times, but it was not fully reproducable.

When I test the same behavior the error does not occur at the moment (no one else is online)

Logs

https://pastebin.com/vLUGNsJp

Do you use any performance-enhancing mods (e.g. OptiFine) or custom server distributions (e.g. SpongeForge)?

we use some mod sodium, iris, voicemod, xaeros (mostly clientside)

BlayTheNinth commented 9 months ago

This is impossible to happen under normal circumstances. Something else in your server must be interfering with network packets.

BlayTheNinth commented 9 months ago

Someone else just reported an issue just like this for Hardcore Revival, also in 1.20.2. This is most likely caused by some other mod you updated recently, maybe even Fabric itself.

gruniversal commented 9 months ago

It seems that the problem only happens when the player with the admin privileges is on the server.

Then it crashes when he or I teleport.

We reproduced the behavior on our server:

BlayTheNinth commented 9 months ago

Right now my belief is that this is caused by networking changes made in fabric-api 0.91+. There is a similar issue reported at https://github.com/FabricMC/fabric/issues/3449 and judging by the fact this only started happening now, across multiple distinct mods, makes that the most likely option.

The packets in question are packets that are sent to players in the nearby vicinity so I believe it's based on that rather than specific permissions. That checks out with the sidenote in the fabric-api issue mentioned above as well.

gruniversal commented 9 months ago

Thanks for your advice. We downgraded the server to fabric api 0.90.x and now it seems to work as expected.

BlayTheNinth commented 9 months ago

Should be fixed in Fabric API 0.91.2