LOOHP / ImageFrame

Put images on maps and walls!
https://www.spigotmc.org/resources/106031/
GNU General Public License v3.0
50 stars 14 forks source link

Folia 1.20.4 Accessing entity state off owning region's thread #49

Closed YusakiDev closed 5 months ago

YusakiDev commented 8 months ago

java.lang.Throwable: null
        at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:78) ~[folia-1.20.4.jar:git-Folia-"e97b1ee"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:169) ~[folia-1.20.4.jar:git-Folia-"e97b1ee"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:14) ~[folia-1.20.4.jar:git-Folia-"e97b1ee"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity.isInWorld(CraftEntity.java:939) ~[folia-1.20.4.jar:git-Folia-"e97b1ee"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity.isValid(CraftEntity.java:393) ~[folia-1.20.4.jar:git-Folia-"e97b1ee"]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.lambda$buildAllItemFrameInfo$0(AnimatedFakeMapManager.java:111) ~[ImageFrame-1.7.7.2.jar:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.buildAllItemFrameInfo(AnimatedFakeMapManager.java:122) ~[ImageFrame-1.7.7.2.jar:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.run(AnimatedFakeMapManager.java:145) ~[ImageFrame-1.7.7.2.jar:?]
        at com.loohp.imageframe.objectholders.Scheduler.lambda$runTaskTimerAsynchronously$12(Scheduler.java:168) ~[ImageFrame-1.7.7.2.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler$AsyncScheduledTask.run(FoliaAsyncScheduler.java:217) ~[folia-1.20.4.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
[00:12:18 WARN]: java.lang.IllegalStateException: Accessing entity state off owning region's thread
[00:12:18 WARN]:        at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:79)
[00:12:18 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:169)
[00:12:18 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:14)
[00:12:18 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity.isInWorld(CraftEntity.java:939)
[00:12:18 WARN]:        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity.isValid(CraftEntity.java:393)
[00:12:18 WARN]:        at ImageFrame-1.7.7.2.jar//com.loohp.imageframe.objectholders.AnimatedFakeMapManager.lambda$buildAllItemFrameInfo$0(AnimatedFakeMapManager.java:111)
[00:12:18 WARN]:        at ImageFrame-1.7.7.2.jar//com.loohp.imageframe.objectholders.AnimatedFakeMapManager.buildAllItemFrameInfo(AnimatedFakeMapManager.java:122)
[00:12:18 WARN]:        at ImageFrame-1.7.7.2.jar//com.loohp.imageframe.objectholders.AnimatedFakeMapManager.run(AnimatedFakeMapManager.java:145)
[00:12:18 WARN]:        at ImageFrame-1.7.7.2.jar//com.loohp.imageframe.objectholders.Scheduler.lambda$runTaskTimerAsynchronously$12(Scheduler.java:168)
[00:12:18 WARN]:        at io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler$AsyncScheduledTask.run(FoliaAsyncScheduler.java:217)
[00:12:18 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[00:12:18 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[00:12:18 WARN]:        at java.base/java.lang.Thread.run(Thread.java:840)```

This happen with both itemframe and glow item frame
YusakiDev commented 6 months ago

This still happen with the latest version

LOOHP commented 6 months ago

Hi, did you set Settings.HandleAnimatedMapsOnMainThread to true in the config?

YusakiDev commented 6 months ago

No, This is default, HandleAnimatedMapsOnMainThread: false SendAnimatedMapsOnMainThread: false

LOOHP commented 6 months ago

Yes, please try with it set to true.

YusakiDev commented 6 months ago
[18:37:11 WARN]: java.lang.NoSuchFieldError: Class net.minecraft.server.level.PlayerChunkMap does not have member field 'it.unimi.dsi.fastutil.ints.Int2ObjectMap K'
[18:37:11 WARN]:        at ImageFrame-1.7.8.0.jar//com.loohp.imageframe.nms.V1_20_3.getEntityTrackers(V1_20_3.java:152)
[18:37:11 WARN]:        at ImageFrame-1.7.8.0.jar//com.loohp.imageframe.objectholders.AnimatedFakeMapManager.lambda$buildAllItemFrameInfo$0(AnimatedFakeMapManager.java:104)
[18:37:11 WARN]:        at ImageFrame-1.7.8.0.jar//com.loohp.imageframe.objectholders.Scheduler.lambda$executeOrScheduleSync$0(Scheduler.java:51)
[18:37:11 WARN]:        at io.papermc.paper.threadedregions.scheduler.FoliaEntityScheduler$EntityScheduledTask.accept(FoliaEntityScheduler.java:168)
[18:37:11 WARN]:        at io.papermc.paper.threadedregions.scheduler.FoliaEntityScheduler$EntityScheduledTask.accept(FoliaEntityScheduler.java:115)
[18:37:11 WARN]:        at io.papermc.paper.threadedregions.EntityScheduler.executeTick(EntityScheduler.java:173)
[18:37:11 WARN]:        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1646)
[18:37:11 WARN]:        at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407)
[18:37:11 WARN]:        at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:404)
[18:37:11 WARN]:        at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:525)
[18:37:11 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1583)

Got Spammed with this error

LOOHP commented 6 months ago

Can you also try with build #88 instead?

YusakiDev commented 6 months ago
[18:49:17 WARN]: [ImageFrame] Async task for ImageFrame v1.7.7.3 generated an exception
java.lang.IllegalStateException: java.lang.IllegalStateException: Accessing entity state off owning region's thread
        at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?]
        at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:540) ~[?:?]
        at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:567) ~[?:?]
        at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:670) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[?:?]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765) ~[?:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.buildAllItemFrameInfo(AnimatedFakeMapManager.java:130) ~[ImageFrame-1.7.7.3.jar:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.run(AnimatedFakeMapManager.java:145) ~[ImageFrame-1.7.7.3.jar:?]
        at com.loohp.imageframe.objectholders.Scheduler.lambda$runTaskTimerAsynchronously$12(Scheduler.java:168) ~[ImageFrame-1.7.7.3.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler$AsyncScheduledTask.run(FoliaAsyncScheduler.java:217) ~[folia-1.20.4.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.IllegalStateException: Accessing entity state off owning region's thread
        at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:79) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:169) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getItem(CraftItemFrame.java:67) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.toString(CraftItemFrame.java:175) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at java.lang.String.valueOf(String.java:4465) ~[?:?]
        at java.lang.StringBuilder.append(StringBuilder.java:173) ~[?:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.lambda$buildAllItemFrameInfo$1(AnimatedFakeMapManager.java:135) ~[ImageFrame-1.7.7.3.jar:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:?]
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291) ~[?:?]
        at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) ~[?:?]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?]
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?]
[18:49:19 ERROR]: Thread ForkJoinPool.commonPool-worker-98 failed main thread check: Accessing entity state off owning region's thread
java.lang.Throwable: null
        at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:78) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:169) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getItem(CraftItemFrame.java:67) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.toString(CraftItemFrame.java:175) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at java.lang.String.valueOf(String.java:4465) ~[?:?]
        at java.lang.StringBuilder.append(StringBuilder.java:173) ~[?:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.lambda$buildAllItemFrameInfo$1(AnimatedFakeMapManager.java:135) ~[ImageFrame-1.7.7.3.jar:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:?]
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291) ~[?:?]
        at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) ~[?:?]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?]
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?]

Got console spam with this instead

LOOHP commented 6 months ago

Alright I just made some changes, can you give build #95 a try?

YusakiDev commented 6 months ago
[21:44:39 WARN]: [ImageFrame] Async task for ImageFrame v1.7.8.1 generated an exception
java.lang.IllegalStateException: Accessing entity state off owning region's thread
        at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:79) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:169) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getItem(CraftItemFrame.java:67) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.toString(CraftItemFrame.java:175) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at java.lang.String.valueOf(String.java:4465) ~[?:?]
        at java.lang.StringBuilder.append(StringBuilder.java:173) ~[?:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.lambda$buildAllItemFrameInfo$1(AnimatedFakeMapManager.java:142) ~[ImageFrame-1.7.8.1.jar:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:?]
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291) ~[?:?]
        at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) ~[?:?]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
        at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:667) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[?:?]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765) ~[?:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.buildAllItemFrameInfo(AnimatedFakeMapManager.java:137) ~[ImageFrame-1.7.8.1.jar:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.run(AnimatedFakeMapManager.java:152) ~[ImageFrame-1.7.8.1.jar:?]
        at com.loohp.imageframe.objectholders.Scheduler.lambda$runTaskTimerAsynchronously$12(Scheduler.java:168) ~[ImageFrame-1.7.8.1.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler$AsyncScheduledTask.run(FoliaAsyncScheduler.java:217) ~[folia-1.20.4.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]
[21:44:41 ERROR]: Thread Folia Async Scheduler Thread #9 failed main thread check: Accessing entity state off owning region's thread
java.lang.Throwable: null
        at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:78) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:169) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getItem(CraftItemFrame.java:67) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.toString(CraftItemFrame.java:175) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at java.lang.String.valueOf(String.java:4465) ~[?:?]
        at java.lang.StringBuilder.append(StringBuilder.java:173) ~[?:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.lambda$buildAllItemFrameInfo$1(AnimatedFakeMapManager.java:142) ~[ImageFrame-1.7.8.1.jar:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:?]
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291) ~[?:?]
        at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754) ~[?:?]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
        at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:667) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) ~[?:?]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765) ~[?:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.buildAllItemFrameInfo(AnimatedFakeMapManager.java:137) ~[ImageFrame-1.7.8.1.jar:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.run(AnimatedFakeMapManager.java:152) ~[ImageFrame-1.7.8.1.jar:?]
        at com.loohp.imageframe.objectholders.Scheduler.lambda$runTaskTimerAsynchronously$12(Scheduler.java:168) ~[ImageFrame-1.7.8.1.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler$AsyncScheduledTask.run(FoliaAsyncScheduler.java:217) ~[folia-1.20.4.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]
LOOHP commented 6 months ago

Hmm, the error doesn't tell me too much about the error. I've added clearer error messages in build #96. Please give it a try.

YusakiDev commented 6 months ago
[23:42:48 WARN]: java.lang.RuntimeException: Failed to get item frame info for an item frame! Removing from cache...
[23:42:48 WARN]:        at ImageFrame-1.7.8.1.jar//com.loohp.imageframe.objectholders.AnimatedFakeMapManager.lambda$buildAllItemFrameInfo$1(AnimatedFakeMapManager.java:142)
[23:42:48 WARN]:        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
[23:42:48 WARN]:        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708)
[23:42:48 WARN]:        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
[23:42:48 WARN]:        at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
[23:42:48 WARN]:        at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
[23:42:48 WARN]:        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
[23:42:48 WARN]:        at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:667)
[23:42:48 WARN]:        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
[23:42:48 WARN]:        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
[23:42:48 WARN]:        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
[23:42:48 WARN]:        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
[23:42:48 WARN]:        at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:765)
[23:42:48 WARN]:        at ImageFrame-1.7.8.1.jar//com.loohp.imageframe.objectholders.AnimatedFakeMapManager.buildAllItemFrameInfo(AnimatedFakeMapManager.java:137)
[23:42:48 WARN]:        at ImageFrame-1.7.8.1.jar//com.loohp.imageframe.objectholders.AnimatedFakeMapManager.run(AnimatedFakeMapManager.java:152)
[23:42:48 WARN]:        at ImageFrame-1.7.8.1.jar//com.loohp.imageframe.objectholders.Scheduler.lambda$runTaskTimerAsynchronously$12(Scheduler.java:168)
[23:42:48 WARN]:        at io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler$AsyncScheduledTask.run(FoliaAsyncScheduler.java:217)
[23:42:48 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[23:42:48 WARN]:        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[23:42:48 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1583)
[23:42:48 WARN]: Caused by: java.util.concurrent.TimeoutException
[23:42:48 WARN]:        at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1960)
[23:42:48 WARN]:        at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2095)
[23:42:48 WARN]:        at ImageFrame-1.7.8.1.jar//com.loohp.imageframe.objectholders.AnimatedFakeMapManager.lambda$buildAllItemFrameInfo$1(AnimatedFakeMapManager.java:140)
[23:42:48 WARN]:        ... 19 more

didn't spam anymore

LOOHP commented 6 months ago

Does everything still work despite this error?

YusakiDev commented 6 months ago

when I generated image and place in the frame

[13:58:34 ERROR]: Thread Folia Async Scheduler Thread #285 failed main thread check: Accessing entity state off owning region's thread
java.lang.Throwable: null
        at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:78) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:169) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:14) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity.equals(CraftEntity.java:567) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:244) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.collect.RegularImmutableMap.fromEntryArrayCheckingBucketOverflow(RegularImmutableMap.java:133) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:95) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:572) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.collect.ImmutableMap$Builder.buildOrThrow(ImmutableMap.java:600) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:587) ~[guava-32.1.2-jre.jar:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.buildAllItemFrameInfo(AnimatedFakeMapManager.java:148) ~[ImageFrame-1.7.8.1.jar:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.run(AnimatedFakeMapManager.java:152) ~[ImageFrame-1.7.8.1.jar:?]
        at com.loohp.imageframe.objectholders.Scheduler.lambda$runTaskTimerAsynchronously$12(Scheduler.java:168) ~[ImageFrame-1.7.8.1.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler$AsyncScheduledTask.run(FoliaAsyncScheduler.java:217) ~[folia-1.20.4.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]
[13:58:34 WARN]: [ImageFrame] Async task for ImageFrame v1.7.8.1 generated an exception
java.lang.IllegalStateException: Accessing entity state off owning region's thread
        at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:79) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:169) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:14) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity.equals(CraftEntity.java:567) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:244) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.collect.RegularImmutableMap.fromEntryArrayCheckingBucketOverflow(RegularImmutableMap.java:133) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:95) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:572) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.collect.ImmutableMap$Builder.buildOrThrow(ImmutableMap.java:600) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:587) ~[guava-32.1.2-jre.jar:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.buildAllItemFrameInfo(AnimatedFakeMapManager.java:148) ~[ImageFrame-1.7.8.1.jar:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.run(AnimatedFakeMapManager.java:152) ~[ImageFrame-1.7.8.1.jar:?]
        at com.loohp.imageframe.objectholders.Scheduler.lambda$runTaskTimerAsynchronously$12(Scheduler.java:168) ~[ImageFrame-1.7.8.1.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler$AsyncScheduledTask.run(FoliaAsyncScheduler.java:217) ~[folia-1.20.4.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]

this occurs

but it works, just got console spam. a lot

YusakiDev commented 5 months ago

Still happening with latest version of Image frame

[13:18:14 ERROR]: Thread Folia Async Scheduler Thread #1789 failed main thread check: Accessing entity state off owning region's thread
java.lang.Throwable: null
        at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:78) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:169) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftItemFrame.getHandle(CraftItemFrame.java:14) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity.isInWorld(CraftEntity.java:940) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at org.bukkit.craftbukkit.v1_20_R3.entity.CraftEntity.isValid(CraftEntity.java:394) ~[folia-1.20.4.jar:git-Folia-"25ee657"]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.lambda$collectItemFramesInfo$0(AnimatedFakeMapManager.java:100) ~[ImageFrame-1.7.9.0.jar:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.collectItemFramesInfo(AnimatedFakeMapManager.java:121) ~[ImageFrame-1.7.9.0.jar:?]
        at com.loohp.imageframe.objectholders.AnimatedFakeMapManager.run(AnimatedFakeMapManager.java:131) ~[ImageFrame-1.7.9.0.jar:?]
        at com.loohp.imageframe.objectholders.Scheduler.lambda$runTaskTimerAsynchronously$12(Scheduler.java:168) ~[ImageFrame-1.7.9.0.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaAsyncScheduler$AsyncScheduledTask.run(FoliaAsyncScheduler.java:217) ~[folia-1.20.4.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]
LOOHP commented 5 months ago

Is your Settings.HandleAnimatedMapsOnMainThread still set to true in the config?

YusakiDev commented 5 months ago

That solves the problem thanks