Skip to content

Issue with removing player | Ticking player entity #327

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

Open
PedroMPagani opened this issue Feb 5, 2025 · 1 comment
Open

Issue with removing player | Ticking player entity #327

PedroMPagani opened this issue Feb 5, 2025 · 1 comment
Labels
status: needs triage type: bug Something doesn't work as it was intended to.

Comments

@PedroMPagani
Copy link

Expected behavior

The method isInWall is not doing a thread check for the whole range. this is weird because this causes players to not be removed from the server due to doTick() getting called.

java.lang.Throwable: null
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:88) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.server.level.ServerChunkCache.syncLoad(ServerChunkCache.java:99) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.server.level.ServerChunkCache.getChunkFallback(ServerChunkCache.java:152) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.server.level.ServerChunkCache.getChunk(ServerChunkCache.java:320) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.world.entity.Entity.isInWall(Entity.java:2869) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.world.entity.LivingEntity.isInWall(LivingEntity.java:4360) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.world.entity.LivingEntity.baseTick(LivingEntity.java:475) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.world.entity.Entity.tick(Entity.java:836) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:3133) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.world.entity.player.Player.tick(Player.java:298) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.server.level.ServerPlayer.doTick(ServerPlayer.java:1040) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.server.players.PlayerList.remove(PlayerList.java:599) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.server.players.PlayerList.remove(PlayerList.java:583) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.server.network.ServerGamePacketListenerImpl.removePlayerFromWorld(ServerGamePacketListenerImpl.java:2148) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2125) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2111) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.network.Connection.handleDisconnection(Connection.java:976) ~[folia-1.21.4.jar:1.21.4--293dd35]
at io.papermc.paper.threadedregions.RegionizedWorldData.tickConnections(RegionizedWorldData.java:511) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1849) ~[folia-1.21.4.jar:1.21.4--293dd35]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1668) ~[folia-1.21.4.jar:1.21.4--293dd35]
at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:413) ~[folia-1.21.4.jar:1.21.4--293dd35]
at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:445) ~[folia-1.21.4.jar:1.21.4--293dd35]
at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) ~[concurrentutil-0.0.3.jar:?]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

Observed/Actual behavior

Players are not removed on doTick().

Steps/models to reproduce

Not really easy. No idea how it happens.

Plugin and Datapack List

Folia version

dev/hard-fork 3af04d9

Other

Image

@PedroMPagani PedroMPagani added status: needs triage type: bug Something doesn't work as it was intended to. labels Feb 5, 2025
@PedroMPagani PedroMPagani changed the title Issue with removing player. Issue with removing player | Ticking player entity Feb 5, 2025
@Trard
Copy link

Trard commented Feb 9, 2025

I got a similar issue, but i also don't know why it happens

[13:56:37] [Folia Watchdog Thread/ERROR]: [io.papermc.paper.threadedregions.FoliaWatchdogThread] Tick region located in world 'world_the_end' around chunk '[-61, -6]' has not responded in 5.264367338s:
[13:56:37] [Folia Watchdog Thread/ERROR]: ------------------------------
[13:56:37] [Folia Watchdog Thread/ERROR]: Current Thread: Region Scheduler Thread #0
[13:56:37] [Folia Watchdog Thread/ERROR]:       PID: 83 | Suspended: false | Native: true | State: RUNNABLE
[13:56:37] [Folia Watchdog Thread/ERROR]:       Stack:
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/sun.nio.ch.UnixFileDispatcherImpl.write0(Native Method)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/sun.nio.ch.UnixFileDispatcherImpl.write(UnixFileDispatcherImpl.java:65)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:137)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/sun.nio.ch.IOUtil.write(IOUtil.java:102)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/sun.nio.ch.IOUtil.write(IOUtil.java:72)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/sun.nio.ch.FileChannelImpl.implWrite(FileChannelImpl.java:371)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:351)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/sun.nio.ch.ChannelOutputStream.writeFully(ChannelOutputStream.java:68)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/sun.nio.ch.ChannelOutputStream.write(ChannelOutputStream.java:105)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:125)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/java.io.BufferedOutputStream.implFlush(BufferedOutputStream.java:252)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:240)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/java.io.FilterOutputStream.close(FilterOutputStream.java:184)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:258)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/java.io.FilterOutputStream.close(FilterOutputStream.java:190)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/java.io.FilterOutputStream.close(FilterOutputStream.java:190)
[13:56:37] [Folia Watchdog Thread/ERROR]:               net.minecraft.nbt.NbtIo.writeCompressed(NbtIo.java:222)
[13:56:37] [Folia Watchdog Thread/ERROR]:               net.minecraft.nbt.NbtIo.writeCompressed(NbtIo.java:174)
[13:56:37] [Folia Watchdog Thread/ERROR]:               net.minecraft.world.level.storage.PlayerDataStorage.save(PlayerDataStorage.java:44)
[13:56:37] [Folia Watchdog Thread/ERROR]:               net.minecraft.server.players.PlayerList.save(PlayerList.java:614)
[13:56:37] [Folia Watchdog Thread/ERROR]:               net.minecraft.server.players.PlayerList.remove(PlayerList.java:670)
[13:56:37] [Folia Watchdog Thread/ERROR]:               net.minecraft.server.players.PlayerList.remove(PlayerList.java:631)
[13:56:37] [Folia Watchdog Thread/ERROR]:               net.minecraft.server.network.ServerGamePacketListenerImpl.removePlayerFromWorld(ServerGamePacketListenerImpl.java:2243)
[13:56:37] [Folia Watchdog Thread/ERROR]:               net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2221)
[13:56:37] [Folia Watchdog Thread/ERROR]:               net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2208)
[13:56:37] [Folia Watchdog Thread/ERROR]:               net.minecraft.network.Connection.handleDisconnection(Connection.java:967)
[13:56:37] [Folia Watchdog Thread/ERROR]:               io.papermc.paper.threadedregions.RegionizedWorldData.tickConnections(RegionizedWorldData.java:508)
[13:56:37] [Folia Watchdog Thread/ERROR]:               net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:2000)
[13:56:37] [Folia Watchdog Thread/ERROR]:               net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1804)
[13:56:37] [Folia Watchdog Thread/ERROR]:               io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407)
[13:56:37] [Folia Watchdog Thread/ERROR]:               io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418)
[13:56:37] [Folia Watchdog Thread/ERROR]:               ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/java.lang.Thread.runWith(Thread.java:1588)
[13:56:37] [Folia Watchdog Thread/ERROR]:               [email protected]/java.lang.Thread.run(Thread.java:1575)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage type: bug Something doesn't work as it was intended to.
Projects
None yet
Development

No branches or pull requests

2 participants