TechnicallyCoded / Inventory-Rollback-Plus

Spigot/Bukkit plugin that allows server moderators to restore player items and data from backups.
https://www.spigotmc.org/resources/85811/
Other
78 stars 44 forks source link

bug when you exit and enter a world too fast #126

Closed frogglen closed 11 months ago

frogglen commented 1 year ago

Bug description:

[01:39:42 WARN]: [InventoryRollbackPlus] Plugin InventoryRollbackPlus v1.6.9 generated an exception while executing task 75326
java.util.NoSuchElementException: null
        at java.util.ArrayList$Itr.next(ArrayList.java:970) ~[?:?]
        at java.util.Collections.min(Collections.java:601) ~[?:?]
        at me.danjono.inventoryrollback.data.YAML.purgeExcessSaves(YAML.java:205) ~[InventoryRollbackPlus-1.6.9.jar:?]
        at me.danjono.inventoryrollback.data.PlayerData.lambda$purgeExcessSaves$0(PlayerData.java:124) ~[InventoryRollbackPlus-1.6.9.jar:?]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.4.jar:git-Purpur-1963]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.19.4.jar:git-Purpur-1963]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.19.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:833) ~[?:?]

Server details:

purpur-1.19.4-1963 InventoryRollbackPlus-1.6.9

How to reproduce:

when exiting and entering a world repeatedly, very fast

What was expected:

N/A

Screenshots, logs & other:

If applicable, add screenshots, logs, /timings links, /spark profiler links here. If your logs are longer than 30 lines provide a link to a paste (https://pastebin.com) to keep the issue readable.

If it's no more than 30 lines you can just put the log in here. Otherwise, you can delete this code block.

Additional info:

Add any other context about the problem here. If not applicable just replace this line with N/A

TechnicallyCoded commented 1 year ago

Maybe not good but it's just a warning and doesn't prevent execution. Hence the low priority.

TechnicallyCoded commented 11 months ago

Hacky patch was introduced in recent versions to catch and warn against plugins which act horribly like this.