
Thread failed main thread check: Cannot send game event asynchronously, context=[thread=Region Scheduler Thread
RitaSister opened this issue ยท 4 comments
[19:41:45 ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread failed main thread check: Cannot send game event asynchronously, context=[thread=Region Scheduler Thread #13,class=io.papermc.paper.threadedregions.TickRegionScheduler$TickThreadRunner,region={center=[-3, 0],world=world_resources}], world=world, block_pos=(16.0, 0.0, 64.0)
java.lang.Throwable: null
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:115) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
at org.bukkit.craftbukkit.CraftWorld.sendGameEvent(CraftWorld.java:2364) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:565) ~[?:?]
at PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar/su.plo.slib.spigot.util.GameEventUtil.sendEntityGameEvent(GameEventUtil.kt:46) ~[PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar:?]
at PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar/su.plo.slib.spigot.world.SpigotServerWorld.sendGameEvent$lambda$0(SpigotServerWorld.kt:22) ~[PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar:?]
at PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar/su.plo.slib.spigot.util.SchedulerUtil.runTaskFor$lambda$1(SchedulerUtil.kt:51) ~[PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar:?]
at io.papermc.paper.threadedregions.scheduler.FoliaEntityScheduler$EntityScheduledTask.accept(FoliaEntityScheduler.java:168) ~[folia-1.21.7.jar:?]
at io.papermc.paper.threadedregions.scheduler.FoliaEntityScheduler$EntityScheduledTask.accept(FoliaEntityScheduler.java:115) ~[folia-1.21.7.jar:?]
at io.papermc.paper.threadedregions.EntityScheduler.executeTick(EntityScheduler.java:243) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1659) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
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:1447) ~[?:?]
[19:41:45 WARN]: [PlasmoVoice] Entity task for PlasmoVoice v2.1.6+60bf85a-SNAPSHOT generated an exception
java.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:565) ~[?:?] at PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar/su.plo.slib.spigot.util.GameEventUtil.sendEntityGameEvent(GameEventUtil.kt:46) ~[PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar:?]
at PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar/su.plo.slib.spigot.world.SpigotServerWorld.sendGameEvent$lambda$0(SpigotServerWorld.kt:22) ~[PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar:?]
at PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar/su.plo.slib.spigot.util.SchedulerUtil.runTaskFor$lambda$1(SchedulerUtil.kt:51) ~[PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar:?]
at io.papermc.paper.threadedregions.scheduler.FoliaEntityScheduler$EntityScheduledTask.accept(FoliaEntityScheduler.java:168) ~[folia-1.21.7.jar:?]
at io.papermc.paper.threadedregions.scheduler.FoliaEntityScheduler$EntityScheduledTask.accept(FoliaEntityScheduler.java:115) ~[folia-1.21.7.jar:?]
at io.papermc.paper.threadedregions.EntityScheduler.executeTick(EntityScheduler.java:243) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1659) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
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:1447) ~[?:?]
Caused by: java.lang.IllegalStateException: Thread failed main thread check: Cannot send game event asynchronously, context=[thread=Region Scheduler Thread #13,class=io.papermc.paper.threadedregions.TickRegionScheduler$TickThreadRunner,region={center=[-3, 0],world=world_resources}], world=world, block_pos=(16.0, 0.0, 64.0)
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:116) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
at org.bukkit.craftbukkit.CraftWorld.sendGameEvent(CraftWorld.java:2364) ~[folia-1.21.7.jar:1.21.7-DEV-40402e4]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
... 12 more
Can't reproduce. Is there any more context? Perhaps player quit right before this exception?
Can't reproduce. Is there any more context? Perhaps player quit right before this exception?
I just think need lookup that:
at PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar/su.plo.slib.spigot.util.GameEventUtil.sendEntityGameEvent(GameEventUtil.kt:46) ~[PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar:?]
at PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar/su.plo.slib.spigot.world.SpigotServerWorld.sendGameEvent$lambda$0(SpigotServerWorld.kt:22) ~[PlasmoVoice-Paper-2.1.6+60bf85a-SNAPSHOT.jar:?]
Can't reproduce. Is there any more context? Perhaps player quit right before this exception?
maybe cause by player death
Found the issue, it was caused by the world change (teleport, respawn between dimensions, etc).
Build with the fix is available here: https://github.com/plasmoapp/plasmo-voice/releases/tag/2.1.6-SNAPSHOT.