SkriptLang / Skript

Skript is a Spigot plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
https://docs.skriptlang.org
GNU General Public License v3.0
1.07k stars 371 forks source link

1.19 variable saving #4814

Closed UsainSrht closed 2 years ago

UsainSrht commented 2 years ago

Skript/Server Version

[18:46:18 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[18:46:18 INFO]: [Skript] Skript's documentation can be found here: https://skriptlang.github.io/Skript
[18:46:18 INFO]: [Skript] Server Version: git-Purpur-1666 (MC: 1.19)
[18:46:18 INFO]: [Skript] Skript Version: 2.6.2-mc-1.19
[18:46:18 INFO]: [Skript] Installed Skript Addons:
[18:46:18 INFO]: [Skript]  - skript-placeholders v1.5.2 (https://github.com/APickledWalrus/skript-placeholders)
[18:46:18 INFO]: [Skript]  - skript-gui v1.3-beta2-nightly-e646705 (https://github.com/APickledWalrus/skript-gui)
[18:46:18 INFO]: [Skript]  - BungeeSK v2.0.0 (https://github.com/ZorgBtw/BungeeSK)
[18:46:18 INFO]: [Skript]  - DiSky v4.0-beta4
[18:46:18 INFO]: [Skript]  - skript-yaml v1.4
[18:46:18 INFO]: [Skript]  - skript-reflect v2.3 (https://github.com/TPGamesNL/skript-reflect)
[18:46:18 INFO]: [Skript]  - skript-db v1.3.6
[18:46:18 INFO]: [Skript]  - SkBee v1.16.0 (https://github.com/ShaneBeee/SkBee)
[18:46:18 INFO]: [Skript]  - skript-holo v1.0.2 (https://github.com/Blueyescat/skript-holo)
[18:46:18 INFO]: [Skript]  - Skript-Packet v2.1.0 (www.github.com/Anarchick/skript-packet)
[18:46:18 INFO]: [Skript] Installed dependencies:
[18:46:18 INFO]: [Skript]  - Vault v1.7.3-b131

Bug Description

skript generates exceptions and doesn't save variables on server stop. I know this is not official version but I just wanted you to know.

Expected Behavior

save varaibles without problem?

Steps to Reproduce

Download skript 1.19 version from skunity discord and run it like more than 2~3 hours. It doesn't happen when you open up your server save some variables and stop your server.

Errors or Screenshots

No response

Other

[16:32:21] [Craft Scheduler Thread - 211 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: Cannot invoke "ch.njol.yggdrasil.Fields.size()" because "fields" is null
    at ch.njol.yggdrasil.YggdrasilOutputStream.writeGenericObject(YggdrasilOutputStream.java:188) ~[Skript.jar:?]
    at ch.njol.yggdrasil.YggdrasilOutputStream.writeObject(YggdrasilOutputStream.java:249) ~[Skript.jar:?]
    at ch.njol.skript.registrations.Classes.serialize(Classes.java:723) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:438) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:432) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:432) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:432) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:432) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.saveVariables(FlatFileStorage.java:386) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage$1.run(FlatFileStorage.java:198) ~[Skript.jar:?]
    at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.jar:git-Purpur-1666]
    at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.19.jar:git-Purpur-1666]
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.19.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) ~[?:?]
[16:37:21] [Craft Scheduler Thread - 212 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: Cannot invoke "ch.njol.yggdrasil.Fields.size()" because "fields" is null
    at ch.njol.yggdrasil.YggdrasilOutputStream.writeGenericObject(YggdrasilOutputStream.java:188) ~[Skript.jar:?]
    at ch.njol.yggdrasil.YggdrasilOutputStream.writeObject(YggdrasilOutputStream.java:249) ~[Skript.jar:?]
    at ch.njol.skript.registrations.Classes.serialize(Classes.java:723) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:438) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:432) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:432) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:432) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:432) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.saveVariables(FlatFileStorage.java:386) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage$1.run(FlatFileStorage.java:198) ~[Skript.jar:?]
    at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.jar:git-Purpur-1666]
    at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.19.jar:git-Purpur-1666]
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.19.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) ~[?:?]
[16:42:21] [Craft Scheduler Thread - 213 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: Cannot invoke "ch.njol.yggdrasil.Fields.size()" because "fields" is null
    at ch.njol.yggdrasil.YggdrasilOutputStream.writeGenericObject(YggdrasilOutputStream.java:188) ~[Skript.jar:?]
    at ch.njol.yggdrasil.YggdrasilOutputStream.writeObject(YggdrasilOutputStream.java:249) ~[Skript.jar:?]
    at ch.njol.skript.registrations.Classes.serialize(Classes.java:723) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:438) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:432) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:432) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:432) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.save(FlatFileStorage.java:432) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage.saveVariables(FlatFileStorage.java:386) ~[Skript.jar:?]
    at ch.njol.skript.variables.FlatFileStorage$1.run(FlatFileStorage.java:198) ~[Skript.jar:?]
    at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.jar:git-Purpur-1666]
    at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.19.jar:git-Purpur-1666]
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.19.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) ~[?:?]
[16:47:21] [Craft Scheduler Thread - 215 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: null
[16:52:21] [Craft Scheduler Thread - 216 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: null
[16:57:21] [Craft Scheduler Thread - 217 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: null
[17:02:21] [Craft Scheduler Thread - 218 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: null
[17:07:21] [Craft Scheduler Thread - 219 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: null
[17:12:21] [Craft Scheduler Thread - 220 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: null
[17:17:21] [Craft Scheduler Thread - 221 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: null
[17:22:21] [Craft Scheduler Thread - 223 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: null
[17:27:21] [Craft Scheduler Thread - 224 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: null
[17:32:21] [Craft Scheduler Thread - 225 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: null
[17:37:21] [Craft Scheduler Thread - 226 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: null
[17:42:21] [Craft Scheduler Thread - 227 - Skript/WARN]: [Skript] Plugin Skript v2.6.2-mc-1.19 generated an exception while executing task 46
java.lang.NullPointerException: null

Agreement

TPGamesNL commented 2 years ago

This error is more likely to come from an addon, can you try disabling addons one-by-one to see which one causes it?

UsainSrht commented 2 years ago

This error is more likely to come from an addon, can you try disabling addons one-by-one to see which one causes it?

Thanks. I'll try and reply again.

TPGamesNL commented 2 years ago

Likely caused by SkBee's bossbars (https://github.com/ShaneBeee/SkBee/blob/master/src/main/java/com/shanebeestudios/skbee/elements/bossbar/types/Types.java#L95 @ShaneBeee), try removing SkBee (or commenting out code where you store bossbars in global variables) and see if the error still occurs

AyhamAl-Ali commented 2 years ago

Seems like the issue is probably fixed from SkBee's side, if not feel free to reopen.