pcal43 / fastback

Fast, incremental Minecraft world backups. Powered by Git.
https://pcal43.github.io/fastback/
GNU General Public License v2.0
125 stars 19 forks source link

NPE on `full-gc` when nothing pruned #336

Closed TabulateJarl8 closed 1 month ago

TabulateJarl8 commented 1 month ago

I have autobackups enabled with the full-gc action, however whenever this mod attempts to create a backup, it fails with the following error:

[13:35:50] [pool-4-thread-161/INFO]: Starting auto-backup
[13:35:50] [pool-4-thread-161/INFO]: The server is starting a backup.
[13:35:51] [pool-4-thread-161/WARN]: Skipping remote backup because no remote url has been configured.
[13:35:51] [pool-4-thread-161/ERROR]: auto-backup failed.
java.lang.NullPointerException: Cannot invoke "java.util.Collection.size()" because "pruned" is null
        at net.pcal.fastback.commands.SchedulableAction$4.lambda$getTask$0(SchedulableAction.java:73) ~[fastback-0.17.4+1.20.4-fabric.jar:?]
        at net.pcal.fastback.mod.AutosaveListener.lambda$run$0(AutosaveListener.java:72) ~[fastback-0.17.4+1.20.4-fabric.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        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) ~[?:?]

As you can see from the traceback, I'm running fabric 1.20.4 with fastback 0.17.4. Manually running /backup gc gives no output if that helps at all. Thanks for any help

pcal43 commented 1 month ago

I see. You can work around this for now by not choosing full-gc for automatic backups.