Issue with removing player | Ticking player entity
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- java
- Domain
- backend, distributed-systems, performance
Research direction
Start with Entity.isInWall and its call from LivingEntity.baseTick, then trace the ServerChunkCache.syncLoad stack shown in the report. Reproduce or construct a disconnect/removal path through ServerPlayer.doTick and PlayerList.remove; done means players can be removed without the reported tick-thread violation.
Written by the indexing model from the issue text.
Description
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 3af04d9c6a98d24032bf8c99ad5446b0f381e320
Other
- Dominant language
- Shell
- Stars
- 4.7k
- Forks
- 651
- Avg merge
- 10d 3h
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PaperMC/Folia
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
status: needs triage type: bug
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
status: needs triage type: performance
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
status: needs triage type: bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
status: needs triage type: bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
cicd
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nolte/kamerplanter-appliance#53 ·
Maintainers usually reply within 1 day
-
area:scripts priority:P2 status:backlog
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
KD5UJC-XYZ/scarab#1170 ·
Maintainers usually reply within 1 day
-
SETUP: nothing verifies the decider code was ever set, so a skipped step leaves approvals token-onlyOpen
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mattabate/life-distributable#229 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
-
bug fixed good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
sdetweil/MagicMirror-backup-restore#20 · 1 comment ·