Player disconnect null error
zwrumpy opened this issue ยท 1 comments
Server: Airplane (paper fork) 1.17.1
Plugin Version: Prison v3.2.10
Module: mines
When player disconnect from the server this null error
Server log:
[02:54:02 INFO]: NoddleCraft lost connection: Timed out
[02:54:02 INFO]: [-] [G1]NoddleCraft
[02:54:02 WARN]: [Prison] Plugin Prison v3.2.10 generated an exception while executing task 41924246
java.lang.NullPointerException: Cannot invoke "tech.mcprison.prison.cache.PlayerCachePlayerData.getPlayerFile()" because "player" is null
at tech.mcprison.prison.cache.PlayerCacheFiles.toJsonFile(PlayerCacheFiles.java:93) ~[Prison-3.2.10.jar:?]
at tech.mcprison.prison.cache.PlayerCacheUnloadPlayerTask.run(PlayerCacheUnloadPlayerTask.java:19) ~[Prison-3.2.10.jar:?]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.17.1.jar:git-Airplane-98]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[patched_1.17.1.jar:git-Airplane-98]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.17.1.jar:git-Airplane-98]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
at java.lang.Thread.run(Thread.java:831) ~[?:?]
Thanks for the bug report.
That issue was already fixed a few months ago. If you're using the latest version of Prison that has been published to the spigotmc.org, polymart.org, or bukkit.org then it will be updated in the next release. I do not know how soon that will be. I'm about to post a new alpha release in the next day or so. It will be v3.2.11-alpha.4. You will be able to download it from our discord server from the #alpha-versions channel.
That error that you saw was not a significant error, since the reason why that object could not be found, is because that player's cache object was already saved and unloaded due to the fact that they logged off the server. The process that you saw was a secondary task to ensure that they were flushed and not overlooked and was "submitted" due to timing between when that job was initiated and when the player actually logged off. So no player data was lost.
Thanks for taking the time to report it.
If you have any other questions, or issues, please visit our discord server for quicker response.
I'm closing this ticket because the actual issue was fixed a while ago.
Thanks!
Blue