AfkStatusChangeEvent cannot be triggered asynchronously from another thread
Romaq opened this issue ยท 2 comments
Information
Full output of /ess version
:
13.05 23:32:12 [Server] Server thread/INFO CONSOLE issued server command: /ess version
13.05 23:32:12 [Server] Server thread/INFO Server version: 1.14.1-R0.1-SNAPSHOT git-Spigot-8043ebc-89c52b7 (MC: 1.14.1)
13.05 23:32:12 [Server] Server thread/INFO EssentialsX version: 2.16.1.173-mc114-b89
13.05 23:32:12 [Server] Server thread/INFO Vault version: 1.7.2-b107
13.05 23:32:12 [Server] Server thread/INFO You are running an unsupported server version!
Server log: https://gist.github.com/Romaq/d418428189ed69565f48dc1322240c3f#file-latest-log
Relevant Snippit:
13.05 23:02:17 [Server] Craft Scheduler Thread - 10/WARN Plugin Essentials v2.16.1.173-mc114-b89 generated an exception while executing task 724
13.05 23:02:17 [Server] INFO java.lang.IllegalStateException: AfkStatusChangeEvent cannot be triggered asynchronously from another thread.
13.05 23:02:17 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) ~[spigot-1.14-2019-05-13a.jar:git-Spigot-8043ebc-89c52b7]
13.05 23:02:17 [Server] INFO at com.earth2me.essentials.User.setAfk(User.java:463) ~[?:?]
13.05 23:02:17 [Server] INFO at com.earth2me.essentials.User.updateActivity(User.java:560) ~[?:?]
13.05 23:02:17 [Server] INFO at com.earth2me.essentials.EssentialsPlayerListener.delayedJoin(EssentialsPlayerListener.java:221) ~[?:?]
13.05 23:02:17 [Server] INFO at com.earth2me.essentials.EssentialsPlayerListener$1.run(EssentialsPlayerListener.java:198) ~[?:?]
13.05 23:02:17 [Server] INFO at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot-1.14-2019-05-13a.jar:git-Spigot-8043ebc-89c52b7]
13.05 23:02:17 [Server] INFO at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [spigot-1.14-2019-05-13a.jar:git-Spigot-8043ebc-89c52b7]
13.05 23:02:17 [Server] INFO at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_141]
13.05 23:02:17 [Server] INFO at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_141]
13.05 23:02:17 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_141]
EssentialsX config: https://gist.github.com/Romaq/d418428189ed69565f48dc1322240c3f#file-config-yml
Details
Description
The server is complaining about Asynchronous behavior of the plugin
Steps to reproduce
It appears intermittent (run from the same thread sometimes?) I can watch for other Async behavior and report it to this issue when I see it.
Expected behavior
I hoped to see nothing reported in the log. The AFK behavior is not critical, and I may not notice when I slip into AFK or back out of it. NOT critical, no other Async errors appear to trigger while waiting to slip into AFK. If needed, we can attempt to "aggressively exercise" EssentialX commands to attempt to force a repeatable trigger.
This has ben fixed in experimental builds - download them from the build server.