Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamicBackups throws a NullPointerException #15

Open
Ad-Blokker opened this issue Apr 9, 2023 · 2 comments
Open

DynamicBackups throws a NullPointerException #15

Ad-Blokker opened this issue Apr 9, 2023 · 2 comments

Comments

@Ad-Blokker
Copy link

The following error is throwed when DynamicBackups is enabled:

[00:45:40] [Craft Scheduler Thread - 18/WARN]: [ServerBackup] Plugin ServerBackup v2.9.4 generated an exception while executing task 14096
java.lang.NullPointerException: Nodes must be provided.
        at org.yaml.snakeyaml.nodes.NodeTuple.<init>(NodeTuple.java:26) ~[snakeyaml-1.33.jar:?]
        at org.yaml.snakeyaml.representer.Representer.representJavaBeanProperty(Representer.java:173) ~[snakeyaml-1.33.jar:?]
        at org.yaml.snakeyaml.representer.Representer.representJavaBean(Representer.java:110) ~[snakeyaml-1.33.jar:?]
        at org.yaml.snakeyaml.representer.Representer$RepresentJavaBean.representData(Representer.java:83) ~[snakeyaml-1.33.jar:?]
        at org.yaml.snakeyaml.representer.BaseRepresenter.representData(BaseRepresenter.java:122) ~[snakeyaml-1.33.jar:?]
        at org.yaml.snakeyaml.representer.BaseRepresenter.represent(BaseRepresenter.java:81) ~[snakeyaml-1.33.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.toNodeTree(YamlConfiguration.java:191) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.toNodeTree(YamlConfiguration.java:189) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.toNodeTree(YamlConfiguration.java:189) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.toNodeTree(YamlConfiguration.java:189) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.toNodeTree(YamlConfiguration.java:189) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.toNodeTree(YamlConfiguration.java:189) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.toNodeTree(YamlConfiguration.java:189) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.YamlConfiguration.saveToString(YamlConfiguration.java:79) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.configuration.file.FileConfiguration.save(FileConfiguration.java:65) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at de.seblii.serverbackup.ServerBackup.saveBpInf(ServerBackup.java:351) ~[?:?]
        at de.seblii.serverbackup.DynamicBackup$2.run(DynamicBackup.java:76) ~[?:?]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3720-Spigot-d2fdfe3-19de355]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3720-Spigot-d2fdfe3-19de355]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]

This error was also reported in the Discord and seems to be a known issue:

Sebi — Today at 10:39
thanks for reporting this, it's a known error - I'm still looking for a solution, but it doesn't seem to affect the functionality

@Ad-Blokker
Copy link
Author

[01:47:57 WARN]: [ServerBackup] Plugin ServerBackup v2.9.4 generated an exception while executing task 4319
java.lang.IndexOutOfBoundsException: Index 10 out of bounds for length 9
        at jdk.internal.util.Preconditions.outOfBounds(Unknown Source) ~[?:?]
        at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source) ~[?:?]
        at jdk.internal.util.Preconditions.checkIndex(Unknown Source) ~[?:?]
        at java.util.Objects.checkIndex(Unknown Source) ~[?:?]
        at java.util.ArrayList.get(Unknown Source) ~[?:?]
        at de.seblii.serverbackup.DynamicBackup$1.run(DynamicBackup.java:52) ~[ServerBackup-2.9.4.jar:?]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.4.jar:git-Paper-504]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.19.4.jar:git-Paper-504]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.19.4.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
        at java.lang.Thread.run(Unknown Source) ~[?:?]
[02:02:46 WARN]: [ServerBackup] Plugin ServerBackup v2.9.4 generated an exception while executing task 25138
java.lang.IndexOutOfBoundsException: Index 52 out of bounds for length 51
        at jdk.internal.util.Preconditions.outOfBounds(Unknown Source) ~[?:?]
        at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source) ~[?:?]
        at jdk.internal.util.Preconditions.checkIndex(Unknown Source) ~[?:?]
        at java.util.Objects.checkIndex(Unknown Source) ~[?:?]
        at java.util.ArrayList.get(Unknown Source) ~[?:?]
        at de.seblii.serverbackup.DynamicBackup$1.run(DynamicBackup.java:52) ~[ServerBackup-2.9.4.jar:?]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.4.jar:git-Paper-504]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.19.4.jar:git-Paper-504]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.19.4.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
        at java.lang.Thread.run(Unknown Source) ~[?:?]
[02:29:56 WARN]: [ServerBackup] Plugin ServerBackup v2.9.4 generated an exception while executing task 76361
java.lang.NullPointerException: Cannot invoke "org.bukkit.Chunk.getWorld()" because the return value of "java.util.List.get(int)" is null
        at de.seblii.serverbackup.DynamicBackup$1.run(DynamicBackup.java:52) ~[ServerBackup-2.9.4.jar:?]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.4.jar:git-Paper-504]
        at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.19.4.jar:git-Paper-504]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.19.4.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
        at java.lang.Thread.run(Unknown Source) ~[?:?]

@Ad-Blokker Ad-Blokker changed the title ServerBackup with DynamicBackups enabled throws a NullPointerException DynamicBackups throws an NullPointerException Apr 10, 2023
@Ad-Blokker Ad-Blokker changed the title DynamicBackups throws an NullPointerException DynamicBackups throws a NullPointerException Apr 10, 2023
@yassirlaaouissi
Copy link

have you tried try-catching the source code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants