Entity moves to position outside of region, throwing exception
Open
Nobody has claimed this yet.
status: needs triage
type: bug
version: 1.20.4
- Dominant language
- Shell
- Stars
- 4.4k
- Forks
- 623
- PR merge metrics
- No merged PRs in 30d
Description
Expected behavior
No crash
Observed/Actual behavior
12:47:58] [Region Scheduler Thread #2/ERROR]: Thread Region Scheduler Thread #2 failed main thread check: Cannot move entity off-main
java.lang.Throwable: null
at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:71) ~[folia-1.20.4.jar:git-Folia-33]
at io.papermc.paper.chunk.system.entity.EntityLookup.moveEntity(EntityLookup.java:526) ~[folia-1.20.4.jar:git-Folia-33]
at io.papermc.paper.chunk.system.entity.EntityLookup$EntityCallback.a(EntityLookup.java:893) ~[folia-1.20.4.jar:git-Folia-33]
at net.minecraft.world.entity.Entity.setPosRaw(Entity.java:5457) ~[folia-1.20.4.jar:git-Folia-33]
at net.minecraft.world.entity.Entity.setPos(Entity.java:770) ~[folia-1.20.4.jar:git-Folia-33]
at net.minecraft.world.entity.Entity.absMoveTo(Entity.java:2031) ~[folia-1.20.4.jar:git-Folia-33]
at net.minecraft.world.entity.Entity.absMoveTo(Entity.java:2016) ~[folia-1.20.4.jar:git-Folia-33]
at net.minecraft.server.level.ServerPlayer.tick(ServerPlayer.java:847) ~[?:?]
at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:1558) ~[?:?]
at net.minecraft.world.level.Level.guardEntityTick(Level.java:1360) ~[?:?]
at net.minecraft.server.level.ServerLevel.lambda$tick$8(ServerLevel.java:1011) ~[?:?]
at io.papermc.paper.threadedregions.RegionizedWorldData.forEachTickingEntity(RegionizedWorldData.java:613) ~[folia-1.20.4.jar:git-Folia-33]
at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:990) ~[?:?]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1812) ~[folia-1.20.4.jar:git-Folia-33]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[folia-1.20.4.jar:git-Folia-33]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1651) ~[folia-1.20.4.jar:git-Folia-33]
at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.20.4.jar:git-Folia-33]
at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:404) ~[folia-1.20.4.jar:git-Folia-33]
at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:525) ~[folia-1.20.4.jar:git-Folia-33]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
Steps/models to reproduce
n/a
Plugin and Datapack List
This server is running Folia version git-Folia-33 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 8939611 on HEAD)
Folia version
[13:09:44 INFO]: Paper Plugins:
[13:09:44 INFO]: - MiniPlaceholders, MiniPlaceholders-Player-Expansion
[13:09:44 INFO]: Bukkit Plugins:
[13:09:44 INFO]: - CMILib, DiscordSRV, MobFarmManager, NoIllegals, NoPluginsCommand, PlaceholderAPI, SimplyAdmin, SimplyChat, SimplyHeightLimit, SimplyNicks
[13:09:44 INFO]: SimplyRank, SimplyVotifier, TAB, ViaBackwards, ViaVersion, voicechat, VotingPlugin
Other
There are a couple of accepted but also prematurely closed bug-reports. So this might still be a valid bug in current HEAD.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Use the supplied stack trace as the entry point, starting at io.papermc.paper.chunk.system.entity.EntityLookup.moveEntity (EntityLookup.java:526) and the Entity.setPosRaw/absMoveTo path. Reproduce on current HEAD; done means the entity can move outside its region without the reported main-thread exception, with a regression check if the project has a suitable test location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100